datachain 0.20.3__py3-none-any.whl → 0.20.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datachain might be problematic. Click here for more details.
- datachain/data_storage/metastore.py +3 -1
- datachain/data_storage/sqlite.py +0 -3
- datachain/lib/dc/datachain.py +4 -3
- datachain/lib/dc/datasets.py +21 -5
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/METADATA +1 -1
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/RECORD +10 -10
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/WHEEL +0 -0
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/entry_points.txt +0 -0
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/licenses/LICENSE +0 -0
- {datachain-0.20.3.dist-info → datachain-0.20.4.dist-info}/top_level.txt +0 -0
|
@@ -176,7 +176,9 @@ class AbstractMetastore(ABC, Serializable):
|
|
|
176
176
|
|
|
177
177
|
@cached_property
|
|
178
178
|
def default_project(self) -> Project:
|
|
179
|
-
return self.get_project(
|
|
179
|
+
return self.get_project(
|
|
180
|
+
self.default_project_name, self.default_namespace_name, create=True
|
|
181
|
+
)
|
|
180
182
|
|
|
181
183
|
@cached_property
|
|
182
184
|
def listing_project(self) -> Project:
|
datachain/data_storage/sqlite.py
CHANGED
|
@@ -471,9 +471,6 @@ class SQLiteMetastore(AbstractDBMetastore):
|
|
|
471
471
|
system_namespace = self.create_namespace(Namespace.system(), "System namespace")
|
|
472
472
|
self.create_project(system_namespace.name, Project.listing(), "Listing project")
|
|
473
473
|
|
|
474
|
-
local_namespace = self.create_namespace(Namespace.default(), "Local namespace")
|
|
475
|
-
self.create_project(local_namespace.name, Project.default(), "Local project")
|
|
476
|
-
|
|
477
474
|
def _check_schema_version(self) -> None:
|
|
478
475
|
"""
|
|
479
476
|
Checks if current DB schema is up to date with latest DB model and schema
|
datachain/lib/dc/datachain.py
CHANGED
|
@@ -38,7 +38,6 @@ from datachain.lib.file import (
|
|
|
38
38
|
FileExporter,
|
|
39
39
|
)
|
|
40
40
|
from datachain.lib.file import ExportPlacement as FileExportPlacement
|
|
41
|
-
from datachain.lib.projects import get as get_project
|
|
42
41
|
from datachain.lib.settings import Settings
|
|
43
42
|
from datachain.lib.signal_schema import SignalSchema
|
|
44
43
|
from datachain.lib.udf import Aggregator, BatchMapper, Generator, Mapper, UDFBase
|
|
@@ -525,8 +524,10 @@ class DataChain:
|
|
|
525
524
|
It returns the chain itself.
|
|
526
525
|
"""
|
|
527
526
|
schema = self.signals_schema.clone_without_sys_signals().serialize()
|
|
528
|
-
project = get_project(
|
|
529
|
-
self.project_name,
|
|
527
|
+
project = self.session.catalog.metastore.get_project(
|
|
528
|
+
self.project_name,
|
|
529
|
+
self.namespace_name,
|
|
530
|
+
create=True,
|
|
530
531
|
)
|
|
531
532
|
return self._evolve(
|
|
532
533
|
query=self._query.save(project=project, feature_schema=schema)
|
datachain/lib/dc/datasets.py
CHANGED
|
@@ -2,7 +2,11 @@ from collections.abc import Sequence
|
|
|
2
2
|
from typing import TYPE_CHECKING, Optional, Union, get_origin, get_type_hints
|
|
3
3
|
|
|
4
4
|
from datachain.dataset import parse_dataset_name
|
|
5
|
-
from datachain.error import
|
|
5
|
+
from datachain.error import (
|
|
6
|
+
DatasetNotFoundError,
|
|
7
|
+
DatasetVersionNotFoundError,
|
|
8
|
+
ProjectNotFoundError,
|
|
9
|
+
)
|
|
6
10
|
from datachain.lib.dataset_info import DatasetInfo
|
|
7
11
|
from datachain.lib.file import (
|
|
8
12
|
File,
|
|
@@ -136,9 +140,15 @@ def read_dataset(
|
|
|
136
140
|
# all 2.* dataset versions). If dataset doesn't have any versions where
|
|
137
141
|
# major part is equal to that input, exception is thrown.
|
|
138
142
|
major = int(version)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
try:
|
|
144
|
+
ds_project = get_project(project_name, namespace_name, session=session)
|
|
145
|
+
except ProjectNotFoundError:
|
|
146
|
+
raise DatasetNotFoundError(
|
|
147
|
+
f"Dataset {name} not found in namespace {namespace_name} and",
|
|
148
|
+
f" project {project_name}",
|
|
149
|
+
) from None
|
|
150
|
+
|
|
151
|
+
dataset = session.catalog.get_dataset(name, ds_project)
|
|
142
152
|
latest_major = dataset.latest_major_version(major)
|
|
143
153
|
if not latest_major:
|
|
144
154
|
raise DatasetVersionNotFoundError(
|
|
@@ -321,7 +331,13 @@ def delete_dataset(
|
|
|
321
331
|
None, name, namespace_name, project_name, version=version, force=force
|
|
322
332
|
)
|
|
323
333
|
|
|
324
|
-
|
|
334
|
+
try:
|
|
335
|
+
ds_project = get_project(project_name, namespace_name, session=session)
|
|
336
|
+
except ProjectNotFoundError:
|
|
337
|
+
raise DatasetNotFoundError(
|
|
338
|
+
f"Dataset {name} not found in namespace {namespace_name} and project",
|
|
339
|
+
f" {project_name}",
|
|
340
|
+
) from None
|
|
325
341
|
|
|
326
342
|
if not force:
|
|
327
343
|
version = version or catalog.get_dataset(name, ds_project).latest_version
|
|
@@ -49,10 +49,10 @@ datachain/client/s3.py,sha256=6DNVGLg-woPS1DVlYVX2rIlunNblsuxyOnI1rSzhW3k,7515
|
|
|
49
49
|
datachain/data_storage/__init__.py,sha256=9Wit-oe5P46V7CJQTD0BJ5MhOa2Y9h3ddJ4VWTe-Lec,273
|
|
50
50
|
datachain/data_storage/db_engine.py,sha256=n8ojCbvVMPY2e3SG8fUaaD0b9GkVfpl_Naa_6EiHfWg,3788
|
|
51
51
|
datachain/data_storage/job.py,sha256=9r0OGwh22bHNIvLHqg8_-eJSP1YYB-BN5HOla5TdCxw,402
|
|
52
|
-
datachain/data_storage/metastore.py,sha256=
|
|
52
|
+
datachain/data_storage/metastore.py,sha256=Rvkp7HzOtrRFxQVVlCJSgsdIKG4rw_wvU5TaBr5kEV4,51621
|
|
53
53
|
datachain/data_storage/schema.py,sha256=o3JbURKXRg3IJyIVA4QjHHkn6byRuz7avbydU2FlvNY,9897
|
|
54
54
|
datachain/data_storage/serializer.py,sha256=6G2YtOFqqDzJf1KbvZraKGXl2XHZyVml2krunWUum5o,927
|
|
55
|
-
datachain/data_storage/sqlite.py,sha256=
|
|
55
|
+
datachain/data_storage/sqlite.py,sha256=bGb4_kEFvnGf3ZWekiv8z3VMZBzQyO0bSaNB5RrpUUs,29991
|
|
56
56
|
datachain/data_storage/warehouse.py,sha256=_7btARw-kd-Nx19S0qW6JqdF3VYyypQXFzsXq68SWKI,32327
|
|
57
57
|
datachain/diff/__init__.py,sha256=-OFZzgOplqO84iWgGY7kfe60NXaWR9JRIh9T-uJboAM,9668
|
|
58
58
|
datachain/fs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -103,8 +103,8 @@ datachain/lib/convert/values_to_tuples.py,sha256=j5yZMrVUH6W7b-7yUvdCTGI7JCUAYUO
|
|
|
103
103
|
datachain/lib/dc/__init__.py,sha256=HD0NYrdy44u6kkpvgGjJcvGz-UGTHui2azghcT8ZUg0,838
|
|
104
104
|
datachain/lib/dc/csv.py,sha256=q6a9BpapGwP6nwy6c5cklxQumep2fUp9l2LAjtTJr6s,4411
|
|
105
105
|
datachain/lib/dc/database.py,sha256=g5M6NjYR1T0vKte-abV-3Ejnm-HqxTIMir5cRi_SziE,6051
|
|
106
|
-
datachain/lib/dc/datachain.py,sha256=
|
|
107
|
-
datachain/lib/dc/datasets.py,sha256=
|
|
106
|
+
datachain/lib/dc/datachain.py,sha256=B6z8e33ZAUKbJ-cqQko-VJEtmia2bfUnuqH7BQQVt_A,85998
|
|
107
|
+
datachain/lib/dc/datasets.py,sha256=xiVNe7PosuIsyACFhly9qNxGmRQy1J2TQw3AD6uj9UM,12747
|
|
108
108
|
datachain/lib/dc/hf.py,sha256=PJl2wiLjdRsMz0SYbLT-6H8b-D5i2WjeH7li8HHOk_0,2145
|
|
109
109
|
datachain/lib/dc/json.py,sha256=dNijfJ-H92vU3soyR7X1IiDrWhm6yZIGG3bSnZkPdAE,2733
|
|
110
110
|
datachain/lib/dc/listings.py,sha256=eVBUP25W81dv46DLqkv8K0X7N3nxhoZm77gFrByeT_E,4660
|
|
@@ -157,9 +157,9 @@ datachain/sql/sqlite/vector.py,sha256=ncW4eu2FlJhrP_CIpsvtkUabZlQdl2D5Lgwy_cbfqR
|
|
|
157
157
|
datachain/toolkit/__init__.py,sha256=eQ58Q5Yf_Fgv1ZG0IO5dpB4jmP90rk8YxUWmPc1M2Bo,68
|
|
158
158
|
datachain/toolkit/split.py,sha256=ktGWzY4kyzjWyR86dhvzw-Zhl0lVk_LOX3NciTac6qo,2914
|
|
159
159
|
datachain/torch/__init__.py,sha256=gIS74PoEPy4TB3X6vx9nLO0Y3sLJzsA8ckn8pRWihJM,579
|
|
160
|
-
datachain-0.20.
|
|
161
|
-
datachain-0.20.
|
|
162
|
-
datachain-0.20.
|
|
163
|
-
datachain-0.20.
|
|
164
|
-
datachain-0.20.
|
|
165
|
-
datachain-0.20.
|
|
160
|
+
datachain-0.20.4.dist-info/licenses/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
|
|
161
|
+
datachain-0.20.4.dist-info/METADATA,sha256=qJW1OSk6js8XNxap4sftMjW02AzBrPsrsyA64igleYw,13281
|
|
162
|
+
datachain-0.20.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
163
|
+
datachain-0.20.4.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
|
|
164
|
+
datachain-0.20.4.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
|
|
165
|
+
datachain-0.20.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|