Skip to content

Commit

Permalink
added the changes for regression (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
annmary-roy authored Aug 30, 2024
1 parent 0269f34 commit 746fba5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmflib/cmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 746fba5

Please sign in to comment.