optuna-worker
optuna-worker
is a python package to help integrating optuna to your existing ML training project without code modification. With optuna-worker
, you don't need to implement objective function, but use your existing normal trainer. You could write a configuration YAML file and run optuna worker with a simple command.
optuna-worker run $CONFIG_FILE
- Specification of the configuration file could be found from the documentation
- You could also refer to working example configuration files.
There are two assumptions on your trainer.
- You could pass hyperparameters to your trainer via cli arguments.
- Metrics to be optimized are printed out as formatted logs during training.
All it does is simply creating a proxy objective that
- Creates a subprocess with a training command, passing suggested parameters via CLI arguments.
- Parses metric values from stdout of the training subprocess, so that they could be reported and returned.
Installation
pip install optuna-worker
License
optuna-worker
is distributed under the terms of the MIT license.