Skip to content

Commit 64e97af

Browse files
committed
fix CaptionedMetricsTable proprietary models toggle
1 parent a4f8e30 commit 64e97af

8 files changed

+797
-699
lines changed

matbench_discovery/preds.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class PredFiles(Files):
6161
# alignn_pretrained = "alignn/2023-06-03-mp-e-form-alignn-wbm-IS2RE.csv.gz"
6262
# alignn_ff = "alignn_ff/2023-07-11-alignn-ff-wbm-IS2RE.csv.gz"
6363

64-
# gnome = "gnome/2023-11-01-gnome-preds-50076332.csv.gz"
64+
gnome = "gnome/2023-11-01-gnome-preds-50076332.csv.gz"
6565

6666

6767
# key_map maps model keys to pretty labels

scripts/model_figs/make_metrics_tables.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
from pymatviz.utils import si_fmt
1515
from sklearn.dummy import DummyClassifier
1616

17-
from matbench_discovery import PDF_FIGS, SCRIPTS, SITE_FIGS, Key, Open
17+
from matbench_discovery import PDF_FIGS, SCRIPTS, SITE_FIGS
1818
from matbench_discovery.data import DATA_FILES, df_wbm
19+
from matbench_discovery.enums import Key, Model, Open
1920
from matbench_discovery.metrics import stable_metrics
2021
from matbench_discovery.models import MODEL_METADATA
2122
from matbench_discovery.preds import df_metrics, df_metrics_10k, df_metrics_uniq_protos
@@ -159,9 +160,11 @@
159160
lower_is_better, " ↓"
160161
)
161162
styler.relabel_index(
162-
[f"{col}{arrow_suffix.get(col, '')}" for col in df_table],
163-
axis="columns",
164-
)
163+
[f"{col}{arrow_suffix.get(col, '')}" for col in df_table], axis="columns"
164+
).set_uuid("")
165+
166+
# add CSS class 'proprietary' to cells of proprietary models (openness != OSOD)
167+
styler.set_td_classes(df_table.T.assign(GNoME="proprietary")[[Model.gnome]].T)
165168

166169
# export model metrics as styled HTML table and Svelte component
167170
# get index of MAE column

scripts/model_figs/run_all.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
go.Figure.show = lambda *_args, **_kwargs: None
2323
Dash.run = lambda *_args, **_kwargs: None
2424

25-
# subtract __file__ to avoid this file calling itself
25+
# subtract __file__ to prevent this file from calling itself
2626
scripts = set(glob(f"{module_dir}/*.py")) - {__file__}
2727

2828

0 commit comments

Comments
 (0)