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

Picking columns to export CSV #260

Merged
merged 10 commits into from
Apr 12, 2024
7 changes: 6 additions & 1 deletion post-processing/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def run_post_processing(self, log_path, config):
print("")

df = pd.DataFrame()
df_csv_export = pd.DataFrame()
# put all perflog information in one dataframe
for file in log_files:
try:
Expand All @@ -73,7 +74,11 @@ def run_post_processing(self, log_path, config):
print("")
if df.empty:
raise FileNotFoundError(errno.ENOENT, "Could not find a valid perflog in path", log_path)

# specify columns to export from dataframe to csv
for col in config["csv_export"]:
df_csv_export = pd.concat([df_csv_export, df[col]], axis=1, join='outer')
if self.debug & self.verbose:
print(df_csv_export)
# get axis columns
columns = [config["x_axis"]["value"], config["y_axis"]["value"]]
if config["x_axis"]["units"].get("column"):
Expand Down
7 changes: 7 additions & 0 deletions post-processing/post_processing_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ column_types:
flops_unit: "str"
system: "str"
cpus_per_task: "int"

# Specify which columns to export to csv file
csv_export:
[tasks,
flops_value,
Triad_unit,
cpus_per_task]
Loading