Configs
TOC
Config
- class src.config.Config[source]
Bases:
NamedTuple- _asdict()
Return a new dict which maps field names to their values.
- _field_defaults = {}
- _fields = ()
- classmethod _make(iterable)
Make a new Config object from a sequence or iterable
- _replace(**kwds)
Return a new Config object replacing specified fields with new values
- data_models = ()
- logging = LoggingConfig(level='DEBUG')
- request = RequestConfig(endpoint_decision='', endpoint_taxonomy='', auth_type=<AuthType.NONE: 'none'>, username='', password='', max_retries=3, header={'accept': 'application/sparql-results+json,*/*;q=0.9'})
- run = ()
- sparql = SparqlConfig(testing_graph='<http://mu.semte.ch/application/probe/testing>', user_annotations_graph='<http://mu.semte.ch/application/probe/user-annotations>', probe_model_annotations_graph='<http://mu.semte.ch/application/probe/model-annotations>', model_information='<http://mu.semte.ch/application/probe/model-information>')
BaseConfig
- class src.config.base.Settings(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None)[source]
Bases:
BaseSettings- _abc_impl = <_abc._abc_data object>
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_nested_delimiter': None, 'env_prefix': '', 'extra': 'ignore', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
BencharmkConfig
- class src.config.benchmark.BenchmarkConfig(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, evaluation_type: str = 'multi', probe_model_class_type: str = '', dataset_type: str = '', zero_devision_default: float = 0.0)[source]
Bases:
Settings- _abc_impl = <_abc._abc_data object>
- dataset_type: str
- evaluation_type: str
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_nested_delimiter': None, 'env_prefix': 'benchmark_', 'extra': 'ignore', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dataset_type': FieldInfo(annotation=str, required=False, default=''), 'evaluation_type': FieldInfo(annotation=str, required=False, default='multi'), 'probe_model_class_type': FieldInfo(annotation=str, required=False, default=''), 'zero_devision_default': FieldInfo(annotation=float, required=False, default=0.0)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- probe_model_class_type: str
- zero_devision_default: float
LoggingConfig
- class src.config.logging.LoggingConfig(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, level: str = 'DEBUG')[source]
Bases:
Settings- _abc_impl = <_abc._abc_data object>
- level: str
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_nested_delimiter': None, 'env_prefix': 'logging_', 'extra': 'ignore', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'level': FieldInfo(annotation=str, required=False, default='DEBUG')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
RequestConfig
- class src.config.request.RequestConfig(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, endpoint_decision: str = '', endpoint_taxonomy: str = '', auth_type: AuthType = 'none', username: str = '', password: str = '', max_retries: int = 3, header: dict[str, str] = {'accept': 'application/sparql-results+json,*/*;q=0.9'})[source]
Bases:
Settings- _abc_impl = <_abc._abc_data object>
- endpoint_decision: str
- endpoint_taxonomy: str
- header: dict[str, str]
- max_retries: int
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': '.env', 'env_file_encoding': 'utf-8', 'env_nested_delimiter': None, 'env_prefix': 'request_', 'extra': 'ignore', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'auth_type': FieldInfo(annotation=AuthType, required=False, default='none'), 'endpoint_decision': FieldInfo(annotation=str, required=False, default=''), 'endpoint_taxonomy': FieldInfo(annotation=str, required=False, default=''), 'header': FieldInfo(annotation=dict[str, str], required=False, default={'accept': 'application/sparql-results+json,*/*;q=0.9'}), 'max_retries': FieldInfo(annotation=int, required=False, default=3), 'password': FieldInfo(annotation=str, required=False, default=''), 'username': FieldInfo(annotation=str, required=False, default='')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- password: str
- username: str