Configuration
Parse environmental and configuration variables
YAMLParser
Bases: BaseModel
Abstract class on top of BaseModel with functionality to parse config from a yaml file
Source code in src/variables.py
parse_yaml(file_path, encoding='utf-8')
classmethod
Parse and validate arguments from a YAML file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path |
(str, Path)
|
relative path to the yaml file |
required |
encoding |
str
|
encoding to use when opening the file |
'utf-8'
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
TrainConfig
|
validated model |
Source code in src/variables.py
ClientConfig
Bases: BaseModel
Settings for the aiohttp client
Source code in src/variables.py
PredictorConfig
Bases: BaseModel
Settings for a single predictor
Source code in src/variables.py
predict_url
property
Infer and return model url based on its config
EncoderConfig
Bases: PredictorConfig
Settings for a single encoder network
RemoveAllKeysConfig
Bases: BaseModel
Config for removing items from predictions dictionary when condition is present
Source code in src/variables.py
RenameKeyConfig
Bases: BaseModel
Config for renaming items from predictions dictionary when condition is present
Source code in src/variables.py
RemoveSpecifiedKeysConfig
Bases: BaseModel
Config for removing specific keys from the prediction dictionary if the condition is present
Source code in src/variables.py
KeepOnlyByConditionsConfig
Bases: BaseModel
Config for keeping certain classes only if any of the conditions is present
Source code in src/variables.py
PostprocessingConfig
Bases: BaseModel
Configuration to postprocess the output of a Classifier
Source code in src/variables.py
ClassifierConfig
Bases: PredictorConfig
Settings for a single servable network
Source code in src/variables.py
__init__(**kwargs)
initialize the config & create a default threshold dictionary to use when extracting tags
Source code in src/variables.py
ServiceConfig
Bases: YAMLParser
Settings for the whole service consisting of several networks