myco.config¶
Stores configuration defaults for e.g. model architectures based on yaml file inputs
ArchitectureConfig
¶
Bases: dict
Stores architecture parameters for deep learning models
Source code in myco/config/__init__.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
__init__(config)
¶
Creates the architecture configuration object.
Assumes that there's a one-level nesting of the configuration options, and all "architecture" attributes will be stored as attributes in the output ArchitectureConfig object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
Union[dict, str]
|
the configuration options to pass to this object. If it's a string, it assumes a path to a yaml file. If it's a dictionary, it assumes the config was already read. |
required |
Returns:
Type | Description |
---|---|
ArchitectureConfig object with the yaml config options available as object attributes (so, config.block_structure) |
Source code in myco/config/__init__.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
SamplingConfig
¶
Bases: dict
Stores data processing parameters for sample drawing
Source code in myco/config/__init__.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
__init__(config)
¶
Creates the dataset configuration object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
Union[dict, str]
|
the configuration options to pass to this object. If it's a string, it assumes a path to a yaml file. If it's a dictionary, it assumes the config was already read. |
required |
Returns:
Type | Description |
---|---|
DatasetConfig object with the yaml config options available as object attributes (so, config.nodata) |
Source code in myco/config/__init__.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
get_best_model_path(model_path)
¶
Constructs a file path to the best model output from an input model filepath.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_path |
str
|
file path to the default model path. |
required |
Returns:
Name | Type | Description |
---|---|---|
best_model_path |
str
|
uses |
Source code in myco/config/__init__.py
140 141 142 143 144 145 146 147 148 149 150 151 |
|
get_model_config_names()
¶
Return a list of valid model configuration names.
Source code in myco/config/__init__.py
122 123 124 |
|
get_model_config_path(name)
¶
Return the path to the default model configuration for a model type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
the model configuration type. Get available options from get_model_config_names(). |
required |
Returns:
Type | Description |
---|---|
dict
|
Default model training parameters as a dictionary. |
Source code in myco/config/__init__.py
127 128 129 130 131 132 133 134 135 136 137 |
|