nannyml.config module
- class nannyml.config.CalculatorConfig(*, type: str, name: Optional[str] = None, enabled: Optional[bool] = True, outputs: Optional[List[WriterConfig]] = None, store: Optional[StoreConfig] = None, params: Dict[str, Any])[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- enabled: Optional[bool]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'enabled': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'outputs': FieldInfo(annotation=Union[List[nannyml.config.WriterConfig], NoneType], required=False, default=None), 'params': FieldInfo(annotation=Dict[str, Any], required=True), 'store': FieldInfo(annotation=Union[StoreConfig, NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- name: Optional[str]
- outputs: Optional[List[WriterConfig]]
- params: Dict[str, Any]
- store: Optional[StoreConfig]
- type: str
- class nannyml.config.Config(*, input: Optional[InputConfig] = None, calculators: List[CalculatorConfig], scheduling: Optional[SchedulingConfig] = None, ignore_errors: Optional[bool] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- calculators: List[CalculatorConfig]
- ignore_errors: Optional[bool]
- input: Optional[InputConfig]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'calculators': FieldInfo(annotation=List[nannyml.config.CalculatorConfig], required=True), 'ignore_errors': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'input': FieldInfo(annotation=Union[InputConfig, NoneType], required=False, default=None), 'scheduling': FieldInfo(annotation=Union[SchedulingConfig, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- scheduling: Optional[SchedulingConfig]
- class nannyml.config.CronSchedulingConfig(*, crontab: str)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- crontab: str
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'crontab': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class nannyml.config.InputConfig(*, reference_data: InputDataConfig, analysis_data: InputDataConfig, target_data: Optional[TargetDataConfig] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- analysis_data: InputDataConfig
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'analysis_data': FieldInfo(annotation=InputDataConfig, required=True), 'reference_data': FieldInfo(annotation=InputDataConfig, required=True), 'target_data': FieldInfo(annotation=Union[TargetDataConfig, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- reference_data: InputDataConfig
- target_data: Optional[TargetDataConfig]
- class nannyml.config.InputDataConfig(*, path: str, credentials: Optional[Dict[str, Any]] = None, read_args: Optional[Dict[str, Any]] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- credentials: Optional[Dict[str, Any]]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'credentials': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'path': FieldInfo(annotation=str, required=True), 'read_args': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- path: str
- read_args: Optional[Dict[str, Any]]
- class nannyml.config.IntervalSchedulingConfig(*, weeks: Optional[int] = None, days: Optional[int] = None, hours: Optional[int] = None, minutes: Optional[int] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- days: Optional[int]
- hours: Optional[int]
- minutes: Optional[int]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'days': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'hours': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'minutes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'weeks': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- weeks: Optional[int]
- class nannyml.config.SchedulingConfig(*, interval: Optional[IntervalSchedulingConfig] = None, cron: Optional[CronSchedulingConfig] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- cron: Optional[CronSchedulingConfig]
- interval: Optional[IntervalSchedulingConfig]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'cron': FieldInfo(annotation=Union[CronSchedulingConfig, NoneType], required=False, default=None), 'interval': FieldInfo(annotation=Union[IntervalSchedulingConfig, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class nannyml.config.StoreConfig(*, path: str, credentials: Optional[Dict[str, Any]] = None, filename: Optional[str] = None, invalidate: bool = False)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- credentials: Optional[Dict[str, Any]]
- filename: Optional[str]
- invalidate: bool
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'credentials': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'filename': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'invalidate': FieldInfo(annotation=bool, required=False, default=False), 'path': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- path: str
- class nannyml.config.TargetDataConfig(*, path: str, credentials: Optional[Dict[str, Any]] = None, read_args: Optional[Dict[str, Any]] = None, join_column: Optional[str] = None)[source]
Bases:
InputDataConfig
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- join_column: Optional[str]
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'credentials': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'join_column': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'path': FieldInfo(annotation=str, required=True), 'read_args': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class nannyml.config.WriterConfig(*, type: str, params: Optional[Dict[str, Any]] = None, write_args: Optional[Dict[str, Any]] = None)[source]
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'params': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'type': FieldInfo(annotation=str, required=True), 'write_args': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- params: Optional[Dict[str, Any]]
- type: str
- write_args: Optional[Dict[str, Any]]