Skip to content

Commit

Permalink
Add even more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
talsperre committed Jan 11, 2025
1 parent ec2b43c commit a5f57ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions metaflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,16 +1233,18 @@ 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,
len(self.metadata_dict.get("foreach-stack", [])),
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:
Expand All @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions metaflow/plugins/metadata_providers/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit a5f57ff

Please sign in to comment.