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

Config API + Optuna PoC = AutoML 🖤 #937

Merged
merged 13 commits into from Sep 23, 2020
Merged

Conversation

Scitator
Copy link
Member

@Scitator Scitator commented Sep 12, 2020

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contribution guide?
  • Did you check the code style? catalyst-make-codestyle && catalyst-check-codestyle (pip install -U catalyst-codestyle).
  • Did you make sure to update the docs? We use Google format for all the methods and classes.
  • Did you check the docs with make check-docs?
  • Did you write any new necessary tests?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG?
  • You can use 'Login as guest' to see Teamcity build logs.

Description

I think, everyone of us was looking for some tool to create some initial config, run hyperparameters search and just get the best model, right? looks like we are quite close :)

how to start

pip install optuna
pip install git+http://github.com/catalyst-team/catalyst.git@feature/config-api-optuna

minimal example - https://github.com/catalyst-team/catalyst/tree/feature/config-api-optuna/examples/cifar_stages_optuna
config example - https://github.com/catalyst-team/catalyst/blob/feature/config-api-optuna/examples/cifar_stages_optuna/config.yml#L4#L9
hyperparamers space - https://github.com/catalyst-team/catalyst/blob/feature/config-api-optuna/examples/cifar_stages_optuna/model.py#L6$#L16

how to run

catalyst-dl tune --config=./cifar_stages_optuna/config.yml --verbose

how to visualise plots

CUDA_VISIBLE_DEVICE="" tensorboard --logdir=./logs/cifar_stages_optuna

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

return args, unknown_args


def process_trial_config(trial, config: Dict) -> Tuple[optuna.Trial, Dict]:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function

@pep8speaks
Copy link

pep8speaks commented Sep 15, 2020

Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-09-22 19:51:43 UTC

def on_stage_start(self, runner: "IRunner"):
"""
On stage start hook.
Takes ``optuna_trial`` from ``Experiment`` for future needs if required.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
E501 line too long (80 > 79 characters)

def on_stage_start(self, runner: "IRunner"):
"""
On stage start hook.
Takes ``optuna_trial`` from ``Experiment`` for future needs if required.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
W505 doc line too long (80 > 79 characters)

@Scitator Scitator changed the title Config API + Optuna PoC Config API + Optuna PoC = AutoML ❤️ Sep 15, 2020
@Scitator Scitator changed the title Config API + Optuna PoC = AutoML ❤️ Config API + Optuna PoC = AutoML 🖤 Sep 15, 2020
expdir=expdir, config=trial_config
)
# @TODO: here we need better solution.
experiment._trial = trial

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS437 Found protected attribute usage: _trial

@mergify
Copy link

mergify bot commented Sep 22, 2020

This pull request is now in conflicts. @Scitator, could you fix it? 🙏

@Scitator Scitator merged commit c816f3d into master Sep 23, 2020
@mergify mergify bot deleted the feature/config-api-optuna branch September 23, 2020 04:42
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

Successfully merging this pull request may close these issues.

None yet

2 participants