Utilities¶
These packages provide experiment setup and deployment helpers.
cli
¶
Utilities for commandline usage of experiments.
This module provides common utilities for commandline usage of experiments. It is intended to be used as a library for writing commandline interfaces for experiments.
Functions:¶
initialize
¶
Initialize the experiment environment.
Loads the configuration and sets up logging according to its settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Additional configuration overrides. |
{}
|
Returns:
| Type | Description |
|---|---|
DictConfig | ListConfig
|
The initialized configuration object. |
utils
¶
build_environments_from_directory
¶
build_environments_from_directory(path: Path | str, builder: EnvironmentBuilder, *, pattern: str = '*', include_files: bool = True, include_folders: bool = True) -> Iterable[OfflineEnvironment]
Build environments from a directory.
This helper function can be used to build environments from multiple files
or folders. First all files and folders in the path matching the
pattern are selected. These are then passed to the builder function
which creates the environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
The path to the directory from which environments are created. |
required |
builder
|
EnvironmentBuilder
|
A function building an environment from a path and returning it. |
required |
pattern
|
str
|
A glob pattern. Matching files and folders will be passed to
|
'*'
|
include_files
|
bool
|
Specify whether to pass files to |
True
|
include_folders
|
bool
|
Specify whether to pass folders to |
True
|