datachain 0.9.0__py3-none-any.whl → 0.9.1__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/lib/file.py CHANGED
@@ -214,10 +214,13 @@ class File(DataModel):
214
214
 
215
215
  catalog = get_catalog()
216
216
 
217
- parent, name = posixpath.split(path)
217
+ from datachain.client.fsspec import Client
218
218
 
219
- client = catalog.get_client(parent)
220
- file = client.upload(data, name)
219
+ client_cls = Client.get_implementation(path)
220
+ source, rel_path = client_cls.split_url(path)
221
+
222
+ client = catalog.get_client(client_cls.get_uri(source))
223
+ file = client.upload(data, rel_path)
221
224
  if not isinstance(file, cls):
222
225
  file = cls(**file.model_dump())
223
226
  file._set_stream(catalog)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: datachain
3
- Version: 0.9.0
3
+ Version: 0.9.1
4
4
  Summary: Wrangle unstructured AI data at scale
5
5
  Author-email: Dmitry Petrov <support@dvc.org>
6
6
  License: Apache-2.0
@@ -69,7 +69,7 @@ datachain/lib/clip.py,sha256=lm5CzVi4Cj1jVLEKvERKArb-egb9j1Ls-fwTItT6vlI,6150
69
69
  datachain/lib/data_model.py,sha256=zS4lmXHVBXc9ntcyea2a1CRLXGSAN_0glXcF88CohgY,2685
70
70
  datachain/lib/dataset_info.py,sha256=IjdF1E0TQNOq9YyynfWiCFTeZpbyGfyJvxgJY4YN810,2493
71
71
  datachain/lib/dc.py,sha256=rQZgFLFSIde6wfiAnBnlSE4qnjNjNXQ0F3TGhDQ6ap8,93459
72
- datachain/lib/file.py,sha256=HXH4pgPN_Zx9rPI0jy-Cjl2F3ItJchH7ycrIXnOgaGk,26892
72
+ datachain/lib/file.py,sha256=jtjypMGEvXw3S1oJHeWYiAKJREhhdI7cLGKME8obA78,27030
73
73
  datachain/lib/hf.py,sha256=gjxuStZBlKtNk3-4yYSlWZDv9zBGblOdvEy_Lwap5hA,5882
74
74
  datachain/lib/image.py,sha256=AMXYwQsmarZjRbPCZY3M1jDsM2WAB_b3cTY4uOIuXNU,2675
75
75
  datachain/lib/listing.py,sha256=auodM0HitYZsL0DybdgQUYhne_LgkVW-LKGYYOACP90,7272
@@ -135,9 +135,9 @@ datachain/sql/sqlite/vector.py,sha256=ncW4eu2FlJhrP_CIpsvtkUabZlQdl2D5Lgwy_cbfqR
135
135
  datachain/toolkit/__init__.py,sha256=eQ58Q5Yf_Fgv1ZG0IO5dpB4jmP90rk8YxUWmPc1M2Bo,68
136
136
  datachain/toolkit/split.py,sha256=z3zRJNzjWrpPuRw-zgFbCOBKInyYxJew8ygrYQRQLNc,2930
137
137
  datachain/torch/__init__.py,sha256=gIS74PoEPy4TB3X6vx9nLO0Y3sLJzsA8ckn8pRWihJM,579
138
- datachain-0.9.0.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
139
- datachain-0.9.0.dist-info/METADATA,sha256=GJFjVJKy6bvK7OwltIhcQEA3GHdpR2pHHJEAdoeapM8,11198
140
- datachain-0.9.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
- datachain-0.9.0.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
142
- datachain-0.9.0.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
143
- datachain-0.9.0.dist-info/RECORD,,
138
+ datachain-0.9.1.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
139
+ datachain-0.9.1.dist-info/METADATA,sha256=WC_qkAVg28I5GkwG_XDGoNC_2e0hKcBC7kqEzmna71A,11198
140
+ datachain-0.9.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
141
+ datachain-0.9.1.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
142
+ datachain-0.9.1.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
143
+ datachain-0.9.1.dist-info/RECORD,,