def _run(task_bind, *args, **kwargs): experiment_id = kwargs['experiment_id'] experiment = get_valid_experiment(experiment_id=experiment_id) if not experiment: raise OperationRunError( 'The Experiment `{}` does not exist anymore.'.format( experiment_id)) build_experiment.apply_async(experiment_id=experiment_id)
def new_experiment(sender, **kwargs): instance = kwargs['instance'] created = kwargs.get('created', False) # Check if the experiment is newly created and that we can start it independently if not created: return instance.set_status(ExperimentLifeCycle.CREATED) # Create logs path create_experiment_logs_path(instance.unique_name) if instance.is_independent: # Start building the experiment and then Schedule it to be picked by the spawner build_experiment.apply_async((instance.id, ), countdown=1)