Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[benchmark] Results will now be appended to the results file #94

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hatlib/benchmark_hat_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import argparse
from dataclasses import dataclass
import os
from typing import Callable, List
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -327,7 +328,7 @@ def main(argv):
time_in_ms=args["time_in_ms"],
functions=args["functions"])
df = pd.DataFrame(results)
df.to_csv(args["results_file"], index=False)
df.to_csv(args["results_file"], index=False, mode='a', header=not os.path.exists(args["results_file"]))
pd.options.display.float_format = '{:8.8f}'.format
print(df)

Expand Down