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

Website: show total number of (filtered) benchmarks #80

Merged
merged 6 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion website/components/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ def display_filter_status(df, metadata_df):
total_benchmarks = len(metadata_df["Benchmark Name"].unique())
active_benchmarks = len(df["Benchmark"].unique())

filters_active = total_benchmarks != active_benchmarks

with st.sidebar:
if total_benchmarks != active_benchmarks:
if filters_active:
st.write(
f"### Filters are active; showing {active_benchmarks}/{total_benchmarks} benchmarks."
)
else:
st.write("### Showing all benchmarks")

return filters_active
11 changes: 8 additions & 3 deletions website/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
df = filter_data(df, filtered_metadata)

# Filter status
display_filter_status(df, filtered_metadata)
filters_active = display_filter_status(df, filtered_metadata)


def combine_sgm_tables(df):
Expand Down Expand Up @@ -187,11 +187,16 @@ def combine_sgm_tables(df):
if not df.empty:
# Generate the Combined Table
sgm_combined_df = combine_sgm_tables(df)

sizes_count = len(df[["Benchmark", "Size"]].drop_duplicates())
# Display the Combined Table
st.subheader("Results")
st.table(sgm_combined_df)

filter_label = "**filtered**" if filters_active else ""
st.write(
f"Solved benchmarks is the number of benchmarks where the solver returns an ok status, out of {sizes_count} {filter_label} benchmarks"
)

st.table(sgm_combined_df)

# Render scatter plot
render_benchmark_scatter_plot(df, metadata, key="home_scatter_plot")
Loading