diff --git a/opf/_eval/data.py b/opf/_eval/data.py index a15d0f4..fc241b1 100644 --- a/opf/_eval/data.py +++ b/opf/_eval/data.py @@ -75,7 +75,7 @@ def iter_json_records(dataset_path: str) -> Iterator[Mapping[str, object]]: raise ValueError("Dataset path must be local filesystem only (no URI schemes).") if "*" in dataset_path: file_paths = sorted(glob.glob(dataset_path)) - elif os.path.exists(dataset_path): + elif os.path.isfile(dataset_path): file_paths = [dataset_path] else: file_paths = sorted(glob.glob(f"{dataset_path.rstrip('/')}/*.gz"))