Confused about the setup of HPARAMS #611
-
This is a pretty noob question, I don't have a lot of python development experience so I am probably missing something basic. I am adapting the current implementations in the baselines directory to my new algorithm https://github.com/Vaibhavdixit02/algorithmic-efficiency/blob/sophiaalg/baselines/sophia/jax/submission.py, it is identical to the nadamw script except for the new algorithm implementation. I keep getting an error
I am wondering what I am doing wrong in how the hyperparameters should be setup? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Could you attach the full submission_runner.py command and the contents of the .json file you passed in for the --tuning_search_space argument? My guess is that you don't have b1 specified in the .json file. |
Beta Was this translation helpful? Give feedback.
-
The command I am using is |
Beta Was this translation helpful? Give feedback.
-
I see you override the hyperparameters with a regular dict here https://github.com/Vaibhavdixit02/algorithmic-efficiency/blob/sophiaalg/baselines/sophia/jax/submission.py#L29C1-L37C2. Your code is throwing an error because you can't index in to a regular dict by using the keys as attributes. |
Beta Was this translation helpful? Give feedback.
-
Ah I see. I mixed the two implementations https://github.com/mlcommons/algorithmic-efficiency/blob/main/reference_algorithms/prize_qualification_baselines/self_tuning/jax_nadamw_target_setting.py and https://github.com/mlcommons/algorithmic-efficiency/blob/main/baselines/nadamw/jax/submission.py I was using as a reference. This makes sense now! Thank you 🙌 |
Beta Was this translation helpful? Give feedback.
-
You're welcome! |
Beta Was this translation helpful? Give feedback.
I see you override the hyperparameters with a regular dict here https://github.com/Vaibhavdixit02/algorithmic-efficiency/blob/sophiaalg/baselines/sophia/jax/submission.py#L29C1-L37C2. Your code is throwing an error because you can't index in to a regular dict by using the keys as attributes.
The code you are using assumes hparams is of type configdict parsed from the .json tuning_search_space file.
Ideally you would set the feasible points in https://github.com/Vaibhavdixit02/algorithmic-efficiency/blob/sophiaalg/baselines/sophia/tuning_search_space.json. If you'd like to specify a single point for each hparam you just set 'feasible_points' to a list containing that single point.