SIENTIAPDE-1579: Added date format and convert methods

This commit is contained in:
Kou Kinoshita
2026-02-13 18:41:46 -03:00
parent 9e3585afce
commit a4d94dd2ff
3 changed files with 59 additions and 21 deletions

View File

@@ -34,6 +34,8 @@ class TrainModelParams:
file_name (str): Name of the file in the MinIO bucket.
line_separator (str): Line separator used in the CSV file.
decimal_separator (str): Decimal separator used in the CSV file.
date_column (str | None): Name of the date/time column. If set with date_format, the column is parsed as datetime.
date_format (str | None): Format of the date column (e.g. dd/MM/yyyy HH:mm:ss). Used when date_column is set.
train_size (int): Percentage of data to use for training (0-100).
shuffle (bool): Whether to shuffle the data during train/test split.
experiment_run_id (int): Unique identifier for the experiment run.
@@ -64,6 +66,8 @@ class TrainModelParams:
file_name: str
line_separator: str
decimal_separator: str
date_column: str | None
date_format: str | None
train_size: int
shuffle: bool
experiment_run_id: int
@@ -120,6 +124,8 @@ class TrainModelParams:
decimal_separator=cls._check_none(
data.get('decimal_separator'), str, 'decimal_separator'
),
date_column=data.get('date_column'),
date_format=data.get('date_format'),
train_size=cls._check_none(data.get('train_size'), int, 'train_size'),
shuffle=cls._check_none(data.get('shuffle'), bool, 'shuffle'),
experiment_run_id=cls._check_none(