Upload dataset.py with huggingface_hub
Browse files- dataset.py +2 -7
dataset.py
CHANGED
@@ -20,6 +20,7 @@ from .formats import __file__ as _
|
|
20 |
from .fusion import __file__ as _
|
21 |
from .generator_utils import __file__ as _
|
22 |
from .hf_utils import __file__ as _
|
|
|
23 |
from .instructions import __file__ as _
|
24 |
from .loaders import __file__ as _
|
25 |
from .logging_utils import __file__ as _
|
@@ -69,14 +70,8 @@ class Dataset(datasets.GeneratorBasedBuilder):
|
|
69 |
def generators(self):
|
70 |
if not hasattr(self, "_generators") or self._generators is None:
|
71 |
if is_package_installed("unitxt"):
|
72 |
-
|
73 |
-
get_constants as installed_get_constants
|
74 |
|
75 |
-
installed_package_constants = installed_get_constants()
|
76 |
-
if installed_package_constants.version != self.VERSION:
|
77 |
-
raise ValueError(
|
78 |
-
f"Located installed unitxt version {installed_get_constants.version} that is different then unitxt dataset version {self.VERSION}. Please make sure the installed version is identical to the dataset version."
|
79 |
-
)
|
80 |
from unitxt.dataset_utils import \
|
81 |
get_dataset_artifact as get_dataset_artifact_installed
|
82 |
|
|
|
20 |
from .fusion import __file__ as _
|
21 |
from .generator_utils import __file__ as _
|
22 |
from .hf_utils import __file__ as _
|
23 |
+
from .hf_utils import verify_versions_compatibility
|
24 |
from .instructions import __file__ as _
|
25 |
from .loaders import __file__ as _
|
26 |
from .logging_utils import __file__ as _
|
|
|
70 |
def generators(self):
|
71 |
if not hasattr(self, "_generators") or self._generators is None:
|
72 |
if is_package_installed("unitxt"):
|
73 |
+
verify_versions_compatibility("dataset", self.VERSION)
|
|
|
74 |
|
|
|
|
|
|
|
|
|
|
|
75 |
from unitxt.dataset_utils import \
|
76 |
get_dataset_artifact as get_dataset_artifact_installed
|
77 |
|