diff --git a/ocpmodels/datasets/lmdb_dataset.py b/ocpmodels/datasets/lmdb_dataset.py index 8dd195328d..c07ae1773a 100644 --- a/ocpmodels/datasets/lmdb_dataset.py +++ b/ocpmodels/datasets/lmdb_dataset.py @@ -107,7 +107,7 @@ def filter_per_adsorbates(self): return # val_ood_ads and val_ood_both don't have targeted adsorbates - if self.config["src"].split("/")[-2] in {"val_ood_ads", "val_ood_both"}: + if Path(self.config["src"]).parts[-1] in {"val_ood_ads", "val_ood_both"}: return # make set of adsorbates from a list or a string. If a string, split on comma.