From a5f57ff04f829016a96c309c72399161ace4f84e Mon Sep 17 00:00:00 2001 From: Shashank Srikanth Date: Fri, 10 Jan 2025 16:12:29 -0800 Subject: [PATCH] Add even more logs --- metaflow/client/core.py | 5 +++-- metaflow/plugins/metadata_providers/local.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/metaflow/client/core.py b/metaflow/client/core.py index 6935c3027f..1c0326170a 100644 --- a/metaflow/client/core.py +++ b/metaflow/client/core.py @@ -1233,6 +1233,8 @@ def _get_related_tasks(self, relation_type: str) -> Dict[str, List[str]]: if not steps: return {} + print("-" * 50) + print(f"Getting related tasks for {relation_type} and path {self.path_components} and query steps {steps}") field_name, field_value = self._get_metadata_query_vals( flow_id, run_id, @@ -1240,9 +1242,9 @@ def _get_related_tasks(self, relation_type: str) -> Dict[str, List[str]]: steps, relation_type, ) + print(f"fetched field_name: {field_name} and field_value: {field_value}") cur_time = time.time() - print(f"Time taken to get metadata query vals: {cur_time - start_time:.2f}s") tp = {} for step in steps: @@ -1253,7 +1255,6 @@ def _get_related_tasks(self, relation_type: str) -> Dict[str, List[str]]: ) ] cur_time = time.time() - print(f"Time taken to get related tasks for step {step}: {cur_time - start_time:.2f}s") return tp # return { diff --git a/metaflow/plugins/metadata_providers/local.py b/metaflow/plugins/metadata_providers/local.py index e2280594bd..6553595047 100644 --- a/metaflow/plugins/metadata_providers/local.py +++ b/metaflow/plugins/metadata_providers/local.py @@ -292,7 +292,7 @@ def _read_metadata_value(file_path: str) -> dict: flow_id, run_id, query_step, task_id ) print(f"Meta path: {meta_path}") - print(f"Field name prefix: {field_name_prefix}") + print(f"Field name prefix: {field_name_prefix}, field value: {field_value}") print(f"Files in meta path: {os.listdir(meta_path)}") latest_file = _get_latest_metadata_file(meta_path, field_name_prefix) @@ -303,7 +303,6 @@ def _read_metadata_value(file_path: str) -> dict: # Read metadata and check value metadata = _read_metadata_value(latest_file[0]) print(f"Metadata: {metadata}") - print("-" * 50) if metadata.get("value") == field_value: filtered_task_ids.append(task_id)