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:
params:
a: "uniform(0, 1)"
b: "uniform(0, 1)"
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 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.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9a10d448d68cc89f306fcfcdec5552eef808aca88d90202eef8b911563ccdb |
|
MD5 | b31136a5958a06d09bfcf78ba366c347 |
|
BLAKE2b-256 | 884d93b846a5c32d4ee1b56b38e7fbde8dd475dbd924e99bd4883dbe170e1e68 |
Hashes for hydra_orion_sweeper-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3c4c34cd0976902cb3fe85258dd0895435b7bf148ac9f59c559a6cb80a5deca |
|
MD5 | e9d17a1d08048820f6f2e8dd2f4d8fdd |
|
BLAKE2b-256 | d482d4e6b32b0e4072638d5453c226da92033a5ae4a0690a5ae6e90bdb6ec308 |