datachain 0.7.0__py3-none-any.whl → 0.7.2__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.

Files changed (52) hide show
  1. datachain/__init__.py +0 -3
  2. datachain/catalog/catalog.py +8 -6
  3. datachain/cli.py +1 -1
  4. datachain/client/fsspec.py +9 -9
  5. datachain/data_storage/schema.py +2 -2
  6. datachain/data_storage/sqlite.py +5 -4
  7. datachain/data_storage/warehouse.py +18 -18
  8. datachain/func/__init__.py +49 -0
  9. datachain/{lib/func → func}/aggregate.py +13 -11
  10. datachain/func/array.py +176 -0
  11. datachain/func/base.py +23 -0
  12. datachain/func/conditional.py +81 -0
  13. datachain/func/func.py +384 -0
  14. datachain/func/path.py +110 -0
  15. datachain/func/random.py +23 -0
  16. datachain/func/string.py +154 -0
  17. datachain/func/window.py +49 -0
  18. datachain/lib/arrow.py +24 -12
  19. datachain/lib/data_model.py +25 -9
  20. datachain/lib/dataset_info.py +2 -2
  21. datachain/lib/dc.py +94 -56
  22. datachain/lib/hf.py +1 -1
  23. datachain/lib/signal_schema.py +1 -1
  24. datachain/lib/utils.py +1 -0
  25. datachain/lib/webdataset_laion.py +5 -5
  26. datachain/model/__init__.py +6 -0
  27. datachain/model/bbox.py +102 -0
  28. datachain/model/pose.py +88 -0
  29. datachain/model/segment.py +47 -0
  30. datachain/model/ultralytics/__init__.py +27 -0
  31. datachain/model/ultralytics/bbox.py +147 -0
  32. datachain/model/ultralytics/pose.py +113 -0
  33. datachain/model/ultralytics/segment.py +91 -0
  34. datachain/nodes_fetcher.py +2 -2
  35. datachain/query/dataset.py +57 -34
  36. datachain/sql/__init__.py +0 -2
  37. datachain/sql/functions/__init__.py +0 -26
  38. datachain/sql/selectable.py +11 -5
  39. datachain/sql/sqlite/base.py +11 -2
  40. datachain/toolkit/split.py +6 -2
  41. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/METADATA +72 -71
  42. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/RECORD +46 -35
  43. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/WHEEL +1 -1
  44. datachain/lib/func/__init__.py +0 -32
  45. datachain/lib/func/func.py +0 -152
  46. datachain/lib/models/__init__.py +0 -5
  47. datachain/lib/models/bbox.py +0 -45
  48. datachain/lib/models/pose.py +0 -37
  49. datachain/lib/models/yolo.py +0 -39
  50. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/LICENSE +0 -0
  51. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/entry_points.txt +0 -0
  52. {datachain-0.7.0.dist-info → datachain-0.7.2.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,8 @@
1
- datachain/__init__.py,sha256=nnTyB5MpCfBZ6D85JPz-5hUT7i-68Is-47Bxgew8lRw,930
1
+ datachain/__init__.py,sha256=ofPJ6B-d-ybSDRrE7J6wqF_ZRAB2W9U8l-eeuBtqPLg,865
2
2
  datachain/__main__.py,sha256=hG3Y4ARGEqe1AWwNMd259rBlqtphx1Wk39YbueQ0yV8,91
3
3
  datachain/asyn.py,sha256=5aKrjnUxk0mtnZeFKNJd1DCE0MsnSoyJBZkr0y9H_a0,9313
4
4
  datachain/cache.py,sha256=s0YHN7qurmQv-eC265TjeureK84TebWWAnL07cxchZQ,2997
5
- datachain/cli.py,sha256=hdVt_HJumQVgtaBAtBVJm-uPyYVogMXNVLmRcZyWHgk,36677
5
+ datachain/cli.py,sha256=weZDEj4Kkgi9vqzqJdQcX_jSymSINHbbZjjTqu1RHa4,36685
6
6
  datachain/cli_utils.py,sha256=jrn9ejGXjybeO1ur3fjdSiAyCHZrX0qsLLbJzN9ErPM,2418
7
7
  datachain/config.py,sha256=g8qbNV0vW2VEKpX-dGZ9pAn0DAz6G2ZFcr7SAV3PoSM,4272
8
8
  datachain/dataset.py,sha256=0IN-5y723y-bnFlieKtOFZLCjwX_yplFo3q0DV7LRPw,14821
@@ -10,7 +10,7 @@ datachain/error.py,sha256=bxAAL32lSeMgzsQDEHbGTGORj-mPzzpCRvWDPueJNN4,1092
10
10
  datachain/job.py,sha256=Jt4sNutMHJReaGsj3r3scueN5aESLGfhimAa8pUP7Is,1271
11
11
  datachain/listing.py,sha256=TgKg25ZWAP5enzKgw2_2GUPJVdnQUh6uySHB5SJrUY4,7773
12
12
  datachain/node.py,sha256=o8Sqy92QkzzcLK6XmIFLyDSE6Rw6kUTmGRhEmfLFdhg,5211
13
- datachain/nodes_fetcher.py,sha256=F-73-h19HHNGtHFBGKk7p3mc0ALm4a9zGnzhtuUjnp4,1107
13
+ datachain/nodes_fetcher.py,sha256=ILMzUW5o4_6lUOVrLDC9gJPCXfcgKnMG68plrc7dAOA,1113
14
14
  datachain/nodes_thread_pool.py,sha256=uPo-xl8zG5m9YgODjPFBpbcqqHjI-dcxH87yAbj_qco,3192
15
15
  datachain/progress.py,sha256=5KotcvvzAUL_RF0GEj4JY0IB1lyImnmHxe89YkT1XO4,4330
16
16
  datachain/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -18,13 +18,13 @@ datachain/studio.py,sha256=6kxF7VxPAbh9D7_Bk8_SghS5OXrwUwSpDaw19eNCTP4,4083
18
18
  datachain/telemetry.py,sha256=0A4IOPPp9VlP5pyW9eBfaTK3YhHGzHl7dQudQjUAx9A,994
19
19
  datachain/utils.py,sha256=-mSFowjIidJ4_sMXInvNHLn4rK_QnHuIlLuH1_lMGmI,13897
20
20
  datachain/catalog/__init__.py,sha256=g2iAAFx_gEIrqshXlhSEbrc8qDaEH11cjU40n3CHDz4,409
21
- datachain/catalog/catalog.py,sha256=J1nUWLI4RYCvvR6fB4neQBtB7V-CTh4PM71irhNmJc4,57817
21
+ datachain/catalog/catalog.py,sha256=sWljYCIpvUR3eCeYg4GTZXfyn5ropZVkfEPocc9m7KE,57941
22
22
  datachain/catalog/datasource.py,sha256=D-VWIVDCM10A8sQavLhRXdYSCG7F4o4ifswEF80_NAQ,1412
23
23
  datachain/catalog/loader.py,sha256=-6VelNfXUdgUnwInVyA8g86Boxv2xqhTh9xNS-Zlwig,8242
24
24
  datachain/client/__init__.py,sha256=T4wiYL9KIM0ZZ_UqIyzV8_ufzYlewmizlV4iymHNluE,86
25
25
  datachain/client/azure.py,sha256=ffxs26zm6KLAL1aUWJm-vtzuZP3LSNha7UDGXynMBKo,2234
26
26
  datachain/client/fileslice.py,sha256=bT7TYco1Qe3bqoc8aUkUZcPdPofJDHlryL5BsTn9xsY,3021
27
- datachain/client/fsspec.py,sha256=Ai5m7alkAnv-RWXuLbZ95SKEPaQ3Pyk5ujDy50JDX5w,12692
27
+ datachain/client/fsspec.py,sha256=KDGLhJMnive73hI8GABeP_aQZv1w5M_6rxz6KRRxaHI,12712
28
28
  datachain/client/gcs.py,sha256=cnTIr5GS6dbYOEYfqehhyQu3dr6XNjPHSg5U3FkivUk,4124
29
29
  datachain/client/hf.py,sha256=XeVJVbiNViZCpn3sfb90Fr8SYO3BdLmfE3hOWMoqInE,951
30
30
  datachain/client/local.py,sha256=vwbgCwZ7IqY2voj2l7tLJjgov7Dp--fEUvUwUBsMbls,4457
@@ -34,18 +34,28 @@ datachain/data_storage/db_engine.py,sha256=81Ol1of9TTTzD97ORajCnP366Xz2mEJt6C-kT
34
34
  datachain/data_storage/id_generator.py,sha256=lCEoU0BM37Ai2aRpSbwo5oQT0GqZnSpYwwvizathRMQ,4292
35
35
  datachain/data_storage/job.py,sha256=w-7spowjkOa1P5fUVtJou3OltT0L48P0RYWZ9rSJ9-s,383
36
36
  datachain/data_storage/metastore.py,sha256=5b7o_CSHC2djottebYn-Hq5q0yaSLOKPIRCnaVRvjsU,36056
37
- datachain/data_storage/schema.py,sha256=scANMQqozita3HjEtq7eupMgh6yYkrZHoXtfuL2RoQg,9879
37
+ datachain/data_storage/schema.py,sha256=-QVlRvD0dfu-ZFUxylEoSnLJLnleMEjVlcAb2OGu-AY,9895
38
38
  datachain/data_storage/serializer.py,sha256=6G2YtOFqqDzJf1KbvZraKGXl2XHZyVml2krunWUum5o,927
39
- datachain/data_storage/sqlite.py,sha256=CspRUlYsIcubgzvcQxTACnmcuKESSLZcqCl0dcrtRiA,27471
40
- datachain/data_storage/warehouse.py,sha256=yXNU0U3exzR1E6dqbYYmL4RhXWsbYWVdZ3jONGcVniY,30914
39
+ datachain/data_storage/sqlite.py,sha256=nF-2B-n8YZh9cJlZv4XnbahAJDW6pvrp1h9L-140M7A,27538
40
+ datachain/data_storage/warehouse.py,sha256=kFLhYEFkpsfl65Lr1c4t4HJt3nO1Ez_QQ76aQNN30fc,30966
41
+ datachain/func/__init__.py,sha256=4VUt5BaLdBAl_BnAku0Jb8plqd7kDOiYrQTMG3pN0c4,794
42
+ datachain/func/aggregate.py,sha256=7_IPrIwb2XSs3zG4iOr1eTvzn6kNVe2mkzvNzjusDHk,10942
43
+ datachain/func/array.py,sha256=zHDNWuWLA7HVa9FEvQeHhVi00_xqenyleTqcLwkXWBI,5477
44
+ datachain/func/base.py,sha256=wA0sBQAVyN9LPxoo7Ox83peS0zUVnyuKxukwAcjGLfY,534
45
+ datachain/func/conditional.py,sha256=mQroxsoExpBW84Zm5dAYP4OpBblWmzfnF2qJq9rba54,2223
46
+ datachain/func/func.py,sha256=9wqdxxisoDL0w8qKGQmL6sNdgJeIOzotEUPlxu9t2IQ,12326
47
+ datachain/func/path.py,sha256=mqN_mfkwv44z2II7DMTp_fGGw95hmTCNls_TOFNpr4k,3155
48
+ datachain/func/random.py,sha256=pENOLj9rSmWfGCnOsUIaCsVC5486zQb66qfQvXaz9Z4,452
49
+ datachain/func/string.py,sha256=NQzaXXYu7yb72HPADy4WrFlcgvTS77L9x7-qvCKJtnk,4522
50
+ datachain/func/window.py,sha256=0MB1yjpVbwOrl_WNLZ8V3jkJz3o0XlYinpAcZQJuxiA,1688
41
51
  datachain/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- datachain/lib/arrow.py,sha256=-hu9tic79a01SY2UBqkA3U6wUr6tnE3T3q5q_BnO93A,9156
52
+ datachain/lib/arrow.py,sha256=b5efxAUaNNYVwtXVJqj07D3zf5KC-BPlLCxKEZbEG6w,9429
43
53
  datachain/lib/clip.py,sha256=lm5CzVi4Cj1jVLEKvERKArb-egb9j1Ls-fwTItT6vlI,6150
44
- datachain/lib/data_model.py,sha256=dau4AlZBhOFvF7pEKMeqCeRkcFFg5KFvTBWW_2CdH5g,2371
45
- datachain/lib/dataset_info.py,sha256=q0EW9tj5jXGSD9Lzct9zbH4P1lfIGd_cIWqhnMxv7Q0,2464
46
- datachain/lib/dc.py,sha256=u0RQJPG0zwxsoYS-4wrbDBPuLYZajwIi1YX37khKfkI,87942
54
+ datachain/lib/data_model.py,sha256=zS4lmXHVBXc9ntcyea2a1CRLXGSAN_0glXcF88CohgY,2685
55
+ datachain/lib/dataset_info.py,sha256=3APfNYMWizIwXhgRYpMQKSeVntNAvQuBbbB25dV7mgY,2460
56
+ datachain/lib/dc.py,sha256=J7liATKQBJCkeHanVLr0s3d1t5wxiiiSJuSbuxKBbLg,89527
47
57
  datachain/lib/file.py,sha256=-XMkL6ED1sE7TMhWoMRTEuOXswZJw8X6AEmJDONFP74,15019
48
- datachain/lib/hf.py,sha256=BW2NPpqxkpPwkSaGlppT8Rbs8zPpyYC-tR6htY08c-0,5817
58
+ datachain/lib/hf.py,sha256=a-zFpDmZIR4r8dlNNTjfpAKSnuJ9xyRXlgcdENiXt3E,5864
49
59
  datachain/lib/image.py,sha256=AMXYwQsmarZjRbPCZY3M1jDsM2WAB_b3cTY4uOIuXNU,2675
50
60
  datachain/lib/listing.py,sha256=cVkCp7TRVpcZKSx-Bbk9t51bQI9Mw0o86W6ZPhAsuzM,3667
51
61
  datachain/lib/listing_info.py,sha256=9ua40Hw0aiQByUw3oAEeNzMavJYfW0Uhe8YdCTK-m_g,1110
@@ -53,31 +63,32 @@ datachain/lib/meta_formats.py,sha256=anK2bDVbaeCCh0yvKUBaW2MVos3zRgdaSV8uSduzPcU
53
63
  datachain/lib/model_store.py,sha256=DNIv8Y6Jtk1_idNLzIpsThOsdW2BMAudyUCbPUcgcxk,2515
54
64
  datachain/lib/pytorch.py,sha256=W-ARi2xH1f1DUkVfRuerW-YWYgSaJASmNCxtz2lrJGI,6072
55
65
  datachain/lib/settings.py,sha256=ZELRCTLbi5vzRPiDX6cQ9LLg9TefJ_A05gIGni0lll8,2535
56
- datachain/lib/signal_schema.py,sha256=xwkE5bxJxUhZTjrA6jqN87XbSXPikCbL6eOPL9WyrKM,24556
66
+ datachain/lib/signal_schema.py,sha256=_uh19nCKhiD9ua8oIN1Q8R9iYv1BZAuqTJCLYVmyW8k,24557
57
67
  datachain/lib/tar.py,sha256=3WIzao6yD5fbLqXLTt9GhPGNonbFIs_fDRu-9vgLgsA,1038
58
68
  datachain/lib/text.py,sha256=UNHm8fhidk7wdrWqacEWaA6I9ykfYqarQ2URby7jc7M,1261
59
69
  datachain/lib/udf.py,sha256=-j0krjNAELTqRI0dB1N65AmawtcIY5vN---AuUcW8Us,13637
60
70
  datachain/lib/udf_signature.py,sha256=GXw24A-Olna6DWCdgy2bC-gZh_gLGPQ-KvjuI6pUjC0,7281
61
- datachain/lib/utils.py,sha256=6NwgWLl5JrgtD4rsSFEe-yR2ntEwJMJEtAZ3FIxK3fg,1529
71
+ datachain/lib/utils.py,sha256=om-MCiyYwvPHtFq3V2rBKrRDNkio9XXofj7RsUIlHKU,1586
62
72
  datachain/lib/vfile.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
73
  datachain/lib/webdataset.py,sha256=o7SHk5HOUWsZ5Ln04xOM04eQqiBHiJNO7xLgyVBrwo8,6924
64
- datachain/lib/webdataset_laion.py,sha256=aGMWeFmeYNK75ewO9JTA11iB1i3QtTzUfenQA5jajfo,2535
74
+ datachain/lib/webdataset_laion.py,sha256=xvT6m_r5y0KbOx14BUe7UC5mOgrktJq53Mh-H0EVlUE,2525
65
75
  datachain/lib/convert/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
76
  datachain/lib/convert/flatten.py,sha256=Uebc5CeqCsacp-nr6IG9i6OGuUavXqdqnoGctZBk3RQ,1384
67
77
  datachain/lib/convert/python_to_sql.py,sha256=40SAOdoOgikZRhn8iomCPDRoxC3RFxjJLivEAA9MHDU,2880
68
78
  datachain/lib/convert/sql_to_python.py,sha256=XXCBYDQFUXJIBNWkjEP944cnCfJ8GF2Tji0DLF3A_zQ,315
69
79
  datachain/lib/convert/unflatten.py,sha256=Ogvh_5wg2f38_At_1lN0D_e2uZOOpYEvwvB2xdq56Tw,2012
70
80
  datachain/lib/convert/values_to_tuples.py,sha256=varRCnSMT_pZmHznrd2Yi05qXLLz_v9YH_pOCpHSkdc,3921
71
- datachain/lib/func/__init__.py,sha256=wlAKhGV0QDg9y7reSwoUF8Vicfqh_YOUNIXLzxICGz4,403
72
- datachain/lib/func/aggregate.py,sha256=H1ziFQdaK9zvnxvttfnEzkkyGvEEmMAvmgCsBV6nfm8,10917
73
- datachain/lib/func/func.py,sha256=HAJZ_tpiRG2R-et7pr0WnoyNZYtpbPn3_HBuL3RQpbU,4800
74
- datachain/lib/models/__init__.py,sha256=AGvjPbUokJiir3uelTa4XGtNSECkMFc5Xmi_N3AtxPQ,119
75
- datachain/lib/models/bbox.py,sha256=aiYNhvEcRK3dEN4MBcptmkPKc9kMP16ZQdu7xPk6hek,1555
76
- datachain/lib/models/pose.py,sha256=peuJPNSiGuTXfCfGIABwv8PGYistvTTBmtf-8X8E_eA,1077
77
- datachain/lib/models/yolo.py,sha256=eftoJDUa8iOpFTF1EkKVAd5Q-3HRd6X4eCIZ9h5p4nI,972
81
+ datachain/model/__init__.py,sha256=R9faX5OHV1xh2EW-g2MPedwbtEqt3LodJRyluB-QylI,189
82
+ datachain/model/bbox.py,sha256=1Li1G3RdiQwLOAc2Mak2nQU0bcvdH-lXmXtA984CUWM,3154
83
+ datachain/model/pose.py,sha256=q9NgB8h66aKnYnLi7Pyf9bU-F_90W4cbvtSO3-_hkdk,3078
84
+ datachain/model/segment.py,sha256=iRWf0KieXfSM1eGD9Y7THx8L_EMB79Sk8WVebs3xSbQ,1593
85
+ datachain/model/ultralytics/__init__.py,sha256=EvcNX9qUyxKXXlKCPpsXeRrabyXk5E9EkN-tyiYkfS4,750
86
+ datachain/model/ultralytics/bbox.py,sha256=OZ9XBdyMOYc401P-RhfSN9QaYvMpnx2Phu9ptaJgZBY,4316
87
+ datachain/model/ultralytics/pose.py,sha256=71KBTcoST2wcEtsyGXqLVpvUtqbp9gwZGA15pEPtX5A,2959
88
+ datachain/model/ultralytics/segment.py,sha256=Z1ab0tZRJubSYNH4KkFlzhYeGNTfAyC71KmkQcToHDQ,2760
78
89
  datachain/query/__init__.py,sha256=7DhEIjAA8uZJfejruAVMZVcGFmvUpffuZJwgRqNwe-c,263
79
90
  datachain/query/batch.py,sha256=5fEhORFe7li12SdYddaSK3LyqksMfCHhwN1_A6TfsA4,3485
80
- datachain/query/dataset.py,sha256=sQny-ZemB2HueC4mPg-7qSaqUD85MMO-DQyVVP8K1CA,53765
91
+ datachain/query/dataset.py,sha256=bQVG4WnJfBQpvnxouIdDlsJF2gB8V4lDp4Zu9JeZ-rc,54771
81
92
  datachain/query/dispatch.py,sha256=wjjTWw6sFQbB9SKRh78VbfvwSMgJXCfqJklS3-9KnCU,12025
82
93
  datachain/query/metrics.py,sha256=r5b0ygYhokbXp8Mg3kCH8iFSRw0jxzyeBe-C-J_bKFc,938
83
94
  datachain/query/params.py,sha256=O_j89mjYRLOwWNhYZl-z7mi-rkdP7WyFmaDufsdTryE,863
@@ -86,13 +97,13 @@ datachain/query/schema.py,sha256=b_KnVy6B26Ol4nYG0LqNNpeQ1QYPk95YRGUjXfdaQWs,660
86
97
  datachain/query/session.py,sha256=50SOdLNCjqHHKI-L4xGXyzTVxzMWfANqKqjeYre-c2k,5959
87
98
  datachain/remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
99
  datachain/remote/studio.py,sha256=g88kHdlRhmruiWwoIxq_JJoymZUrtMAL937NWQyWyXI,9209
89
- datachain/sql/__init__.py,sha256=A2djrbQwSMUZZEIKGnm-mnRA-NDSbiDJNpAmmwGNyIo,303
90
- datachain/sql/selectable.py,sha256=fBM-wS1TUA42kVEAAiwqGtibIevyZAEritwt8PZGyLQ,1589
100
+ datachain/sql/__init__.py,sha256=6SQRdbljO3d2hx3EAVXEZrHQKv5jth0Jh98PogT59No,262
101
+ datachain/sql/selectable.py,sha256=cTc60qVoAwqqss0Vop8Lt5Z-ROnM1XrQmL_GLjRxhXs,1765
91
102
  datachain/sql/types.py,sha256=ASSPkmM5EzdRindqj2O7WHLXq8VHAgFYedG8lYfGvVI,14045
92
103
  datachain/sql/utils.py,sha256=rzlJw08etivdrcuQPqNVvVWhuVSyUPUQEEc6DOhu258,818
93
104
  datachain/sql/default/__init__.py,sha256=XQ2cEZpzWiABqjV-6yYHUBGI9vN_UHxbxZENESmVAWw,45
94
105
  datachain/sql/default/base.py,sha256=QD-31C6JnyOXzogyDx90sUhm7QvgXIYpeHEASH84igU,628
95
- datachain/sql/functions/__init__.py,sha256=-vIkU0AqwOW5FX6P89xYl-uBIUdt46CEnCtshmN85gM,400
106
+ datachain/sql/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
107
  datachain/sql/functions/aggregate.py,sha256=3AQdA8YHPFdtCEfwZKQXTT8SlQWdG9gD5PBtGN3Odqs,944
97
108
  datachain/sql/functions/array.py,sha256=rvH27SWN9gdh_mFnp0GIiXuCrNW6n8ZbY4I_JUS-_e0,1140
98
109
  datachain/sql/functions/conditional.py,sha256=q7YUKfunXeEldXaxgT-p5pUTcOEVU_tcQ2BJlquTRPs,207
@@ -100,15 +111,15 @@ datachain/sql/functions/path.py,sha256=zixpERotTFP6LZ7I4TiGtyRA8kXOoZmH1yzH9oRW0
100
111
  datachain/sql/functions/random.py,sha256=vBwEEj98VH4LjWixUCygQ5Bz1mv1nohsCG0-ZTELlVg,271
101
112
  datachain/sql/functions/string.py,sha256=DYgiw8XSk7ge7GXvyRI1zbaMruIizNeI-puOjriQGZQ,1148
102
113
  datachain/sql/sqlite/__init__.py,sha256=TAdJX0Bg28XdqPO-QwUVKy8rg78cgMileHvMNot7d04,166
103
- datachain/sql/sqlite/base.py,sha256=aHSZVvh4XSVkvZ07h3jMoRlHI4sWD8y3SnmGs9xMG9Y,14375
114
+ datachain/sql/sqlite/base.py,sha256=X4iEynOAqqvqz8lmgUKvURleKO6aguULgG8RoufKrSk,14772
104
115
  datachain/sql/sqlite/types.py,sha256=lPXS1XbkmUtlkkiRxy_A_UzsgpPv2VSkXYOD4zIHM4w,1734
105
116
  datachain/sql/sqlite/vector.py,sha256=ncW4eu2FlJhrP_CIpsvtkUabZlQdl2D5Lgwy_cbfqR0,469
106
117
  datachain/toolkit/__init__.py,sha256=eQ58Q5Yf_Fgv1ZG0IO5dpB4jmP90rk8YxUWmPc1M2Bo,68
107
- datachain/toolkit/split.py,sha256=6FcEJgUsJsUcCqKW5aXuJy4DvbcQ7_dFbsfNPhn8EVg,2377
118
+ datachain/toolkit/split.py,sha256=ZgDcrNiKiPXZmKD591_1z9qRIXitu5zwAsoVPB7ykiU,2508
108
119
  datachain/torch/__init__.py,sha256=gIS74PoEPy4TB3X6vx9nLO0Y3sLJzsA8ckn8pRWihJM,579
109
- datachain-0.7.0.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
110
- datachain-0.7.0.dist-info/METADATA,sha256=Cm0v22C-aT14JBG4NjNQmM7kvhYZFAf6rh0yDAMRWFU,18037
111
- datachain-0.7.0.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
112
- datachain-0.7.0.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
113
- datachain-0.7.0.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
114
- datachain-0.7.0.dist-info/RECORD,,
120
+ datachain-0.7.2.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
121
+ datachain-0.7.2.dist-info/METADATA,sha256=FuinZ-OIUuKz_b26-eirZl4hJdHJ4oOa8MO-LxzGywc,18006
122
+ datachain-0.7.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
123
+ datachain-0.7.2.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
124
+ datachain-0.7.2.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
125
+ datachain-0.7.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,32 +0,0 @@
1
- from .aggregate import (
2
- any_value,
3
- avg,
4
- collect,
5
- concat,
6
- count,
7
- dense_rank,
8
- first,
9
- max,
10
- min,
11
- rank,
12
- row_number,
13
- sum,
14
- )
15
- from .func import Func, window
16
-
17
- __all__ = [
18
- "Func",
19
- "any_value",
20
- "avg",
21
- "collect",
22
- "concat",
23
- "count",
24
- "dense_rank",
25
- "first",
26
- "max",
27
- "min",
28
- "rank",
29
- "row_number",
30
- "sum",
31
- "window",
32
- ]
@@ -1,152 +0,0 @@
1
- from dataclasses import dataclass
2
- from typing import TYPE_CHECKING, Callable, Optional
3
-
4
- from sqlalchemy import desc
5
-
6
- from datachain.lib.convert.python_to_sql import python_to_sql
7
- from datachain.lib.utils import DataChainColumnError, DataChainParamsError
8
- from datachain.query.schema import Column, ColumnMeta
9
-
10
- if TYPE_CHECKING:
11
- from datachain import DataType
12
- from datachain.lib.signal_schema import SignalSchema
13
-
14
-
15
- @dataclass
16
- class Window:
17
- """Represents a window specification for SQL window functions."""
18
-
19
- partition_by: str
20
- order_by: str
21
- desc: bool = False
22
-
23
-
24
- def window(partition_by: str, order_by: str, desc: bool = False) -> Window:
25
- """
26
- Defines a window specification for SQL window functions.
27
-
28
- The `window` function specifies how to partition and order the result set
29
- for the associated window function. It is used to define the scope of the rows
30
- that the window function will operate on.
31
-
32
- Args:
33
- partition_by (str): The column name by which to partition the result set.
34
- Rows with the same value in the partition column
35
- will be grouped together for the window function.
36
- order_by (str): The column name by which to order the rows
37
- within each partition. This determines the sequence in which
38
- the window function is applied.
39
- desc (bool, optional): If True, the rows will be ordered in descending order.
40
- Defaults to False, which orders the rows
41
- in ascending order.
42
-
43
- Returns:
44
- Window: A Window object representing the window specification.
45
-
46
- Example:
47
- ```py
48
- window = func.window(partition_by="signal.category", order_by="created_at")
49
- dc.mutate(
50
- row_number=func.row_number().over(window),
51
- )
52
- ```
53
- """
54
- return Window(
55
- ColumnMeta.to_db_name(partition_by),
56
- ColumnMeta.to_db_name(order_by),
57
- desc,
58
- )
59
-
60
-
61
- class Func:
62
- """Represents a function to be applied to a column in a SQL query."""
63
-
64
- def __init__(
65
- self,
66
- name: str,
67
- inner: Callable,
68
- col: Optional[str] = None,
69
- result_type: Optional["DataType"] = None,
70
- is_array: bool = False,
71
- is_window: bool = False,
72
- window: Optional[Window] = None,
73
- ) -> None:
74
- self.name = name
75
- self.inner = inner
76
- self.col = col
77
- self.result_type = result_type
78
- self.is_array = is_array
79
- self.is_window = is_window
80
- self.window = window
81
-
82
- def __str__(self) -> str:
83
- return self.name + "()"
84
-
85
- def over(self, window: Window) -> "Func":
86
- if not self.is_window:
87
- raise DataChainParamsError(f"{self} doesn't support window (over())")
88
-
89
- return Func(
90
- "over",
91
- self.inner,
92
- self.col,
93
- self.result_type,
94
- self.is_array,
95
- self.is_window,
96
- window,
97
- )
98
-
99
- @property
100
- def db_col(self) -> Optional[str]:
101
- return ColumnMeta.to_db_name(self.col) if self.col else None
102
-
103
- def db_col_type(self, signals_schema: "SignalSchema") -> Optional["DataType"]:
104
- if not self.db_col:
105
- return None
106
- col_type: type = signals_schema.get_column_type(self.db_col)
107
- return list[col_type] if self.is_array else col_type # type: ignore[valid-type]
108
-
109
- def get_result_type(self, signals_schema: "SignalSchema") -> "DataType":
110
- if self.result_type:
111
- return self.result_type
112
-
113
- if col_type := self.db_col_type(signals_schema):
114
- return col_type
115
-
116
- raise DataChainColumnError(
117
- str(self),
118
- "Column name is required to infer result type",
119
- )
120
-
121
- def get_column(
122
- self, signals_schema: "SignalSchema", label: Optional[str] = None
123
- ) -> Column:
124
- col_type = self.get_result_type(signals_schema)
125
- sql_type = python_to_sql(col_type)
126
-
127
- if self.col:
128
- col = Column(self.db_col, sql_type)
129
- func_col = self.inner(col)
130
- else:
131
- func_col = self.inner()
132
-
133
- if self.is_window:
134
- if not self.window:
135
- raise DataChainParamsError(
136
- f"Window function {self} requires over() clause with a window spec",
137
- )
138
- func_col = func_col.over(
139
- partition_by=self.window.partition_by,
140
- order_by=(
141
- desc(self.window.order_by)
142
- if self.window.desc
143
- else self.window.order_by
144
- ),
145
- )
146
-
147
- func_col.type = sql_type
148
-
149
- if label:
150
- func_col = func_col.label(label)
151
-
152
- return func_col
@@ -1,5 +0,0 @@
1
- from . import yolo
2
- from .bbox import BBox
3
- from .pose import Pose, Pose3D
4
-
5
- __all__ = ["BBox", "Pose", "Pose3D", "yolo"]
@@ -1,45 +0,0 @@
1
- from typing import Optional
2
-
3
- from pydantic import Field
4
-
5
- from datachain.lib.data_model import DataModel
6
-
7
-
8
- class BBox(DataModel):
9
- """
10
- A data model for representing bounding boxes.
11
-
12
- Attributes:
13
- title (str): The title of the bounding box.
14
- x1 (float): The x-coordinate of the top-left corner of the bounding box.
15
- y1 (float): The y-coordinate of the top-left corner of the bounding box.
16
- x2 (float): The x-coordinate of the bottom-right corner of the bounding box.
17
- y2 (float): The y-coordinate of the bottom-right corner of the bounding box.
18
-
19
- The bounding box is defined by two points:
20
- - (x1, y1): The top-left corner of the box.
21
- - (x2, y2): The bottom-right corner of the box.
22
- """
23
-
24
- title: str = Field(default="")
25
- x1: float = Field(default=0)
26
- y1: float = Field(default=0)
27
- x2: float = Field(default=0)
28
- y2: float = Field(default=0)
29
-
30
- @staticmethod
31
- def from_xywh(bbox: list[float], title: Optional[str] = None) -> "BBox":
32
- """
33
- Converts a bounding box in (x, y, width, height) format
34
- to a BBox data model instance.
35
-
36
- Args:
37
- bbox (list[float]): A bounding box, represented as a list
38
- of four floats [x, y, width, height].
39
-
40
- Returns:
41
- BBox2D: An instance of the BBox data model.
42
- """
43
- assert len(bbox) == 4, f"Bounding box must have 4 elements, got f{len(bbox)}"
44
- x, y, w, h = bbox
45
- return BBox(title=title or "", x1=x, y1=y, x2=x + w, y2=y + h)
@@ -1,37 +0,0 @@
1
- from pydantic import Field
2
-
3
- from datachain.lib.data_model import DataModel
4
-
5
-
6
- class Pose(DataModel):
7
- """
8
- A data model for representing pose keypoints.
9
-
10
- Attributes:
11
- x (list[float]): The x-coordinates of the keypoints.
12
- y (list[float]): The y-coordinates of the keypoints.
13
-
14
- The keypoints are represented as lists of x and y coordinates, where each index
15
- corresponds to a specific body part.
16
- """
17
-
18
- x: list[float] = Field(default=None)
19
- y: list[float] = Field(default=None)
20
-
21
-
22
- class Pose3D(DataModel):
23
- """
24
- A data model for representing 3D pose keypoints.
25
-
26
- Attributes:
27
- x (list[float]): The x-coordinates of the keypoints.
28
- y (list[float]): The y-coordinates of the keypoints.
29
- visible (list[float]): The visibility of the keypoints.
30
-
31
- The keypoints are represented as lists of x, y, and visibility values,
32
- where each index corresponds to a specific body part.
33
- """
34
-
35
- x: list[float] = Field(default=None)
36
- y: list[float] = Field(default=None)
37
- visible: list[float] = Field(default=None)
@@ -1,39 +0,0 @@
1
- """
2
- This module contains the YOLO models.
3
-
4
- YOLO stands for "You Only Look Once", a family of object detection models that
5
- are designed to be fast and accurate. The models are trained to detect objects
6
- in images by dividing the image into a grid and predicting the bounding boxes
7
- and class probabilities for each grid cell.
8
-
9
- More information about YOLO can be found here:
10
- - https://pjreddie.com/darknet/yolo/
11
- - https://docs.ultralytics.com/
12
- """
13
-
14
-
15
- class PoseBodyPart:
16
- """
17
- An enumeration of body parts for YOLO pose keypoints.
18
-
19
- More information about the body parts can be found here:
20
- https://docs.ultralytics.com/tasks/pose/
21
- """
22
-
23
- nose = 0
24
- left_eye = 1
25
- right_eye = 2
26
- left_ear = 3
27
- right_ear = 4
28
- left_shoulder = 5
29
- right_shoulder = 6
30
- left_elbow = 7
31
- right_elbow = 8
32
- left_wrist = 9
33
- right_wrist = 10
34
- left_hip = 11
35
- right_hip = 12
36
- left_knee = 13
37
- right_knee = 14
38
- left_ankle = 15
39
- right_ankle = 16