mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-23 15:58:08 +00:00
feat(Config): added flag to save models
This commit is contained in:
@@ -32,4 +32,5 @@ def get_default_config() -> RawConfig:
|
|||||||
event_filter="cusum_fixed",
|
event_filter="cusum_fixed",
|
||||||
labeling="two_class",
|
labeling="two_class",
|
||||||
forecasting_horizon=50,
|
forecasting_horizon=50,
|
||||||
|
save_models=False,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class RawConfig(BaseModel):
|
|||||||
event_filter: Literal["none", "cusum_vol", "cusum_fixed"]
|
event_filter: Literal["none", "cusum_vol", "cusum_fixed"]
|
||||||
labeling: Literal["two_class", "three_class_balanced", "three_class_imbalanced"]
|
labeling: Literal["two_class", "three_class_balanced", "three_class_imbalanced"]
|
||||||
forecasting_horizon: int
|
forecasting_horizon: int
|
||||||
|
save_models: bool
|
||||||
|
|
||||||
directional_models: list[str]
|
directional_models: list[str]
|
||||||
meta_models: list[str]
|
meta_models: list[str]
|
||||||
@@ -50,6 +51,7 @@ class Config:
|
|||||||
labeling: EventLabeller
|
labeling: EventLabeller
|
||||||
forecasting_horizon: int
|
forecasting_horizon: int
|
||||||
no_of_classes: Literal["two", "three-balanced", "three-imbalanced"]
|
no_of_classes: Literal["two", "three-balanced", "three-imbalanced"]
|
||||||
|
save_models: bool
|
||||||
|
|
||||||
mode: Literal["training", "inference"]
|
mode: Literal["training", "inference"]
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,8 @@ def run_pipeline(
|
|||||||
wandb,
|
wandb,
|
||||||
sweep,
|
sweep,
|
||||||
)
|
)
|
||||||
save_models(pipeline_outcome, config)
|
if config.save_models:
|
||||||
|
save_models(pipeline_outcome, config)
|
||||||
return pipeline_outcome, config
|
return pipeline_outcome, config
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user