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

Proposal: Independent Local hyperparameter optimization module #40

Open
zafarali opened this issue Nov 21, 2018 · 0 comments
Open

Proposal: Independent Local hyperparameter optimization module #40

zafarali opened this issue Nov 21, 2018 · 0 comments

Comments

@zafarali
Copy link
Collaborator

zafarali commented Nov 21, 2018

Right now HyperOptArgumentParser contains much of the logic for doing a hyperparamter search on a local machine.

https://github.com/williamFalcon/test-tube/blob/master/test_tube/argparse_hopt.py#L259

Why this it not great:

  • This is the opposite of the SLURM code where the HyperOptArgumentParser object is passed into SlurmCluster.
  • Code duplication and entanglement.
  • Hard to test HyperOptArgumentParser independent of the mechanism of deployment.

Proposed change:

Having something like Local or LocalSystem object that similar to SlurmCluster accepts a HyperOptArgumentParser that can be used to optimize hyperparameter locally:

    hyperparams = parser.parse_args()

    # Enable cluster training.
    system = LocalSystem(
        hyperparam_optimizer=hyperparams,
        log_path=hyperparams.log_path,
        python_cmd='python3',
        test_tube_exp_name=hyperparams.test_tube_exp_name
    )
    
    system.max_cpus = 100
    system.max_gpus = 5

    # Each hyperparameter combination will use 200 cpus.
    system.optimize_parallel_cpu(
        # Function to execute:
        train,
        # Number of hyperparameter combinations to search:
        nb_trials=24')

Downsides

  • Probably breaks backward compatibility.
@zafarali zafarali changed the title Proposal: Independent Local hyperparmaeter optimization module Proposal: Independent Local hyperparameter optimization module Nov 22, 2018
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