-
Notifications
You must be signed in to change notification settings - Fork 294
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
Passing extra arguments to the evaluation_function #70
Comments
Would “fixed parameters” accomplish what you are looking for? https://ax.dev/docs/core.html
…Sent from my iPhone
On May 5, 2019, at 11:50 AM, Arvie Frydenlund ***@***.***> wrote:
I am trying to do a hyper-parameter search over a subset of the overall model hyperparameters. This subset has been defined for the search space, however, my evaluation_function needs access to the rest in order to pass them to the model's trainer. I feel like this might conflict with Ax's design philosophy but I have a considerable number of these and its annoying to define them both trough argparse and then again though ax.
Is there a way of passing these to the evaluation_function function without creating a parameter for them in the search space i.e. having them as part of the parameterization?
If not is there a helper function which converts and argparse to ax parameters? or something similar.
Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
That kind of helps but not fully. I can partially use that to convert an argparse object to a list of fixed parameters, however, there are some types that can't be converted, for example, there isn't a ParameterType for list (which is not being used as a range). |
If these other parameters are fixed for all trials, can they be encoded directly in the evaluation_function itself rather than passed as arguments? You could even write a wrapper function which takes the fixed params as inputs and outputs an evaluation_function with them encoded inside. If by argparse you mean an easy to use CLI, that is something we've discussed supporting and would be interested to know how you're using it with CLI. |
Thanks, the wrapper function worked. And yes this was for CLI. I'm trying to do Bayesian optimization on a pre-existing library which uses CLI to define the model and I was trying to integrate ax with minimal changes to the existing code. |
Ah so not invoking Ax via CLI. Glad this solution worked for you. |
I am trying to do a hyper-parameter search over a subset of the overall model hyperparameters. This subset has been defined for the search space, however, my evaluation_function needs access to the rest in order to pass them to the model's trainer. I feel like this might conflict with Ax's design philosophy but I have a considerable number of these and its annoying to define them both through argparse and then again through ax.
Is there a way of passing these to the evaluation_function function without creating a parameter for them in the search space i.e. having them as part of the parameterization?
If not is there a helper function which converts and argparse to ax parameters? or something similar.
Thanks.
The text was updated successfully, but these errors were encountered: