Skip to content

Commit

Permalink
Merge pull request #524 from Proteobench/dummy
Browse files Browse the repository at this point in the history
Remove need for dummy point
  • Loading branch information
RobbinBouwmeester authored Jan 10, 2025
2 parents 7cdceb0 + 9cd9349 commit 9a4379e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proteobench/modules/quant/quant_base/quant_base_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def filter_data_point(all_datapoints: pd.DataFrame, default_val_slider: int = 3)
pd.DataFrame
A DataFrame containing the filtered data points.
"""
if len(all_datapoints) == 0:
return all_datapoints

all_datapoints["median_abs_epsilon"] = [
filter_df_numquant_epsilon(v, min_quant=default_val_slider) for v in all_datapoints["results"]
]
Expand Down
7 changes: 7 additions & 0 deletions webinterface/pages/base_pages/quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def display_submitted_results(self) -> None:
key="placeholder2", # TODO: add to variables
)

if len(data_points_filtered) == 0:
st.error(f"No datapoints available for plotting", icon="🚨")

try:
fig_metric = PlotDataPoint.plot_metric(
data_points_filtered,
Expand Down Expand Up @@ -351,6 +354,10 @@ def generate_submitted_slider(self) -> None:

def display_download_section(self, reset_uuid=False) -> None:
"""Render the selector and area for raw data download."""
if len(st.session_state[self.variables_quant.all_datapoints]) == 0:
st.error("No data available for download.", icon="🚨")
return

downloads_df = st.session_state[self.variables_quant.all_datapoints][["id", "intermediate_hash"]]
downloads_df.set_index("intermediate_hash", drop=False, inplace=True)

Expand Down

0 comments on commit 9a4379e

Please sign in to comment.