Skip to content

Commit

Permalink
Avoid "0.41000000000000003" GB of memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaarsen committed Jul 29, 2024
1 parent 2e647d9 commit 578a44d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,8 @@ def load_results(data_path: str) -> list | dict | pd.DataFrame | str | None:
df = pd.read_json(data_path, orient="records", lines=True)
if "index" in df.columns:
df = df.set_index("index")
if "Memory Usage (GB, fp32)" in df.columns:
df["Memory Usage (GB, fp32)"] = df["Memory Usage (GB, fp32)"].map(lambda value: round(value, 2) if isinstance(value, float) else value)
return df

else:
Expand Down

0 comments on commit 578a44d

Please sign in to comment.