datachain 0.18.6__py3-none-any.whl → 0.18.7__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/client/azure.py +1 -1
- datachain/client/fsspec.py +5 -2
- datachain/client/gcs.py +2 -2
- datachain/client/s3.py +9 -3
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/METADATA +1 -1
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/RECORD +10 -10
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/WHEEL +0 -0
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/entry_points.txt +0 -0
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/licenses/LICENSE +0 -0
- {datachain-0.18.6.dist-info → datachain-0.18.7.dist-info}/top_level.txt +0 -0
datachain/client/azure.py
CHANGED
|
@@ -15,7 +15,7 @@ class AzureClient(Client):
|
|
|
15
15
|
protocol = "az"
|
|
16
16
|
|
|
17
17
|
def info_to_file(self, v: dict[str, Any], path: str) -> File:
|
|
18
|
-
version_id = v.get("version_id")
|
|
18
|
+
version_id = v.get("version_id") if self._is_version_aware() else None
|
|
19
19
|
return File(
|
|
20
20
|
source=self.uri,
|
|
21
21
|
path=path,
|
datachain/client/fsspec.py
CHANGED
|
@@ -208,7 +208,7 @@ class Client(ABC):
|
|
|
208
208
|
|
|
209
209
|
async def get_current_etag(self, file: "File") -> str:
|
|
210
210
|
kwargs = {}
|
|
211
|
-
if
|
|
211
|
+
if self._is_version_aware():
|
|
212
212
|
kwargs["version_id"] = file.version
|
|
213
213
|
info = await self.fs._info(
|
|
214
214
|
self.get_full_path(file.path, file.version), **kwargs
|
|
@@ -326,8 +326,11 @@ class Client(ABC):
|
|
|
326
326
|
"""
|
|
327
327
|
return not (key.startswith("/") or key.endswith("/") or "//" in key)
|
|
328
328
|
|
|
329
|
+
def _is_version_aware(self) -> bool:
|
|
330
|
+
return getattr(self.fs, "version_aware", False)
|
|
331
|
+
|
|
329
332
|
async def ls_dir(self, path):
|
|
330
|
-
if
|
|
333
|
+
if self._is_version_aware():
|
|
331
334
|
kwargs = {"versions": True}
|
|
332
335
|
return await self.fs._ls(path, detail=True, **kwargs)
|
|
333
336
|
|
datachain/client/gcs.py
CHANGED
|
@@ -115,7 +115,7 @@ class GCSClient(Client):
|
|
|
115
115
|
maxResults=page_size,
|
|
116
116
|
pageToken=next_page_token,
|
|
117
117
|
json_out=True,
|
|
118
|
-
versions="true",
|
|
118
|
+
versions="true" if self._is_version_aware() else "false",
|
|
119
119
|
)
|
|
120
120
|
assert page["kind"] == "storage#objects"
|
|
121
121
|
await page_queue.put(page.get("items", []))
|
|
@@ -134,7 +134,7 @@ class GCSClient(Client):
|
|
|
134
134
|
source=self.uri,
|
|
135
135
|
path=path,
|
|
136
136
|
etag=v.get("etag", ""),
|
|
137
|
-
version=v.get("generation", ""),
|
|
137
|
+
version=v.get("generation", "") if self._is_version_aware() else "",
|
|
138
138
|
is_latest=not v.get("timeDeleted"),
|
|
139
139
|
last_modified=self.parse_timestamp(v["updated"]),
|
|
140
140
|
size=v.get("size", ""),
|
datachain/client/s3.py
CHANGED
|
@@ -101,7 +101,7 @@ class ClientS3(Client):
|
|
|
101
101
|
prefix = start_prefix
|
|
102
102
|
if prefix:
|
|
103
103
|
prefix = prefix.lstrip(DELIMITER) + DELIMITER
|
|
104
|
-
versions =
|
|
104
|
+
versions = self._is_version_aware()
|
|
105
105
|
fs = self.fs
|
|
106
106
|
await fs.set_session()
|
|
107
107
|
s3 = await fs.get_s3(self.name)
|
|
@@ -139,7 +139,9 @@ class ClientS3(Client):
|
|
|
139
139
|
source=self.uri,
|
|
140
140
|
path=v["Key"],
|
|
141
141
|
etag=v.get("ETag", "").strip('"'),
|
|
142
|
-
version=
|
|
142
|
+
version=(
|
|
143
|
+
ClientS3.clean_s3_version(v.get("VersionId", "")) if versions else ""
|
|
144
|
+
),
|
|
143
145
|
is_latest=v.get("IsLatest", True),
|
|
144
146
|
last_modified=v.get("LastModified", ""),
|
|
145
147
|
size=v["Size"],
|
|
@@ -193,7 +195,11 @@ class ClientS3(Client):
|
|
|
193
195
|
source=self.uri,
|
|
194
196
|
path=path,
|
|
195
197
|
size=v["size"],
|
|
196
|
-
version=
|
|
198
|
+
version=(
|
|
199
|
+
ClientS3.clean_s3_version(v.get("VersionId", ""))
|
|
200
|
+
if self._is_version_aware()
|
|
201
|
+
else ""
|
|
202
|
+
),
|
|
197
203
|
etag=v.get("ETag", "").strip('"'),
|
|
198
204
|
is_latest=v.get("IsLatest", True),
|
|
199
205
|
last_modified=v.get("LastModified", ""),
|
|
@@ -37,13 +37,13 @@ datachain/cli/parser/job.py,sha256=acdVYuTsqluRDI_FYhZ1ohjQcVtBj-taUm8y9tGb0_0,4
|
|
|
37
37
|
datachain/cli/parser/studio.py,sha256=Y-1OlQGecLVi9QofvWUfSlPd2ISyaESf7QFGZqGsrdw,3609
|
|
38
38
|
datachain/cli/parser/utils.py,sha256=rETdD-9Hq9A4OolgfT7jQw4aoawtbfmkdtH6E7nkhpI,2888
|
|
39
39
|
datachain/client/__init__.py,sha256=1kDpCPoibMXi1gExR4lTLc5pi-k6M5TANiwtXkPoLhU,49
|
|
40
|
-
datachain/client/azure.py,sha256=
|
|
40
|
+
datachain/client/azure.py,sha256=7yyAgANHfu9Kfh187MKNTT1guvu9Q-WYsi4vYoY3aew,3270
|
|
41
41
|
datachain/client/fileslice.py,sha256=bT7TYco1Qe3bqoc8aUkUZcPdPofJDHlryL5BsTn9xsY,3021
|
|
42
|
-
datachain/client/fsspec.py,sha256=
|
|
43
|
-
datachain/client/gcs.py,sha256=
|
|
42
|
+
datachain/client/fsspec.py,sha256=c8oRBUMo31k8bMB_mIA60PDfna4nYTdslzHqmqL2Uvg,13918
|
|
43
|
+
datachain/client/gcs.py,sha256=8hcFhEHp8qGRsJoyfCoawfuwb1Et-MSkyQoM9AnNuXI,5204
|
|
44
44
|
datachain/client/hf.py,sha256=posnI5WOKOMG1yY_ZiV9Orcd24QsUPKZlOXgJVLxxrM,1558
|
|
45
45
|
datachain/client/local.py,sha256=cGoCYflribzexiOe-Y1qbaE2fJRh-_EgQrfCSa0yK_E,4568
|
|
46
|
-
datachain/client/s3.py,sha256=
|
|
46
|
+
datachain/client/s3.py,sha256=6DNVGLg-woPS1DVlYVX2rIlunNblsuxyOnI1rSzhW3k,7515
|
|
47
47
|
datachain/data_storage/__init__.py,sha256=9Wit-oe5P46V7CJQTD0BJ5MhOa2Y9h3ddJ4VWTe-Lec,273
|
|
48
48
|
datachain/data_storage/db_engine.py,sha256=n8ojCbvVMPY2e3SG8fUaaD0b9GkVfpl_Naa_6EiHfWg,3788
|
|
49
49
|
datachain/data_storage/job.py,sha256=9r0OGwh22bHNIvLHqg8_-eJSP1YYB-BN5HOla5TdCxw,402
|
|
@@ -153,9 +153,9 @@ datachain/sql/sqlite/vector.py,sha256=ncW4eu2FlJhrP_CIpsvtkUabZlQdl2D5Lgwy_cbfqR
|
|
|
153
153
|
datachain/toolkit/__init__.py,sha256=eQ58Q5Yf_Fgv1ZG0IO5dpB4jmP90rk8YxUWmPc1M2Bo,68
|
|
154
154
|
datachain/toolkit/split.py,sha256=ktGWzY4kyzjWyR86dhvzw-Zhl0lVk_LOX3NciTac6qo,2914
|
|
155
155
|
datachain/torch/__init__.py,sha256=gIS74PoEPy4TB3X6vx9nLO0Y3sLJzsA8ckn8pRWihJM,579
|
|
156
|
-
datachain-0.18.
|
|
157
|
-
datachain-0.18.
|
|
158
|
-
datachain-0.18.
|
|
159
|
-
datachain-0.18.
|
|
160
|
-
datachain-0.18.
|
|
161
|
-
datachain-0.18.
|
|
156
|
+
datachain-0.18.7.dist-info/licenses/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
|
|
157
|
+
datachain-0.18.7.dist-info/METADATA,sha256=OXGuP0EbV6ZC57NPhtyse2-6OP2pDKbhJkmcDfHp1mU,11319
|
|
158
|
+
datachain-0.18.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
159
|
+
datachain-0.18.7.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
|
|
160
|
+
datachain-0.18.7.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
|
|
161
|
+
datachain-0.18.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|