Skip to content

Commit

Permalink
Adjust pbar display
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Sep 17, 2024
1 parent c2654fb commit 9ad41bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions notebooks_jason/wandb_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
# %%
def bytes_to_str(size: float) -> str:
if size < 1024:
return f"{size:.2f} B"
return f"{size} B"
size /= 1024
if size < 1024:
return f"{size:.4f} KB"
return f"{size} KB"
size /= 1024
if size < 1024:
return f"{size:.8f} MB"
return f"{size} MB"
size /= 1024
return f"{size:.16f} GB"
return f"{size} GB"


# %%
Expand Down

0 comments on commit 9ad41bc

Please sign in to comment.