utils
configs_from_arg_combinations(args, arg_list)
Generates a list of configurations from a list of arguments. Each configuration is one of a cartesian product of
the arguments provided and identified in arg_list
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
The arguments. |
required |
arg_list |
list[str]
|
The list of arguments to generate configurations from. |
required |
Returns:
Type | Description |
---|---|
list[dict[str, Any]]
|
A list of configurations. |
Source code in src/nhssynth/modules/model/utils.py
get_experiments(args)
Generates a dataframe of experiments from the arguments provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
The arguments. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A dataframe of experiments indexed by architecture, repeat and config ID. |
Source code in src/nhssynth/modules/model/utils.py
wrap_arg(arg)
Wraps a single argument in a list if it is not already a list or tuple.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
arg |
Any
|
The argument to wrap. |
required |
Returns:
Type | Description |
---|---|
Union[list, tuple]
|
The wrapped argument. |