@@ -273,7 +273,7 @@ def create_and_start_multi_node(ctx, api_key, show_logs, **kwargs):
273273 experiments_api = client .API (config .CONFIG_EXPERIMENTS_HOST , api_key = api_key )
274274 command = experiments_commands .CreateAndStartExperimentCommand (api = experiments_api )
275275 experiment = command .execute (kwargs )
276- if experiment is not None and show_logs is True :
276+ if experiment and show_logs :
277277 ctx .invoke (list_logs , experiment_id = experiment ["handle" ], line = 0 , limit = 100 , follow = True , api_key = api_key )
278278
279279
@@ -288,7 +288,7 @@ def create_and_start_single_node(ctx, api_key, show_logs, **kwargs):
288288 experiments_api = client .API (config .CONFIG_EXPERIMENTS_HOST , api_key = api_key )
289289 command = experiments_commands .CreateAndStartExperimentCommand (api = experiments_api )
290290 experiment = command .execute (kwargs )
291- if experiment is not None and show_logs is True :
291+ if experiment and show_logs :
292292 ctx .invoke (list_logs , experiment_id = experiment ["handle" ], line = 0 , limit = 100 , follow = True , api_key = api_key )
293293
294294
@@ -300,7 +300,7 @@ def create_and_start_single_node(ctx, api_key, show_logs, **kwargs):
300300def start_experiment (ctx , experiment_id , show_logs , api_key ):
301301 experiments_api = client .API (config .CONFIG_EXPERIMENTS_HOST , api_key = api_key )
302302 experiments_commands .start_experiment (experiment_id , api = experiments_api )
303- if show_logs is True :
303+ if show_logs :
304304 ctx .invoke (list_logs , experiment_id = experiment_id , line = 0 , limit = 100 , follow = True , api_key = api_key )
305305
306306
0 commit comments