File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ def filter_generalizability_force_field_results(
8080
8181 if v is not None :
8282 if normalize :
83- v = v / std
83+ v = np .min (
84+ [v / std , 1 ]
85+ ) # cap the normalized value to 1, for models worese than a dummy baseline, use dummy baseline.
8486 filtered_metrics [k ] = np .log (v ) * weight
8587 # else the filtered_metrics will not have this key.
8688 # Metrics with weight != None should have a value,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def test_aggregate_ood_results_for_one_model(
1515 aggregator = ResultsFetcher ()
1616 result = aggregator .aggregate_ood_results_for_one_model (model = model )
1717 np .testing .assert_almost_equal (result ["Small Molecules" ], 0.19745455 , decimal = 5 )
18- np .testing .assert_almost_equal (result ["Inorganic Materials" ], 0.3179398 , decimal = 5 )
18+ np .testing .assert_almost_equal (result ["Inorganic Materials" ], 0.283787 , decimal = 5 )
1919 assert result ["Catalysis" ] is None
2020 with caplog .at_level (logging .WARNING ):
2121 assert (
You can’t perform that action at this time.
0 commit comments