Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue an optimization run. #6

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

PhMueller
Copy link
Contributor

This PR adds the functionality to continue an optimization run.

Also, it adds the possibility to restrict the worker to only run a single task concurrently. It happened that a worker was overloaded with tasks, however, due to mem limitations it shouldn't perform multiple tasks in parallel.
This solution is similar to this StackOverflow article

I will add a example on how to use restarting and how to limit the resources per worker.

To do so, we store basically all important inforamtion (population, fitness values, bracket states, ..) as a pickle object.
By reloading this object, we can continue training from this state.
A thing to discuss is the current bracket state. I am not quite certain if there is another way to make sure that the brackets are correct. Also, this functionality is more about continuing and not warmstarting.
The difference for me between warmstarting and restarting is that for warmstarting we should think about reloading multiple states and thus combining the populations per budget might not be so simple.
However, restarting or continuing is more easy, because we just have to restore the old state. Happy to discuss this difference.

Also, I have added a short logger that writes the results similar to Hpbandsters BOHB to file. (TODO: config.json is still missing).
@PhMueller
Copy link
Contributor Author

PhMueller commented Jul 28, 2021

@Neeratyoy: Could you please create a dev branch, so I don't have to push to your main branch. This would make me sleep better :-)

@Neeratyoy
Copy link
Collaborator

Could you please create a dev branch, so I don't have to push to your main branch

done :)

@PhMueller PhMueller changed the base branch from master to development July 28, 2021 15:51
@PhMueller
Copy link
Contributor Author

Could you please create a dev branch, so I don't have to push to your main branch

done :)

Perfect. Is now pointing to dev.

Comment on lines +1 to +4
from loguru import logger
import sys

logger.configure(handlers=[{"sink": sys.stdout, "level": "INFO"}])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does bringing this here help? or does it clash with the configuration defined in optimizers/dehb.py?
can logger now be imported directly? or could you point me to how you're using this maybe?

@Neeratyoy
Copy link
Collaborator

This is actually a great contribution so thanks @PhMueller
However, if I may ask you to do some extra work or to have your permission if I do so
I was thinking of having one PR with the __version__ and setup to allow pip install for DEHB and that can be merged with master asap
as for the other main change in this PR, I'd like to understand the change a bit better and standardize a few things
for instance, to understand client_resources better we should include a docstring I think, which would necessitate docstrings for the other arguments too, which I would like to add anyways
so please let me know if your work can proceed with the forked version, and if you can split this PR, or if you give me a green flag I can do that by copying your files, but it's only fair that you're the author for that PR ;)

@RaghuSpaceRajan
Copy link

Hi, @PhMueller would it be possible to include the commit fc5fd98 for pip installability in a separate PR? Because, currently @Neeratyoy does not have time to look at all the issues in this PR. And being installable by pip is useful anyway, e.g., for me the example here: https://github.com/automl/DEHB/tree/master/utils seems to require dehb to be installed.

@PhMueller
Copy link
Contributor Author

Hey,

Sorry for neglecting this pr. I will hopefully find some time to finish this one end of this year.

In the meanwhile: @RaghuSpaceRajan, you can take a look at #11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants