Hydra Orion Sweeper plugin
Project description
Provides a mechanism for Hydra applications to use Orion algorithms for the optimization of the parameters of any experiment.
See website for more information
Install
pip install hydra-orion-sweeper
Search Space
Orion defines 5 different dimensions that can be used to define your search space.
uniform(low, high, [discrete=False, precision=4, shape=None, default_value=None])
loguniform(low, high, [discrete=False, precision=4, shape=None, default_value=None])
normal(loc, scale, [discrete=False, precision=4, shape=None, default_value=None])
choices(*options)
fidelity(low, high, base=2)
Fidelity is a special dimension that is used to represent the training time, you can think of it as the epoch dimension.
Documentation
For in-depth documentation about the plugin and its configuration options you should refer to Orion as the plugin configurations are simply passed through.
Example
defaults:
- override hydra/sweeper: orion
hydra:
sweeper:
orion:
name: 'experiment'
version: '1'
algorithm:
type: random
config:
seed: 1
worker:
n_workers: -1
max_broken: 3
max_trials: 100
storage:
type: legacy
database:
type: pickleddb
host: 'database.pkl'
# default parametrization of the search space
parametrization:
a: "uniform(0, 1)"
b: "uniform(0, 1)"
# Default values
a: 0
b: 0
import hydra
from omegaconf import DictConfig
@hydra.main(config_path=".", config_name="config")
def main(cfg: DictConfig) -> float:
"""Simple main function"""
a = cfg.a
b = cfg.b
return float(a + b)
if __name__ == "__main__":
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hydra-orion-sweeper-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a123db2e71c7912274f6ce2a402e5fbed1f3bd72572a30d58b50ff01befcc79 |
|
MD5 | 245fdf4966cc380a9c8b57015b2780cd |
|
BLAKE2b-256 | 9427136a5d1bbcba0f428c9c86b33381973fc2ff021735b3997bbafa35d832be |
Hashes for hydra_orion_sweeper-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f1433ab4636e7c9575e514fc20db9521924feefdf2a0a8de77f13c5253e262 |
|
MD5 | 235c8fbb3a328e3603a9d82e22d07458 |
|
BLAKE2b-256 | bfcf555b114aa2166d46c2f97682959aaeb5a11925dbdfcc50be1135b25812c0 |