fix: refactor Bench (#302)

* refactor for better bench

* autolint

* add cmd

* lint
This commit is contained in:
you-n-g
2024-09-23 19:53:05 +08:00
committed by GitHub
parent 4ae7e6db19
commit 444ded9a5d
6 changed files with 53 additions and 23 deletions
@@ -31,13 +31,15 @@ class FactorTask(Task):
factor_implementation: bool = False,
**kwargs,
) -> None:
self.factor_name = factor_name
self.factor_name = (
factor_name # TODO: remove it in the later version. Keep it only for pickle version compatibility
)
self.factor_description = factor_description
self.factor_formulation = factor_formulation
self.variables = variables
self.factor_resources = resource
self.factor_implementation = factor_implementation
super().__init__(*args, **kwargs)
super().__init__(name=factor_name, *args, **kwargs)
def get_task_information(self):
return f"""factor_name: {self.factor_name}
@@ -23,14 +23,13 @@ class ModelTask(Task):
model_type: Optional[str] = None,
**kwargs,
) -> None:
self.name: str = name
self.description: str = description
self.formulation: str = formulation
self.architecture: str = architecture
self.variables: str = variables
self.hyperparameters: str = hyperparameters
self.model_type: str = model_type # Tabular for tabular model, TimesSeries for time series model, Graph for graph model, XGBoost for XGBoost model
super().__init__(*args, **kwargs)
super().__init__(name=name, *args, **kwargs)
def get_task_information(self):
task_desc = f"""name: {self.name}