Unverified Commit 04707a2d authored by Lintang Sutawika's avatar Lintang Sutawika Committed by GitHub
Browse files

fixed how to check if dataset_path is a local directory or not (#1127)

parent 2a47159c
import abc import abc
from dataclasses import dataclass, field, asdict from dataclasses import dataclass, field, asdict
import os
import re import re
import ast import ast
import yaml import yaml
...@@ -96,7 +97,7 @@ class TaskConfig(dict): ...@@ -96,7 +97,7 @@ class TaskConfig(dict):
] = None # by default, not used in the code. allows for users to pass arbitrary info to tasks ] = None # by default, not used in the code. allows for users to pass arbitrary info to tasks
def __post_init__(self) -> None: def __post_init__(self) -> None:
if self.dataset_path and ("." in self.dataset_path): if self.dataset_path and os.path.exists(os.path.dirname(self.dataset_path)):
import inspect import inspect
from importlib import import_module from importlib import import_module
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment