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

Support of log_base for opt_range(type=int) #72

Open
vikmary opened this issue Jun 21, 2020 · 0 comments
Open

Support of log_base for opt_range(type=int) #72

vikmary opened this issue Jun 21, 2020 · 0 comments

Comments

@vikmary
Copy link

vikmary commented Jun 21, 2020

Hi!

Thank you for the library! Using it in par with pytorch-lightning to search network's hyperparameters.
Right now the following line:

parser = HyperOptArgumentParser()
parser.opt_range('--batch-size', type=int, default=1500, tunable=True, low=16, high=8192, nb_samples=10, log_base=10)

hparams = parser.parse_args()
for trial_hparams in hparams.trials(10):
    print(vars(trial_hparams))

will produce real values, though

parser = HyperOptArgumentParser()
parser.opt_range('--batch-size', type=int, default=1500, tunable=True, low=16, high=8192, nb_samples=10)

hparams = parser.parse_args()
for trial_hparams in hparams.trials(10):
    print(vars(trial_hparams))

produces int values.

It would be nice to have a feature of sampling in log scale for integer values!

@vikmary vikmary changed the title Support of log_base for type=int Support of log_base for opt_range(type=int) Jun 21, 2020
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

1 participant