HIPS / Spearmint

Spearmint Bayesian optimization codebase
Other
1.55k stars 329 forks source link

[bug] if subprocess run faster then main.py, the status would be rewrite. #78

Open hzhangxyz opened 8 years ago

hzhangxyz commented 8 years ago

in main.py

# 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

I find it when I am running it with single step.

mgelbart commented 8 years ago

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.