From 746fba5da36f4d77d164fb78c23c626997d9dde7 Mon Sep 17 00:00:00 2001 From: ANNMARY JUSTINE Date: Fri, 30 Aug 2024 09:23:28 -0600 Subject: [PATCH] added the changes for regression (#206) --- cmflib/cmf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmflib/cmf.py b/cmflib/cmf.py index 9690c230..ced11eb4 100644 --- a/cmflib/cmf.py +++ b/cmflib/cmf.py @@ -1498,7 +1498,7 @@ def commit_metrics(self, metrics_name: str): assert self.execution is not None, f"Failed to create execution for {self.pipeline_name}!!" - directory_path = os.path.join(ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], METRICS_PATH) + directory_path = os.path.join(self.ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], self.METRICS_PATH) os.makedirs(directory_path, exist_ok=True) metrics_df = pd.DataFrame.from_dict( self.metrics[metrics_name], orient="index") @@ -1724,7 +1724,7 @@ def create_dataslice(self, name: str) -> "Cmf.DataSlice": def read_dataslice(self, name: str) -> pd.DataFrame: """Reads the dataslice""" # To do checkout if not there - directory_path = os.path.join(ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], DATASLICE_PATH) + directory_path = os.path.join(self.ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], self.DATASLICE_PATH) name = os.path.join(directory_path, name) df = pd.read_parquet(name) return df @@ -1746,7 +1746,7 @@ def update_dataslice(self, name: str, record: str, custom_properties: t.Dict): Returns: None """ - directory_path = os.path.join(ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], DATASLICE_PATH) + directory_path = os.path.join(self.ARTIFACTS_PATH, self.execution.properties["Execution_uuid"].string_value.split(',')[0], self.DATASLICE_PATH) name = os.path.join(directory_path, name) df = pd.read_parquet(name) temp_dict = df.to_dict("index")