Stop experiment right away when they are not scheduled by Polyaxon
@@ -139,6 +139,7 @@ def experiments_stop(self,
experiment_uuid,
specification,
update_status=True):
+ if specification:
specification = ExperimentSpecification.read(specification)
deleted = experiment_scheduler.stop_experiment(
project_name=project_name,
@@ -149,6 +150,8 @@ def experiments_stop(self,
experiment_uuid=experiment_uuid,
specification=specification,
)
+ else:
+ deleted = True
if not deleted and self.request.retries < 2:
_logger.info('Trying again to delete job `%s` in experiment.', experiment_name)
