# Get a suggestion for the next job
suggested_job = get_suggestion(chooser, resource.tasks, db, expt_dir, options, resource_name)
# Submit the job to the appropriate resource
process_id = resource.attemptDispatch(experiment_name, suggested_job, db_address, expt_dir)
# Set the status of the job appropriately (successfully submitted or not)
if process_id is None:
suggested_job['status'] = 'broken'
save_job(suggested_job, db, experiment_name)
else:
suggested_job['status'] = 'pending'
suggested_job['proc_id'] = process_id
save_job(suggested_job, db, experiment_name)
If process_id is not None the status will be set to "pending"
while if the subprocess run faster then it and has already return the answer,
the status will have already be set "complete" in resource.attemptDispatch
and then it is set "pending" here, so it will never be set "complete" again
This seems like a low priority issue since Spearmint is supposed to be used for slow objective functions. We would welcome a contribution if you want to fix it though.
in main.py
If process_id is not None the status will be set to "pending" while if the subprocess run faster then it and has already return the answer, the status will have already be set "complete" in resource.attemptDispatch and then it is set "pending" here, so it will never be set "complete" again
I find it when I am running it with single step.