feat(Config): added flag to save models

This commit is contained in:
Mark Aron Szulyovszky
2022-02-19 15:06:05 +01:00
parent 77206a5d0a
commit 7db1c4dc00
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -32,4 +32,5 @@ def get_default_config() -> RawConfig:
event_filter="cusum_fixed",
labeling="two_class",
forecasting_horizon=50,
save_models=False,
)
+2
View File
@@ -28,6 +28,7 @@ class RawConfig(BaseModel):
event_filter: Literal["none", "cusum_vol", "cusum_fixed"]
labeling: Literal["two_class", "three_class_balanced", "three_class_imbalanced"]
forecasting_horizon: int
save_models: bool
directional_models: list[str]
meta_models: list[str]
@@ -50,6 +51,7 @@ class Config:
labeling: EventLabeller
forecasting_horizon: int
no_of_classes: Literal["two", "three-balanced", "three-imbalanced"]
save_models: bool
mode: Literal["training", "inference"]
+2 -1
View File
@@ -35,7 +35,8 @@ def run_pipeline(
wandb,
sweep,
)
save_models(pipeline_outcome, config)
if config.save_models:
save_models(pipeline_outcome, config)
return pipeline_outcome, config