Skip to main content

Hydra Orion Sweeper plugin

Project description

Current PyPi Version Supported Python Versions codecov docs tests style

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydra-orion-sweeper-1.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hydra_orion_sweeper-1.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file hydra-orion-sweeper-1.1.0.tar.gz.

File metadata

  • Download URL: hydra-orion-sweeper-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for hydra-orion-sweeper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2a123db2e71c7912274f6ce2a402e5fbed1f3bd72572a30d58b50ff01befcc79
MD5 245fdf4966cc380a9c8b57015b2780cd
BLAKE2b-256 9427136a5d1bbcba0f428c9c86b33381973fc2ff021735b3997bbafa35d832be

See more details on using hashes here.

File details

Details for the file hydra_orion_sweeper-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hydra_orion_sweeper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17f1433ab4636e7c9575e514fc20db9521924feefdf2a0a8de77f13c5253e262
MD5 235c8fbb3a328e3603a9d82e22d07458
BLAKE2b-256 bfcf555b114aa2166d46c2f97682959aaeb5a11925dbdfcc50be1135b25812c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page