-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Wrap perf benchmarks with no_grad (#2466)
- Loading branch information
Showing
3 changed files
with
122 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import glob | ||
|
||
import pandas as pd | ||
|
||
|
||
def concat_all_results(outputs_filename="all_outputs.csv", files_regex="*_bs*.csv"): | ||
"""Concatenates all files via regex to an output file""" | ||
candidate_files = glob.glob(files_regex) | ||
|
||
if candidate_files: | ||
df = pd.concat( | ||
[pd.read_csv(file_name, index_col=0) for file_name in candidate_files] | ||
).reset_index(drop=True) | ||
df.to_csv(outputs_filename) | ||
print(f"Saved concatenated outputs to {outputs_filename}") | ||
|
||
else: | ||
print(f"No outputs to generate {outputs_filename}") | ||
|
||
|
||
if __name__ == "__main__": | ||
concat_all_results() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters