nannyml.config module

class nannyml.config.ChunkerConfig(*, chunk_size: int | None = None, chunk_period: str | None = None, chunk_count: int | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

chunk_count: int | None
chunk_period: str | None
chunk_size: int | None
class nannyml.config.ColumnMapping(*, features: List[str], timestamp: str, y_pred: str, y_pred_proba: str | Dict[str, str] | None = None, y_true: str)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

features: List[str]
timestamp: str
y_pred: str
y_pred_proba: str | Dict[str, str] | None
y_true: str
class nannyml.config.Config(*, input: InputConfig, output: WriterConfig, column_mapping: ColumnMapping, chunker: ChunkerConfig | None = None, scheduling: SchedulingConfig | None = None, store: StoreConfig | None = None, problem_type: str, ignore_errors: bool | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

chunker: ChunkerConfig | None
column_mapping: ColumnMapping
ignore_errors: bool | None
input: InputConfig
classmethod load(config_path: str | None = None)[source]
output: WriterConfig
problem_type: str
scheduling: SchedulingConfig | None
store: StoreConfig | None
class nannyml.config.CronSchedulingConfig(*, crontab: str)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

crontab: str
class nannyml.config.DatabaseWriterConfig(*, connection_string: str, model_name: str | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

connection_string: str
model_name: str | None
class nannyml.config.FileStoreConfig(*, path: str)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

path: str
class nannyml.config.InputConfig(*, reference_data: InputDataConfig, analysis_data: InputDataConfig, target_data: TargetDataConfig | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

analysis_data: InputDataConfig
reference_data: InputDataConfig
target_data: TargetDataConfig | None
class nannyml.config.InputDataConfig(*, path: str, credentials: Dict[str, Any] | None = None, read_args: Dict[str, Any] | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

credentials: Dict[str, Any] | None
path: str
read_args: Dict[str, Any] | None
class nannyml.config.IntervalSchedulingConfig(*, weeks: int | None = None, days: int | None = None, hours: int | None = None, minutes: int | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

days: int | None
hours: int | None
minutes: int | None
weeks: int | None
class nannyml.config.PickleWriterConfig(*, path: str, credentials: Dict[str, Any] | None = None, write_args: Dict[str, Any] | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

credentials: Dict[str, Any] | None
path: str
write_args: Dict[str, Any] | None
class nannyml.config.RawFileWriterConfig(*, path: str, format: str = 'parquet', credentials: Dict[str, Any] | None = None, write_args: Dict[str, Any] | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

credentials: Dict[str, Any] | None
format: str
path: str
write_args: Dict[str, Any] | None
class nannyml.config.SchedulingConfig(*, interval: IntervalSchedulingConfig | None = None, cron: CronSchedulingConfig | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

cron: CronSchedulingConfig | None
interval: IntervalSchedulingConfig | None
class nannyml.config.StoreConfig(*, file: FileStoreConfig | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

file: FileStoreConfig | None
class nannyml.config.TargetDataConfig(*, path: str, credentials: Dict[str, Any] | None = None, read_args: Dict[str, Any] | None = None, join_column: str | None = None)[source]

Bases: InputDataConfig

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

join_column: str | None
class nannyml.config.WriterConfig(*, database: DatabaseWriterConfig | None = None, raw_files: RawFileWriterConfig | None = None, pickle: PickleWriterConfig | None = None)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

database: DatabaseWriterConfig | None
pickle: PickleWriterConfig | None
raw_files: RawFileWriterConfig | None
nannyml.config.get_config_path(custom_config_path: str | None = None) Path[source]