hydraclick.run#
Attributes#
Functions#
|
Load the necessary configuration for running click commands from a config.yaml file. |
|
Run the sweep sequentially. |
|
Run the sweep sequentially. |
|
Run the function. |
Module Contents#
- hydraclick.run._logger#
- hydraclick.run.get_hydra_configs(config_file, hydra_args)[source]#
Load the necessary configuration for running click commands from a config.yaml file.
- Parameters:
config_file (pathlib.Path | str) – Path to the target config.yaml file. If None, the default config file is loaded.
hydra_args (tuple[str, Ellipsis]) – Arguments passed to hydra for composing the project configuration.
- Returns:
list of all the resolved configurations specified by the command arguments.
- Return type:
configs
- hydraclick.run._run_sequential(function, configs, num_shards=0)[source]#
Run the sweep sequentially.
- Parameters:
function (Callable[[omegaconf.DictConfig], Any])
configs (list[omegaconf.DictConfig])
num_shards (int)
- Return type:
int
- hydraclick.run._run_parallel(function, configs, num_shards=0)[source]#
Run the sweep sequentially.
- Parameters:
function (Callable[[omegaconf.DictConfig], Any])
configs (list[omegaconf.DictConfig])
num_shards (int)
- Return type:
int
- hydraclick.run.run_function(function, config_file=None, hydra_args=None, multirun=True, parallel=False, num_shards=0, only_config=False)[source]#
Run the function.
- Parameters:
function (Callable[[omegaconf.DictConfig], Any])
config_file (str | pathlib.Path | None)
hydra_args (tuple[str, Ellipsis] | None)
multirun (bool)
parallel (bool)
num_shards (int)
only_config (bool)
- Return type:
int