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

Use Hydra multirun mode to do optimization tasks #38

Closed
14 tasks done
ri-heme opened this issue Oct 10, 2022 · 0 comments · Fixed by #63
Closed
14 tasks done

Use Hydra multirun mode to do optimization tasks #38

ri-heme opened this issue Oct 10, 2022 · 0 comments · Fixed by #63
Assignees
Labels
enhancement New feature or request refactoring Improve code structure or implementation without affecting functionality

Comments

@ri-heme
Copy link
Collaborator

ri-heme commented Oct 10, 2022

The hyperparameter optimization can be re-adapted to make use of Hydra's multirun mode (and/or sweeper).

Overview of tasks:

Below a list of tasks to convert these two modules from its current state:

Module and schema

  • Define new schemas for this task: OptimizeTaskConfig (inherits from TaskConfig) class in move.conf.schema.
  • Create new move.tasks.optimize_hyperparameters module and function.
  • Create example experiment config for hyperparameter search. See example YAML in hydra-app-example.

Function

For the function optimize_hyperparamters:

  • Log job number
  • Create objective function TSV (if it doesn't exist)
  • Load pre-processed data
  • Split data into training/test sets
  • Make dataloaders
  • Train model
  • Record values of objective function (append to TSV)

Misc.

  • Repeat for second optimization, taking a similar approach to the "identify associations" task (see move.tasks.identify_associations), i.e., detect type of task and change the value of the objective function (from accuracy to stabillity).
  • Add to move.__main__.
  • Re-format tutorial files for random.small dataset.

Open Questions

  • Is the best set of hyperparameters automatically selected based on the objective function value (e.g., reconstruction accuracy)?
    • If so, I would suggest we also implement the Optuna plugin with a smarter sampler than greedy grid search.
    • If not, then I suggest just saving the results, and then providing some visualization functions so the users can decide on their hyperparameter set.
  • Best latent representation #22

Resources:

@ri-heme ri-heme added the enhancement New feature or request label Oct 10, 2022
@ri-heme ri-heme added the refactoring Improve code structure or implementation without affecting functionality label Oct 10, 2022
@ri-heme ri-heme mentioned this issue Oct 10, 2022
4 tasks
@ri-heme ri-heme added this to the Make all modules consistent milestone Oct 10, 2022
@ri-heme ri-heme assigned ri-heme and unassigned valentas1 Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Improve code structure or implementation without affecting functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants