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

Automatic Hyperparameter Search #70

Open
etgld opened this issue Jun 7, 2022 · 4 comments
Open

Automatic Hyperparameter Search #70

etgld opened this issue Jun 7, 2022 · 4 comments
Assignees
Milestone

Comments

@etgld
Copy link
Contributor

etgld commented Jun 7, 2022

Docs
https://docs.ray.io/en/master/tune/index.html

Core example
https://github.com/ray-project/ray/blob/master/python/ray/tune/examples/pbt_transformers/pbt_transformers.py

@etgld etgld self-assigned this Jun 7, 2022
@angus-lherrou angus-lherrou added this to the v0.next milestone Jun 10, 2022
@etgld
Copy link
Contributor Author

etgld commented Aug 28, 2023

There might be a way to do this that's still worth trying but need to get a proof of concept working. Long story short the most high power method which was monotonically increasing I think was Population-Based Bandits.

The main issue around supporting Ray Tune I think involves UI. There are enough options for a Ray Tune run that including them in cnlp_args would create a lot of clutter I think. Maybe something better would involve some basic instructions/recipes plus a sample script.

Granted this has been a while but now that I have more facility with setting up these kinds of things on E2 I might be able to try it again.

@tmills
Copy link
Contributor

tmills commented Aug 29, 2023

I think there is also some cmd line parameters we inherit from HF that are supposed to automatically do tuning -- we should look into whether we can just use those as is.

@etgld
Copy link
Contributor Author

etgld commented Jul 9, 2024

For reference, there haven't been many updated examples for using Ray Tune with HuggingFace but this one looks helpful
https://docs.ray.io/en/latest/train/examples/transformers/huggingface_text_classification.html
Although it's sparse there are some up to date search space guidelines from HuggingFace for different backends
https://huggingface.co/docs/transformers/en/hpo_train
https://huggingface.co/docs/setfit/en/how_to/hyperparameter_optimization
I remember from last year there was this nice paper about automatic gradient descent without hyperparameters, the caveat being that it doesn't presently work for transformers, I looked for the first author to see if there were any updates but nothing yet.
https://arxiv.org/abs/2304.05187

There are some things we can definitely inherit from cnlp_args although a lot of these backends have a lot of options and for some cases a config JSON might be the easiest way.

@etgld
Copy link
Contributor Author

etgld commented Oct 25, 2024

Looking at the Huggingface documentation/tutorial which uses Optuna that might be the way to go. Next time I do fine tuning in cnlpt ( probably for the Cumulus project ) will try to start a branch for it.

@etgld etgld changed the title Integrate Ray Tune for Internal Hyperparameter Search Automatic Hyperparameter Search Oct 25, 2024
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

No branches or pull requests

3 participants