Skip to content

Commit

Permalink
Sort after sample
Browse files Browse the repository at this point in the history
  • Loading branch information
dsblank committed Oct 9, 2024
1 parent 12c8bde commit 39cb09a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cometx/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ def log_tensorboard_folder_assets(workspace, project_name, full_path):
{"value": value, "step": step, "wall_time": wall_time}
)
if len(data) > 15_000:
data = random.sample(data, 15_000)
data = sorted(
random.sample(data, 15_000),
key=lambda item: item["step"],
)
for row in data:
experiment.log_metric(
f"{subdir}/{metric_name}",
Expand Down

0 comments on commit 39cb09a

Please sign in to comment.