Skip to content

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

Description

@vikmary

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions