@@ -84,18 +84,18 @@ def cli():
84
84
pass
85
85
86
86
87
- @cli .group ("experiments" )
87
+ @cli .group ("experiments" , help = "Manage experiments" )
88
88
def experiments ():
89
89
pass
90
90
91
91
92
- @experiments .group ()
93
- def create ():
92
+ @experiments .group ("create" , help = "Create new experiment" )
93
+ def create_experiment ():
94
94
pass
95
95
96
96
97
- @experiments .group (name = "createAndStart" )
98
- def create_and_start ():
97
+ @experiments .group (name = "createAndStart" , help = "Create and start new experiment" )
98
+ def create_and_start_experiment ():
99
99
pass
100
100
101
101
@@ -104,56 +104,68 @@ def common_experiments_create_options(f):
104
104
click .option (
105
105
"--name" ,
106
106
required = True ,
107
+ help = "Name of new experiment" ,
107
108
),
108
109
click .option (
109
110
"--ports" ,
110
111
type = int ,
112
+ help = "Port to use in new experiment" ,
111
113
),
112
114
click .option (
113
115
"--workspaceUrl" ,
114
116
"workspaceUrl" ,
115
117
required = True ,
118
+ help = "Project git repository url" ,
116
119
),
117
120
click .option (
118
121
"--workingDirectory" ,
119
122
"workingDirectory" ,
123
+ help = "Working directory for the experiment" ,
120
124
),
121
125
click .option (
122
126
"--artifactDirectory" ,
123
127
"artifactDirectory" ,
128
+ help = "Artifacts directory" ,
124
129
),
125
130
click .option (
126
131
"--clusterId" ,
127
132
"clusterId" ,
128
133
type = int ,
134
+ help = "Cluster ID" ,
129
135
),
130
136
click .option (
131
137
"--experimentEnv" ,
132
138
"experimentEnv" ,
133
139
type = json_string ,
140
+ help = "Environment variables in a JSON" ,
134
141
),
135
142
click .option (
136
143
"--triggerEventId" ,
137
144
"triggerEventId" ,
138
145
type = int ,
146
+ help = "Trigger event ID" ,
139
147
),
140
148
click .option (
141
149
"--projectId" ,
142
150
"projectId" ,
143
151
type = int ,
152
+ help = "Project ID" ,
144
153
),
145
154
click .option (
146
155
"--projectHandle" ,
147
156
"projectHandle" ,
148
157
required = True ,
158
+ help = "Project handle" ,
149
159
),
150
160
click .option (
151
161
"--modelType" ,
152
162
"modelType" ,
163
+ help = "Model type" ,
153
164
),
154
165
click .option (
155
166
"--modelPath" ,
156
167
"modelPath" ,
168
+ help = "Model path" ,
157
169
),
158
170
api_key_option
159
171
]
@@ -167,72 +179,87 @@ def common_experiment_create_multi_node_options(f):
167
179
"experimentTypeId" ,
168
180
type = ChoiceType (MULTI_NODE_EXPERIMENT_TYPES_MAP , case_sensitive = False ),
169
181
required = True ,
182
+ help = "Experiment Type ID" ,
170
183
),
171
184
click .option (
172
185
"--workerContainer" ,
173
186
"workerContainer" ,
174
187
required = True ,
188
+ help = "Worker container" ,
175
189
),
176
190
click .option (
177
191
"--workerMachineType" ,
178
192
"workerMachineType" ,
179
193
required = True ,
194
+ help = "Worker machine type" ,
180
195
),
181
196
click .option (
182
197
"--workerCommand" ,
183
198
"workerCommand" ,
184
199
required = True ,
200
+ help = "Worker command" ,
185
201
),
186
202
click .option (
187
203
"--workerCount" ,
188
204
"workerCount" ,
189
205
type = int ,
190
206
required = True ,
207
+ help = "Worker count" ,
191
208
),
192
209
click .option (
193
210
"--parameterServerContainer" ,
194
211
"parameterServerContainer" ,
195
212
required = True ,
213
+ help = "Parameter server container" ,
196
214
),
197
215
click .option (
198
216
"--parameterServerMachineType" ,
199
217
"parameterServerMachineType" ,
200
218
required = True ,
219
+ help = "Parameter server machine type" ,
201
220
),
202
221
click .option (
203
222
"--parameterServerCommand" ,
204
223
"parameterServerCommand" ,
205
224
required = True ,
225
+ help = "Parameter server command" ,
206
226
),
207
227
click .option (
208
228
"--parameterServerCount" ,
209
229
"parameterServerCount" ,
210
230
type = int ,
211
231
required = True ,
232
+ help = "Parameter server count" ,
212
233
),
213
234
click .option (
214
235
"--workerContainerUser" ,
215
236
"workerContainerUser" ,
237
+ help = "Worker container user" ,
216
238
),
217
239
click .option (
218
240
"--workerRegistryUsername" ,
219
241
"workerRegistryUsername" ,
242
+ help = "Worker registry username" ,
220
243
),
221
244
click .option (
222
245
"--workerRegistryPassword" ,
223
246
"workerRegistryPassword" ,
247
+ help = "Worker registry password" ,
224
248
),
225
249
click .option (
226
250
"--parameterServerContainerUser" ,
227
251
"parameterServerContainerUser" ,
252
+ help = "Parameter server container user" ,
228
253
),
229
254
click .option (
230
255
"--parameterServerRegistryContainerUser" ,
231
256
"parameterServerRegistryContainerUser" ,
257
+ help = "Parameter server registry container user" ,
232
258
),
233
259
click .option (
234
260
"--parameterServerRegistryPassword" ,
235
261
"parameterServerRegistryPassword" ,
262
+ help = "Parameter server registry password" ,
236
263
),
237
264
]
238
265
return functools .reduce (lambda x , opt : opt (x ), reversed (options ), f )
@@ -243,33 +270,39 @@ def common_experiments_create_single_node_options(f):
243
270
click .option (
244
271
"--container" ,
245
272
required = True ,
273
+ help = "Container" ,
246
274
),
247
275
click .option (
248
276
"--machineType" ,
249
277
"machineType" ,
250
278
required = True ,
279
+ help = "Machine type" ,
251
280
),
252
281
click .option (
253
282
"--command" ,
254
283
required = True ,
284
+ help = "Command" ,
255
285
),
256
286
click .option (
257
287
"--containerUser" ,
258
288
"containerUser" ,
289
+ help = "Container user" ,
259
290
),
260
291
click .option (
261
292
"--registryUsername" ,
262
293
"registryUsername" ,
294
+ help = "Registry username" ,
263
295
),
264
296
click .option (
265
297
"--registryPassword" ,
266
298
"registryPassword" ,
299
+ help = "Registry password" ,
267
300
),
268
301
]
269
302
return functools .reduce (lambda x , opt : opt (x ), reversed (options ), f )
270
303
271
304
272
- @create .command (name = "multinode" )
305
+ @create_experiment .command (name = "multinode" , help = "Create multi node experiment " )
273
306
@common_experiments_create_options
274
307
@common_experiment_create_multi_node_options
275
308
def create_multi_node (api_key , ** kwargs ):
@@ -278,7 +311,7 @@ def create_multi_node(api_key, **kwargs):
278
311
experiments_commands .create_experiment (kwargs , api = experiments_api )
279
312
280
313
281
- @create .command (name = "singlenode" )
314
+ @create_experiment .command (name = "singlenode" , help = "Create single node experiment " )
282
315
@common_experiments_create_options
283
316
@common_experiments_create_single_node_options
284
317
def create_single_node (api_key , ** kwargs ):
@@ -288,7 +321,7 @@ def create_single_node(api_key, **kwargs):
288
321
experiments_commands .create_experiment (kwargs , api = experiments_api )
289
322
290
323
291
- @create_and_start .command (name = "multinode" )
324
+ @create_and_start_experiment .command (name = "multinode" , help = "Create and start new multi node experiment " )
292
325
@common_experiments_create_options
293
326
@common_experiment_create_multi_node_options
294
327
def create_and_start_multi_node (api_key , ** kwargs ):
@@ -297,7 +330,7 @@ def create_and_start_multi_node(api_key, **kwargs):
297
330
experiments_commands .create_and_start_experiment (kwargs , api = experiments_api )
298
331
299
332
300
- @create_and_start .command (name = "singlenode" )
333
+ @create_and_start_experiment .command (name = "singlenode" , help = "Create and start new single node experiment " )
301
334
@common_experiments_create_options
302
335
@common_experiments_create_single_node_options
303
336
def create_and_start_single_node (api_key , ** kwargs ):
@@ -307,23 +340,23 @@ def create_and_start_single_node(api_key, **kwargs):
307
340
experiments_commands .create_and_start_experiment (kwargs , api = experiments_api )
308
341
309
342
310
- @experiments .command ()
343
+ @experiments .command ("start" , help = "Start experiment" )
311
344
@click .argument ("experiment-handle" )
312
345
@api_key_option
313
- def start (experiment_handle , api_key ):
346
+ def start_experiment (experiment_handle , api_key ):
314
347
experiments_api = client .API (config .CONFIG_EXPERIMENTS_HOST , api_key = api_key )
315
348
experiments_commands .start_experiment (experiment_handle , api = experiments_api )
316
349
317
350
318
- @experiments .command ()
351
+ @experiments .command ("stop" , help = "Stop experiment" )
319
352
@click .argument ("experiment-handle" )
320
353
@api_key_option
321
- def stop (experiment_handle , api_key ):
354
+ def stop_experiment (experiment_handle , api_key ):
322
355
experiments_api = client .API (config .CONFIG_EXPERIMENTS_HOST , api_key = api_key )
323
356
experiments_commands .stop_experiment (experiment_handle , api = experiments_api )
324
357
325
358
326
- @experiments .command ("list" )
359
+ @experiments .command ("list" , help = "List experiments" )
327
360
@click .option ("--projectHandle" , "-p" , "project_handles" , multiple = True )
328
361
@api_key_option
329
362
def list_experiments (project_handles , api_key ):
@@ -332,7 +365,7 @@ def list_experiments(project_handles, api_key):
332
365
command .execute (project_handles )
333
366
334
367
335
- @experiments .command ("details" )
368
+ @experiments .command ("details" , help = "Show detail of an experiment" )
336
369
@click .argument ("experiment-handle" )
337
370
@api_key_option
338
371
def get_experiment_details (experiment_handle , api_key ):
0 commit comments