Skip to content

Commit

Permalink
Prevent duplicating group_logs from experiments entrypoint (#511)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgeny Pavlov <[email protected]>
  • Loading branch information
vrigal and eu9ene authored Apr 3, 2024
1 parent f49e9c3 commit 48176f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tracking/translations_parser/cli/taskcluster_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,6 @@ def publish_task_group(group_id: str, override: bool = False) -> None:
)

# Group and publish remaining metrics tasks via the logs publication
if (
len(
wandb.Api().runs(
project_name, filters={"display_name": "group_logs", "group": group_name}
)
)
> 0
):
logger.warning("Skipping group_logs fake run publication as it already exists")
return
with tempfile.TemporaryDirectory() as temp_dir:
logs_folder = Path(temp_dir) / "logs"
eval_folder = logs_folder / project_name / group_name / "eval"
Expand Down
7 changes: 7 additions & 0 deletions tracking/translations_parser/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ def publish_group_logs(
"""
from translations_parser.parser import TrainingParser

if (
len(wandb.Api().runs(project, filters={"display_name": "group_logs", "group": group}))
> 0
):
logger.warning("Skipping group_logs fake run publication as it already exists")
return

logs_dir = Path("/".join([*logs_parent_folder[:-1], "logs", project, group]))
# Old experiments use `speed` directory for quantized metrics
quantized_metrics = sorted(
Expand Down

0 comments on commit 48176f6

Please sign in to comment.