Skip to content

Commit

Permalink
cast list to str
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed Sep 14, 2024
1 parent ea39d1c commit 17d3d44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/graphnet/data/curated_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ def _prepare_args(
"""
if backend == "sqlite":
dataset_path = glob(os.path.join(self.dataset_dir, "*.db"))
# Cast from list to string if just 1 path
if isinstance(dataset_path, list) & len(dataset_path) == 1:
dataset_path: str = dataset_path[0] # type: ignore

if self._mode == "train":
train_val = pd.read_parquet(
os.path.join(
Expand Down

0 comments on commit 17d3d44

Please sign in to comment.