Skip to content

Commit

Permalink
Instead of new axis, pick the columns to export from dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanolgu committed Feb 1, 2024
1 parent a53430b commit 438be02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
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]

0 comments on commit 438be02

Please sign in to comment.