Orion Sweeper
Implements a sweeper plugin for Orion
- class hydra_orion_sweeper.orion_sweeper.OrionSweeper(experiment: OrionClientConf | None, worker: WorkerConf, algorithm: AlgorithmConf, storage: StorageConf, parametrization: DictConfig | None, params: DictConfig | None, orion: OrionClientConf | None = None)[source]
Bases:
Sweeper
Class to interface with Orion
Methods
sweep
(arguments)Execute a sweep :param arguments: list of strings describing what this sweeper should do.
validate_batch_is_legal
(batch)Ensures that the given batch can be composed.
setup
- config: DictConfig | None
- hydra_context: HydraContext | None
- launcher: Launcher | None
Configuration
Defines the orion configuration that is exposed to hydra
- class hydra_orion_sweeper.config.AlgorithmConf(type: str = 'random', config: ~typing.Dict[str, ~typing.Any] = <factory>)[source]
Bases:
object
Orion optimization algorithm configuration
See algorithms
- config: Dict[str, Any]
- type: str = 'random'
- class hydra_orion_sweeper.config.Database(type: str = 'pickleddb', host: str = 'orion_database.pkl')[source]
Bases:
object
Orion database configuration
See Database
- host: str = 'orion_database.pkl'
- type: str = 'pickleddb'
- class hydra_orion_sweeper.config.OrionClientConf(name: str | None = None, version: int | None = None, branching: str | None = None, debug: bool | None = False, workspace: str | None = None, id: str | None = None, trial: str | None = None, paramhash: str | None = None, uuid: str | None = None)[source]
Bases:
object
Orion EVC options
- Attributes:
- branching
- id
- name
- paramhash
- trial
- uuid
- version
- workspace
- branching: str | None = None
- debug: bool | None = False
- id: str | None = None
- name: str | None = None
- paramhash: str | None = None
- trial: str | None = None
- uuid: str | None = None
- version: int | None = None
- workspace: str | None = None
- class hydra_orion_sweeper.config.OrionSweeperConf(_target_: str = 'hydra_plugins.hydra_orion_sweeper.orion_sweeper.OrionSweeper', experiment: ~hydra_orion_sweeper.config.OrionClientConf = <factory>, orion: ~hydra_orion_sweeper.config.OrionClientConf | None = None, worker: ~hydra_orion_sweeper.config.WorkerConf = <factory>, algorithm: ~hydra_orion_sweeper.config.AlgorithmConf = <factory>, storage: ~hydra_orion_sweeper.config.StorageConf = <factory>, parametrization: ~typing.Dict[str, ~typing.Any] | None = <factory>, params: ~typing.Dict[str, ~typing.Any] | None = <factory>)[source]
Bases:
object
Orion Sweeper configuration
- Attributes:
- orion
- algorithm: AlgorithmConf
- experiment: OrionClientConf
- orion: OrionClientConf | None = None
- parametrization: Dict[str, Any] | None
- params: Dict[str, Any] | None
- storage: StorageConf
- worker: WorkerConf
- class hydra_orion_sweeper.config.StorageConf(type: str = 'legacy', database: ~hydra_orion_sweeper.config.Database = <factory>, use_hydra_path: bool = True)[source]
Bases:
object
Orion storage configuration
See storage
- type: str = 'legacy'
- use_hydra_path: bool = True
- class hydra_orion_sweeper.config.WorkerConf(n_workers: int = 1, pool_size: int | None = None, reservation_timeout: int = 120, max_trials: int = 10000000, max_trials_per_worker: int = 1000000, max_broken: int = 3)[source]
Bases:
object
Orion Worker configuration
See worker
- Attributes:
- pool_size
- max_broken: int = 3
- max_trials: int = 10000000
- max_trials_per_worker: int = 1000000
- n_workers: int = 1
- pool_size: int | None = None
- reservation_timeout: int = 120