Skip to content

Commit

Permalink
Add simple report based printer ramble results report --table 'Nanose…
Browse files Browse the repository at this point in the history
…conds per day' n_nodes partition -n -f ~/Downloads/results.latest.json --pandas-where 'fom_name == 'Nanoseconds per day'
  • Loading branch information
rfbgo committed Jan 21, 2025
1 parent f74a69c commit ddc937b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ramble/ramble/cmd/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ def setup_parser(subparser):
help="generate a FOM report, showing values of FOMs for each experiment",
required=False,
)
plot_type_group.add_argument(
"--table",
dest="table",
nargs="+",
help="generate a text representation of the output",
required=False,
)
report_parser.add_argument(
"--pandas-where",
dest="where",
Expand Down
16 changes: 16 additions & 0 deletions lib/ramble/ramble/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class PlotFactory:

def determine_plot_type(self, args):
plot_types = [
(args.table, TableOutput),
(args.strong_scaling, StrongScalingPlot),
(args.weak_scaling, WeakScalingPlot),
(args.compare, ComparisonPlot),
Expand Down Expand Up @@ -884,6 +885,21 @@ def generate_plot_data(self, pdf_report):
self.draw_multiline(perf_measure, scale_var, pdf_report, y_label)


class TableOutput(PlotGenerator):
plot_type = "table"

def generate_plot_data(self, pdf_report):
print(self.results_df.columns)
print(self.results_df)
print(self.spec)
#df[df.columns.intersection(set(['list', 'of', 'cols']))]
df = self.results_df[self.results_df.columns & self.spec + ['fom_name', 'fom_value'] ]
#df.style.hide()
print(df.to_string(index=False))
#print(df)
print(df.T)


def get_reports_path():
"""Returns current directory of ramble-created reports"""
path_in_config = ramble.config.get("config:report_dirs")
Expand Down

0 comments on commit ddc937b

Please sign in to comment.