datachain 0.6.7__tar.gz → 0.6.8__tar.gz

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 (262) hide show
  1. {datachain-0.6.7 → datachain-0.6.8}/.github/workflows/tests-studio.yml +1 -1
  2. {datachain-0.6.7/src/datachain.egg-info → datachain-0.6.8}/PKG-INFO +3 -1
  3. {datachain-0.6.7 → datachain-0.6.8}/pyproject.toml +4 -2
  4. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/__init__.py +2 -1
  5. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/cli.py +137 -23
  6. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/file.py +0 -3
  7. datachain-0.6.8/src/datachain/lib/models/__init__.py +5 -0
  8. datachain-0.6.8/src/datachain/lib/models/bbox.py +45 -0
  9. datachain-0.6.8/src/datachain/lib/models/pose.py +37 -0
  10. datachain-0.6.8/src/datachain/lib/models/yolo.py +39 -0
  11. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/remote/studio.py +12 -2
  12. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/studio.py +18 -6
  13. {datachain-0.6.7 → datachain-0.6.8/src/datachain.egg-info}/PKG-INFO +3 -1
  14. {datachain-0.6.7 → datachain-0.6.8}/src/datachain.egg-info/SOURCES.txt +5 -0
  15. {datachain-0.6.7 → datachain-0.6.8}/src/datachain.egg-info/requires.txt +2 -0
  16. {datachain-0.6.7 → datachain-0.6.8}/tests/conftest.py +28 -0
  17. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_ls.py +4 -13
  18. {datachain-0.6.7 → datachain-0.6.8}/tests/test_cli_e2e.py +17 -8
  19. {datachain-0.6.7 → datachain-0.6.8}/tests/test_cli_studio.py +64 -18
  20. datachain-0.6.8/tests/unit/lib/test_models.py +50 -0
  21. {datachain-0.6.7 → datachain-0.6.8}/.cruft.json +0 -0
  22. {datachain-0.6.7 → datachain-0.6.8}/.gitattributes +0 -0
  23. {datachain-0.6.7 → datachain-0.6.8}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  24. {datachain-0.6.7 → datachain-0.6.8}/.github/ISSUE_TEMPLATE/empty_issue.md +0 -0
  25. {datachain-0.6.7 → datachain-0.6.8}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  26. {datachain-0.6.7 → datachain-0.6.8}/.github/codecov.yaml +0 -0
  27. {datachain-0.6.7 → datachain-0.6.8}/.github/dependabot.yml +0 -0
  28. {datachain-0.6.7 → datachain-0.6.8}/.github/workflows/benchmarks.yml +0 -0
  29. {datachain-0.6.7 → datachain-0.6.8}/.github/workflows/release.yml +0 -0
  30. {datachain-0.6.7 → datachain-0.6.8}/.github/workflows/tests.yml +0 -0
  31. {datachain-0.6.7 → datachain-0.6.8}/.github/workflows/update-template.yaml +0 -0
  32. {datachain-0.6.7 → datachain-0.6.8}/.gitignore +0 -0
  33. {datachain-0.6.7 → datachain-0.6.8}/.pre-commit-config.yaml +0 -0
  34. {datachain-0.6.7 → datachain-0.6.8}/CODE_OF_CONDUCT.rst +0 -0
  35. {datachain-0.6.7 → datachain-0.6.8}/CONTRIBUTING.rst +0 -0
  36. {datachain-0.6.7 → datachain-0.6.8}/LICENSE +0 -0
  37. {datachain-0.6.7 → datachain-0.6.8}/README.rst +0 -0
  38. {datachain-0.6.7 → datachain-0.6.8}/docs/assets/captioned_cartoons.png +0 -0
  39. {datachain-0.6.7 → datachain-0.6.8}/docs/assets/datachain-white.svg +0 -0
  40. {datachain-0.6.7 → datachain-0.6.8}/docs/assets/datachain.svg +0 -0
  41. {datachain-0.6.7 → datachain-0.6.8}/docs/assets/flowchart.png +0 -0
  42. {datachain-0.6.7 → datachain-0.6.8}/docs/index.md +0 -0
  43. {datachain-0.6.7 → datachain-0.6.8}/docs/references/datachain.md +0 -0
  44. {datachain-0.6.7 → datachain-0.6.8}/docs/references/datatype.md +0 -0
  45. {datachain-0.6.7 → datachain-0.6.8}/docs/references/file.md +0 -0
  46. {datachain-0.6.7 → datachain-0.6.8}/docs/references/index.md +0 -0
  47. {datachain-0.6.7 → datachain-0.6.8}/docs/references/sql.md +0 -0
  48. {datachain-0.6.7 → datachain-0.6.8}/docs/references/torch.md +0 -0
  49. {datachain-0.6.7 → datachain-0.6.8}/docs/references/udf.md +0 -0
  50. {datachain-0.6.7 → datachain-0.6.8}/examples/computer_vision/iptc_exif_xmp_lib.py +0 -0
  51. {datachain-0.6.7 → datachain-0.6.8}/examples/computer_vision/llava2_image_desc_lib.py +0 -0
  52. {datachain-0.6.7 → datachain-0.6.8}/examples/computer_vision/openimage-detect.py +0 -0
  53. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/common_sql_functions.py +0 -0
  54. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/json-csv-reader.py +0 -0
  55. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/torch-loader.py +0 -0
  56. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/udfs/parallel.py +0 -0
  57. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/udfs/simple.py +0 -0
  58. {datachain-0.6.7 → datachain-0.6.8}/examples/get_started/udfs/stateful.py +0 -0
  59. {datachain-0.6.7 → datachain-0.6.8}/examples/llm_and_nlp/claude-query.py +0 -0
  60. {datachain-0.6.7 → datachain-0.6.8}/examples/llm_and_nlp/hf-dataset-llm-eval.py +0 -0
  61. {datachain-0.6.7 → datachain-0.6.8}/examples/llm_and_nlp/unstructured-embeddings-gen.py +0 -0
  62. {datachain-0.6.7 → datachain-0.6.8}/examples/llm_and_nlp/unstructured-summary-map.py +0 -0
  63. {datachain-0.6.7 → datachain-0.6.8}/examples/multimodal/clip_inference.py +0 -0
  64. {datachain-0.6.7 → datachain-0.6.8}/examples/multimodal/hf_pipeline.py +0 -0
  65. {datachain-0.6.7 → datachain-0.6.8}/examples/multimodal/openai_image_desc_lib.py +0 -0
  66. {datachain-0.6.7 → datachain-0.6.8}/examples/multimodal/wds.py +0 -0
  67. {datachain-0.6.7 → datachain-0.6.8}/examples/multimodal/wds_filtered.py +0 -0
  68. {datachain-0.6.7 → datachain-0.6.8}/mkdocs.yml +0 -0
  69. {datachain-0.6.7 → datachain-0.6.8}/noxfile.py +0 -0
  70. {datachain-0.6.7 → datachain-0.6.8}/overrides/main.html +0 -0
  71. {datachain-0.6.7 → datachain-0.6.8}/setup.cfg +0 -0
  72. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/__main__.py +0 -0
  73. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/asyn.py +0 -0
  74. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/cache.py +0 -0
  75. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/catalog/__init__.py +0 -0
  76. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/catalog/catalog.py +0 -0
  77. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/catalog/datasource.py +0 -0
  78. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/catalog/loader.py +0 -0
  79. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/cli_utils.py +0 -0
  80. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/__init__.py +0 -0
  81. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/azure.py +0 -0
  82. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/fileslice.py +0 -0
  83. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/fsspec.py +0 -0
  84. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/gcs.py +0 -0
  85. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/hf.py +0 -0
  86. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/local.py +0 -0
  87. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/client/s3.py +0 -0
  88. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/config.py +0 -0
  89. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/__init__.py +0 -0
  90. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/db_engine.py +0 -0
  91. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/id_generator.py +0 -0
  92. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/job.py +0 -0
  93. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/metastore.py +0 -0
  94. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/schema.py +0 -0
  95. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/serializer.py +0 -0
  96. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/sqlite.py +0 -0
  97. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/data_storage/warehouse.py +0 -0
  98. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/dataset.py +0 -0
  99. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/error.py +0 -0
  100. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/job.py +0 -0
  101. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/__init__.py +0 -0
  102. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/arrow.py +0 -0
  103. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/clip.py +0 -0
  104. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/__init__.py +0 -0
  105. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/flatten.py +0 -0
  106. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/python_to_sql.py +0 -0
  107. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/sql_to_python.py +0 -0
  108. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/unflatten.py +0 -0
  109. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/convert/values_to_tuples.py +0 -0
  110. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/data_model.py +0 -0
  111. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/dataset_info.py +0 -0
  112. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/dc.py +0 -0
  113. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/func/__init__.py +0 -0
  114. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/func/aggregate.py +0 -0
  115. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/func/func.py +0 -0
  116. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/hf.py +0 -0
  117. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/image.py +0 -0
  118. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/listing.py +0 -0
  119. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/listing_info.py +0 -0
  120. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/meta_formats.py +0 -0
  121. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/model_store.py +0 -0
  122. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/pytorch.py +0 -0
  123. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/settings.py +0 -0
  124. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/signal_schema.py +0 -0
  125. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/tar.py +0 -0
  126. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/text.py +0 -0
  127. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/udf.py +0 -0
  128. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/udf_signature.py +0 -0
  129. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/utils.py +0 -0
  130. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/vfile.py +0 -0
  131. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/webdataset.py +0 -0
  132. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/lib/webdataset_laion.py +0 -0
  133. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/listing.py +0 -0
  134. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/node.py +0 -0
  135. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/nodes_fetcher.py +0 -0
  136. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/nodes_thread_pool.py +0 -0
  137. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/progress.py +0 -0
  138. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/py.typed +0 -0
  139. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/__init__.py +0 -0
  140. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/batch.py +0 -0
  141. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/dataset.py +0 -0
  142. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/dispatch.py +0 -0
  143. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/metrics.py +0 -0
  144. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/params.py +0 -0
  145. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/queue.py +0 -0
  146. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/schema.py +0 -0
  147. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/query/session.py +0 -0
  148. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/remote/__init__.py +0 -0
  149. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/__init__.py +0 -0
  150. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/default/__init__.py +0 -0
  151. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/default/base.py +0 -0
  152. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/__init__.py +0 -0
  153. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/aggregate.py +0 -0
  154. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/array.py +0 -0
  155. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/conditional.py +0 -0
  156. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/path.py +0 -0
  157. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/random.py +0 -0
  158. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/functions/string.py +0 -0
  159. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/selectable.py +0 -0
  160. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/sqlite/__init__.py +0 -0
  161. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/sqlite/base.py +0 -0
  162. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/sqlite/types.py +0 -0
  163. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/sqlite/vector.py +0 -0
  164. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/types.py +0 -0
  165. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/sql/utils.py +0 -0
  166. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/telemetry.py +0 -0
  167. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/torch/__init__.py +0 -0
  168. {datachain-0.6.7 → datachain-0.6.8}/src/datachain/utils.py +0 -0
  169. {datachain-0.6.7 → datachain-0.6.8}/src/datachain.egg-info/dependency_links.txt +0 -0
  170. {datachain-0.6.7 → datachain-0.6.8}/src/datachain.egg-info/entry_points.txt +0 -0
  171. {datachain-0.6.7 → datachain-0.6.8}/src/datachain.egg-info/top_level.txt +0 -0
  172. {datachain-0.6.7 → datachain-0.6.8}/tests/__init__.py +0 -0
  173. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/__init__.py +0 -0
  174. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/conftest.py +0 -0
  175. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/datasets/.dvc/.gitignore +0 -0
  176. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/datasets/.dvc/config +0 -0
  177. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/datasets/.gitignore +0 -0
  178. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/datasets/laion-tiny.npz.dvc +0 -0
  179. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/test_datachain.py +0 -0
  180. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/test_ls.py +0 -0
  181. {datachain-0.6.7 → datachain-0.6.8}/tests/benchmarks/test_version.py +0 -0
  182. {datachain-0.6.7 → datachain-0.6.8}/tests/data.py +0 -0
  183. {datachain-0.6.7 → datachain-0.6.8}/tests/examples/__init__.py +0 -0
  184. {datachain-0.6.7 → datachain-0.6.8}/tests/examples/test_examples.py +0 -0
  185. {datachain-0.6.7 → datachain-0.6.8}/tests/examples/test_wds_e2e.py +0 -0
  186. {datachain-0.6.7 → datachain-0.6.8}/tests/examples/wds_data.py +0 -0
  187. {datachain-0.6.7 → datachain-0.6.8}/tests/func/__init__.py +0 -0
  188. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_catalog.py +0 -0
  189. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_client.py +0 -0
  190. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_datachain.py +0 -0
  191. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_dataset_query.py +0 -0
  192. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_datasets.py +0 -0
  193. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_feature_pickling.py +0 -0
  194. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_listing.py +0 -0
  195. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_meta_formats.py +0 -0
  196. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_metrics.py +0 -0
  197. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_pull.py +0 -0
  198. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_pytorch.py +0 -0
  199. {datachain-0.6.7 → datachain-0.6.8}/tests/func/test_query.py +0 -0
  200. {datachain-0.6.7 → datachain-0.6.8}/tests/scripts/feature_class.py +0 -0
  201. {datachain-0.6.7 → datachain-0.6.8}/tests/scripts/feature_class_exception.py +0 -0
  202. {datachain-0.6.7 → datachain-0.6.8}/tests/scripts/feature_class_parallel.py +0 -0
  203. {datachain-0.6.7 → datachain-0.6.8}/tests/scripts/feature_class_parallel_data_model.py +0 -0
  204. {datachain-0.6.7 → datachain-0.6.8}/tests/scripts/name_len_slow.py +0 -0
  205. {datachain-0.6.7 → datachain-0.6.8}/tests/test_atomicity.py +0 -0
  206. {datachain-0.6.7 → datachain-0.6.8}/tests/test_query_e2e.py +0 -0
  207. {datachain-0.6.7 → datachain-0.6.8}/tests/test_telemetry.py +0 -0
  208. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/__init__.py +0 -0
  209. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/__init__.py +0 -0
  210. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/conftest.py +0 -0
  211. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_arrow.py +0 -0
  212. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_clip.py +0 -0
  213. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_datachain.py +0 -0
  214. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_datachain_bootstrap.py +0 -0
  215. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_datachain_merge.py +0 -0
  216. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_feature.py +0 -0
  217. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_feature_utils.py +0 -0
  218. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_file.py +0 -0
  219. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_hf.py +0 -0
  220. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_image.py +0 -0
  221. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_listing_info.py +0 -0
  222. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_schema.py +0 -0
  223. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_signal_schema.py +0 -0
  224. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_sql_to_python.py +0 -0
  225. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_text.py +0 -0
  226. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_udf_signature.py +0 -0
  227. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_utils.py +0 -0
  228. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/lib/test_webdataset.py +0 -0
  229. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/__init__.py +0 -0
  230. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/sqlite/__init__.py +0 -0
  231. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/sqlite/test_utils.py +0 -0
  232. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_array.py +0 -0
  233. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_conditional.py +0 -0
  234. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_path.py +0 -0
  235. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_random.py +0 -0
  236. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_selectable.py +0 -0
  237. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/sql/test_string.py +0 -0
  238. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_asyn.py +0 -0
  239. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_cache.py +0 -0
  240. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_catalog.py +0 -0
  241. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_catalog_loader.py +0 -0
  242. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_cli_parsing.py +0 -0
  243. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_client.py +0 -0
  244. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_client_s3.py +0 -0
  245. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_config.py +0 -0
  246. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_data_storage.py +0 -0
  247. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_database_engine.py +0 -0
  248. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_dataset.py +0 -0
  249. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_dispatch.py +0 -0
  250. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_fileslice.py +0 -0
  251. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_id_generator.py +0 -0
  252. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_listing.py +0 -0
  253. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_metastore.py +0 -0
  254. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_module_exports.py +0 -0
  255. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_query.py +0 -0
  256. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_query_metrics.py +0 -0
  257. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_query_params.py +0 -0
  258. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_serializer.py +0 -0
  259. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_session.py +0 -0
  260. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_utils.py +0 -0
  261. {datachain-0.6.7 → datachain-0.6.8}/tests/unit/test_warehouse.py +0 -0
  262. {datachain-0.6.7 → datachain-0.6.8}/tests/utils.py +0 -0
@@ -32,7 +32,7 @@ jobs:
32
32
  POSTGRES_DB: database
33
33
  POSTGRES_HOST_AUTH_METHOD: trust
34
34
  clickhouse:
35
- image: clickhouse/clickhouse-server:24
35
+ image: clickhouse/clickhouse-server:24.6
36
36
  ports:
37
37
  - 8123:8123
38
38
  - 9010:9000
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datachain
3
- Version: 0.6.7
3
+ Version: 0.6.8
4
4
  Summary: Wrangle unstructured AI data at scale
5
5
  Author-email: Dmitry Petrov <support@dvc.org>
6
6
  License: Apache-2.0
@@ -45,6 +45,7 @@ Requires-Dist: huggingface_hub
45
45
  Requires-Dist: iterative-telemetry>=0.0.9
46
46
  Requires-Dist: platformdirs
47
47
  Requires-Dist: dvc-studio-client<1,>=0.21
48
+ Requires-Dist: tabulate
48
49
  Provides-Extra: docs
49
50
  Requires-Dist: mkdocs>=1.5.2; extra == "docs"
50
51
  Requires-Dist: mkdocs-gen-files>=0.5.0; extra == "docs"
@@ -87,6 +88,7 @@ Requires-Dist: types-python-dateutil; extra == "dev"
87
88
  Requires-Dist: types-pytz; extra == "dev"
88
89
  Requires-Dist: types-PyYAML; extra == "dev"
89
90
  Requires-Dist: types-requests; extra == "dev"
91
+ Requires-Dist: types-tabulate; extra == "dev"
90
92
  Provides-Extra: examples
91
93
  Requires-Dist: datachain[tests]; extra == "examples"
92
94
  Requires-Dist: numpy<2,>=1; extra == "examples"
@@ -47,7 +47,8 @@ dependencies = [
47
47
  "huggingface_hub",
48
48
  "iterative-telemetry>=0.0.9",
49
49
  "platformdirs",
50
- "dvc-studio-client>=0.21,<1"
50
+ "dvc-studio-client>=0.21,<1",
51
+ "tabulate"
51
52
  ]
52
53
 
53
54
  [project.optional-dependencies]
@@ -98,7 +99,8 @@ dev = [
98
99
  "types-python-dateutil",
99
100
  "types-pytz",
100
101
  "types-PyYAML",
101
- "types-requests"
102
+ "types-requests",
103
+ "types-tabulate"
102
104
  ]
103
105
  examples = [
104
106
  "datachain[tests]",
@@ -1,4 +1,4 @@
1
- from datachain.lib import func
1
+ from datachain.lib import func, models
2
2
  from datachain.lib.data_model import DataModel, DataType, is_chain_type
3
3
  from datachain.lib.dc import C, Column, DataChain, Sys
4
4
  from datachain.lib.file import (
@@ -38,5 +38,6 @@ __all__ = [
38
38
  "func",
39
39
  "is_chain_type",
40
40
  "metrics",
41
+ "models",
41
42
  "param",
42
43
  ]
@@ -4,18 +4,21 @@ import shlex
4
4
  import sys
5
5
  import traceback
6
6
  from argparse import Action, ArgumentParser, ArgumentTypeError, Namespace
7
- from collections.abc import Iterable, Iterator, Mapping, Sequence
7
+ from collections.abc import Iterable, Iterator, Sequence
8
8
  from importlib.metadata import PackageNotFoundError, version
9
9
  from itertools import chain
10
10
  from multiprocessing import freeze_support
11
11
  from typing import TYPE_CHECKING, Optional, Union
12
12
 
13
13
  import shtab
14
+ from tabulate import tabulate
14
15
 
15
16
  from datachain import Session, utils
16
17
  from datachain.cli_utils import BooleanOptionalAction, CommaSeparatedArgs, KeyValueArgs
18
+ from datachain.config import Config
19
+ from datachain.error import DataChainError
17
20
  from datachain.lib.dc import DataChain
18
- from datachain.studio import process_studio_cli_args
21
+ from datachain.studio import list_datasets, process_studio_cli_args
19
22
  from datachain.telemetry import telemetry
20
23
 
21
24
  if TYPE_CHECKING:
@@ -416,7 +419,36 @@ def get_parser() -> ArgumentParser: # noqa: PLR0915
416
419
  help="Dataset labels",
417
420
  )
418
421
 
419
- subp.add_parser("ls-datasets", parents=[parent_parser], description="List datasets")
422
+ datasets_parser = subp.add_parser(
423
+ "datasets", parents=[parent_parser], description="List datasets"
424
+ )
425
+ datasets_parser.add_argument(
426
+ "--studio",
427
+ action="store_true",
428
+ default=False,
429
+ help="List the files in the Studio",
430
+ )
431
+ datasets_parser.add_argument(
432
+ "-L",
433
+ "--local",
434
+ action="store_true",
435
+ default=False,
436
+ help="List local files only",
437
+ )
438
+ datasets_parser.add_argument(
439
+ "-a",
440
+ "--all",
441
+ action="store_true",
442
+ default=True,
443
+ help="List all files including hidden files",
444
+ )
445
+ datasets_parser.add_argument(
446
+ "--team",
447
+ action="store",
448
+ default=None,
449
+ help="The team to list datasets for. By default, it will use team from config.",
450
+ )
451
+
420
452
  rm_dataset_parser = subp.add_parser(
421
453
  "rm-dataset", parents=[parent_parser], description="Removes dataset"
422
454
  )
@@ -474,10 +506,30 @@ def get_parser() -> ArgumentParser: # noqa: PLR0915
474
506
  help="List files in the long format",
475
507
  )
476
508
  parse_ls.add_argument(
477
- "--remote",
509
+ "--studio",
510
+ action="store_true",
511
+ default=False,
512
+ help="List the files in the Studio",
513
+ )
514
+ parse_ls.add_argument(
515
+ "-L",
516
+ "--local",
517
+ action="store_true",
518
+ default=False,
519
+ help="List local files only",
520
+ )
521
+ parse_ls.add_argument(
522
+ "-a",
523
+ "--all",
524
+ action="store_true",
525
+ default=True,
526
+ help="List all files including hidden files",
527
+ )
528
+ parse_ls.add_argument(
529
+ "--team",
478
530
  action="store",
479
- default="",
480
- help="Name of remote to use",
531
+ default=None,
532
+ help="The team to list datasets for. By default, it will use team from config.",
481
533
  )
482
534
 
483
535
  parse_du = subp.add_parser(
@@ -758,11 +810,12 @@ def format_ls_entry(entry: str) -> str:
758
810
  def ls_remote(
759
811
  paths: Iterable[str],
760
812
  long: bool = False,
813
+ team: Optional[str] = None,
761
814
  ):
762
815
  from datachain.node import long_line_str
763
816
  from datachain.remote.studio import StudioClient
764
817
 
765
- client = StudioClient()
818
+ client = StudioClient(team=team)
766
819
  first = True
767
820
  for path, response in client.ls(paths):
768
821
  if not first:
@@ -789,28 +842,66 @@ def ls_remote(
789
842
  def ls(
790
843
  sources,
791
844
  long: bool = False,
792
- remote: str = "",
793
- config: Optional[Mapping[str, str]] = None,
845
+ studio: bool = False,
846
+ local: bool = False,
847
+ all: bool = True,
848
+ team: Optional[str] = None,
794
849
  **kwargs,
795
850
  ):
796
- if config is None:
797
- from .config import Config
851
+ token = Config().read().get("studio", {}).get("token")
852
+ all, local, studio = _determine_flavors(studio, local, all, token)
798
853
 
799
- config = Config().get_remote_config(remote=remote)
800
- remote_type = config["type"]
801
- if remote_type == "local":
854
+ if all or local:
802
855
  ls_local(sources, long=long, **kwargs)
803
- else:
804
- ls_remote(
805
- sources,
806
- long=long,
856
+
857
+ if (all or studio) and token:
858
+ ls_remote(sources, long=long, team=team)
859
+
860
+
861
+ def datasets(
862
+ catalog: "Catalog",
863
+ studio: bool = False,
864
+ local: bool = False,
865
+ all: bool = True,
866
+ team: Optional[str] = None,
867
+ ):
868
+ token = Config().read().get("studio", {}).get("token")
869
+ all, local, studio = _determine_flavors(studio, local, all, token)
870
+
871
+ local_datasets = set(list_datasets_local(catalog)) if all or local else set()
872
+ studio_datasets = (
873
+ set(list_datasets(team=team)) if (all or studio) and token else set()
874
+ )
875
+
876
+ rows = [
877
+ _datasets_tabulate_row(
878
+ name=name,
879
+ version=version,
880
+ both=(all or (local and studio)) and token,
881
+ local=(name, version) in local_datasets,
882
+ studio=(name, version) in studio_datasets,
807
883
  )
884
+ for name, version in local_datasets.union(studio_datasets)
885
+ ]
886
+
887
+ print(tabulate(rows, headers="keys"))
808
888
 
809
889
 
810
- def ls_datasets(catalog: "Catalog"):
890
+ def list_datasets_local(catalog: "Catalog"):
811
891
  for d in catalog.ls_datasets():
812
892
  for v in d.versions:
813
- print(f"{d.name} (v{v.version})")
893
+ yield (d.name, v.version)
894
+
895
+
896
+ def _datasets_tabulate_row(name, version, both, local, studio):
897
+ row = {
898
+ "Name": name,
899
+ "Version": version,
900
+ }
901
+ if both:
902
+ row["Studio"] = "\u2714" if studio else "\u2716"
903
+ row["Local"] = "\u2714" if local else "\u2716"
904
+ return row
814
905
 
815
906
 
816
907
  def rm_dataset(
@@ -953,6 +1044,20 @@ def completion(shell: str) -> str:
953
1044
  )
954
1045
 
955
1046
 
1047
+ def _determine_flavors(studio: bool, local: bool, all: bool, token: Optional[str]):
1048
+ if studio and not token:
1049
+ raise DataChainError(
1050
+ "Not logged in to Studio. Log in with 'datachain studio login'."
1051
+ )
1052
+
1053
+ if local or studio:
1054
+ all = False
1055
+
1056
+ all = all and not (local or studio)
1057
+
1058
+ return all, local, studio
1059
+
1060
+
956
1061
  def main(argv: Optional[list[str]] = None) -> int: # noqa: C901, PLR0912, PLR0915
957
1062
  # Required for Windows multiprocessing support
958
1063
  freeze_support()
@@ -1032,12 +1137,21 @@ def main(argv: Optional[list[str]] = None) -> int: # noqa: C901, PLR0912, PLR09
1032
1137
  ls(
1033
1138
  args.sources,
1034
1139
  long=bool(args.long),
1035
- remote=args.remote,
1140
+ studio=args.studio,
1141
+ local=args.local,
1142
+ all=args.all,
1143
+ team=args.team,
1036
1144
  update=bool(args.update),
1037
1145
  client_config=client_config,
1038
1146
  )
1039
- elif args.command == "ls-datasets":
1040
- ls_datasets(catalog)
1147
+ elif args.command == "datasets":
1148
+ datasets(
1149
+ catalog=catalog,
1150
+ studio=args.studio,
1151
+ local=args.local,
1152
+ all=args.all,
1153
+ team=args.team,
1154
+ )
1041
1155
  elif args.command == "show":
1042
1156
  show(
1043
1157
  catalog,
@@ -20,9 +20,6 @@ from PIL import Image
20
20
  from pyarrow.dataset import dataset
21
21
  from pydantic import Field, field_validator
22
22
 
23
- if TYPE_CHECKING:
24
- from typing_extensions import Self
25
-
26
23
  from datachain.client.fileslice import FileSlice
27
24
  from datachain.lib.data_model import DataModel
28
25
  from datachain.lib.utils import DataChainError
@@ -0,0 +1,5 @@
1
+ from . import yolo
2
+ from .bbox import BBox
3
+ from .pose import Pose, Pose3D
4
+
5
+ __all__ = ["BBox", "Pose", "Pose3D", "yolo"]
@@ -0,0 +1,45 @@
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)
@@ -0,0 +1,37 @@
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)
@@ -0,0 +1,39 @@
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
@@ -131,6 +131,12 @@ class StudioClient:
131
131
  timeout=self.timeout,
132
132
  )
133
133
  ok = response.ok
134
+ if not ok:
135
+ if response.status_code == 403:
136
+ message = f"Not authorized for the team {self.team}"
137
+ raise DataChainError(message)
138
+ logger.error("Got bad response from Studio")
139
+
134
140
  content = msgpack.unpackb(response.content, ext_hook=self._unpacker_hook)
135
141
  response_data = content.get("data")
136
142
  if ok and response_data is None:
@@ -177,8 +183,12 @@ class StudioClient:
177
183
  response.content.decode("utf-8"),
178
184
  )
179
185
  if response.status_code == 403:
180
- message = "Not authorized"
186
+ message = f"Not authorized for the team {self.team}"
181
187
  else:
188
+ logger.error(
189
+ "Got bad response from Studio, content is %s",
190
+ response.content.decode("utf-8"),
191
+ )
182
192
  message = data.get("message", "")
183
193
  else:
184
194
  message = ""
@@ -214,7 +224,7 @@ class StudioClient:
214
224
  # to handle cases where a path will be expanded (i.e. globs)
215
225
  response: Response[LsData]
216
226
  for path in paths:
217
- response = self._send_request_msgpack("ls", {"source": path})
227
+ response = self._send_request_msgpack("datachain/ls", {"source": path})
218
228
  yield path, response
219
229
 
220
230
  def ls_datasets(self) -> Response[LsData]:
@@ -1,8 +1,11 @@
1
1
  import os
2
- from typing import TYPE_CHECKING
2
+ from typing import TYPE_CHECKING, Optional
3
+
4
+ from tabulate import tabulate
3
5
 
4
6
  from datachain.catalog.catalog import raise_remote_error
5
7
  from datachain.config import Config, ConfigLevel
8
+ from datachain.dataset import QUERY_DATASET_PREFIX
6
9
  from datachain.error import DataChainError
7
10
  from datachain.remote.studio import StudioClient
8
11
  from datachain.utils import STUDIO_URL
@@ -24,7 +27,13 @@ def process_studio_cli_args(args: "Namespace"):
24
27
  if args.cmd == "token":
25
28
  return token()
26
29
  if args.cmd == "datasets":
27
- return list_datasets(args)
30
+ rows = [
31
+ {"Name": name, "Version": version}
32
+ for name, version in list_datasets(args.team)
33
+ ]
34
+ print(tabulate(rows, headers="keys"))
35
+ return 0
36
+
28
37
  if args.cmd == "team":
29
38
  return set_team(args)
30
39
  raise DataChainError(f"Unknown command '{args.cmd}'.")
@@ -103,19 +112,22 @@ def token():
103
112
  print(token)
104
113
 
105
114
 
106
- def list_datasets(args: "Namespace"):
107
- client = StudioClient(team=args.team)
115
+ def list_datasets(team: Optional[str] = None):
116
+ client = StudioClient(team=team)
108
117
  response = client.ls_datasets()
109
118
  if not response.ok:
110
119
  raise_remote_error(response.message)
111
120
  if not response.data:
112
- print("No datasets found.")
113
121
  return
122
+
114
123
  for d in response.data:
115
124
  name = d.get("name")
125
+ if name and name.startswith(QUERY_DATASET_PREFIX):
126
+ continue
127
+
116
128
  for v in d.get("versions", []):
117
129
  version = v.get("version")
118
- print(f"{name} (v{version})")
130
+ yield (name, version)
119
131
 
120
132
 
121
133
  def save_config(hostname, token):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datachain
3
- Version: 0.6.7
3
+ Version: 0.6.8
4
4
  Summary: Wrangle unstructured AI data at scale
5
5
  Author-email: Dmitry Petrov <support@dvc.org>
6
6
  License: Apache-2.0
@@ -45,6 +45,7 @@ Requires-Dist: huggingface_hub
45
45
  Requires-Dist: iterative-telemetry>=0.0.9
46
46
  Requires-Dist: platformdirs
47
47
  Requires-Dist: dvc-studio-client<1,>=0.21
48
+ Requires-Dist: tabulate
48
49
  Provides-Extra: docs
49
50
  Requires-Dist: mkdocs>=1.5.2; extra == "docs"
50
51
  Requires-Dist: mkdocs-gen-files>=0.5.0; extra == "docs"
@@ -87,6 +88,7 @@ Requires-Dist: types-python-dateutil; extra == "dev"
87
88
  Requires-Dist: types-pytz; extra == "dev"
88
89
  Requires-Dist: types-PyYAML; extra == "dev"
89
90
  Requires-Dist: types-requests; extra == "dev"
91
+ Requires-Dist: types-tabulate; extra == "dev"
90
92
  Provides-Extra: examples
91
93
  Requires-Dist: datachain[tests]; extra == "examples"
92
94
  Requires-Dist: numpy<2,>=1; extra == "examples"
@@ -129,6 +129,10 @@ src/datachain/lib/convert/values_to_tuples.py
129
129
  src/datachain/lib/func/__init__.py
130
130
  src/datachain/lib/func/aggregate.py
131
131
  src/datachain/lib/func/func.py
132
+ src/datachain/lib/models/__init__.py
133
+ src/datachain/lib/models/bbox.py
134
+ src/datachain/lib/models/pose.py
135
+ src/datachain/lib/models/yolo.py
132
136
  src/datachain/query/__init__.py
133
137
  src/datachain/query/batch.py
134
138
  src/datachain/query/dataset.py
@@ -237,6 +241,7 @@ tests/unit/lib/test_file.py
237
241
  tests/unit/lib/test_hf.py
238
242
  tests/unit/lib/test_image.py
239
243
  tests/unit/lib/test_listing_info.py
244
+ tests/unit/lib/test_models.py
240
245
  tests/unit/lib/test_schema.py
241
246
  tests/unit/lib/test_signal_schema.py
242
247
  tests/unit/lib/test_sql_to_python.py
@@ -27,6 +27,7 @@ huggingface_hub
27
27
  iterative-telemetry>=0.0.9
28
28
  platformdirs
29
29
  dvc-studio-client<1,>=0.21
30
+ tabulate
30
31
 
31
32
  [dev]
32
33
  datachain[docs,tests]
@@ -35,6 +36,7 @@ types-python-dateutil
35
36
  types-pytz
36
37
  types-PyYAML
37
38
  types-requests
39
+ types-tabulate
38
40
 
39
41
  [docs]
40
42
  mkdocs>=1.5.2
@@ -14,6 +14,7 @@ from upath.implementations.cloud import CloudPath
14
14
  from datachain.catalog import Catalog
15
15
  from datachain.catalog.loader import get_id_generator, get_metastore, get_warehouse
16
16
  from datachain.cli_utils import CommaSeparatedArgs
17
+ from datachain.config import Config, ConfigLevel
17
18
  from datachain.data_storage.sqlite import (
18
19
  SQLiteDatabaseEngine,
19
20
  SQLiteIDGenerator,
@@ -26,6 +27,7 @@ from datachain.query.session import Session
26
27
  from datachain.utils import (
27
28
  ENV_DATACHAIN_GLOBAL_CONFIG_DIR,
28
29
  ENV_DATACHAIN_SYSTEM_CONFIG_DIR,
30
+ STUDIO_URL,
29
31
  DataChainDir,
30
32
  )
31
33
 
@@ -673,3 +675,29 @@ def dataset_rows():
673
675
  }
674
676
  for i in range(19)
675
677
  ]
678
+
679
+
680
+ @pytest.fixture
681
+ def studio_datasets(requests_mock):
682
+ with Config(ConfigLevel.GLOBAL).edit() as conf:
683
+ conf["studio"] = {"token": "isat_access_token", "team": "team_name"}
684
+
685
+ datasets = [
686
+ {
687
+ "id": 1,
688
+ "name": "dogs",
689
+ "versions": [{"version": 1}, {"version": 2}],
690
+ },
691
+ {
692
+ "id": 2,
693
+ "name": "cats",
694
+ "versions": [{"version": 1}],
695
+ },
696
+ {
697
+ "id": 3,
698
+ "name": "both",
699
+ "versions": [{"version": 1}],
700
+ },
701
+ ]
702
+
703
+ requests_mock.post(f"{STUDIO_URL}/api/datachain/ls-datasets", json=datasets)
@@ -15,8 +15,8 @@ from datachain.lib.listing import LISTING_PREFIX
15
15
  from tests.utils import uppercase_scheme
16
16
 
17
17
 
18
- @pytest.fixture(autouse=True)
19
- def studio_config():
18
+ @pytest.fixture
19
+ def studio_config(global_config_dir):
20
20
  with Config(ConfigLevel.GLOBAL).edit() as conf:
21
21
  conf["studio"] = {"token": "isat_access_token", "team": "team_name"}
22
22
 
@@ -235,20 +235,11 @@ dog3
235
235
  """
236
236
 
237
237
 
238
- def test_ls_remote_sources(cloud_type, capsys, monkeypatch):
238
+ def test_ls_remote_sources(cloud_type, capsys, monkeypatch, studio_config):
239
239
  src = f"{cloud_type}://bucket"
240
- token = "35NmrvSlsGVxTYIglxSsBIQHRrMpi6irSSYcAL0flijOytCHc" # noqa: S105
241
240
  with monkeypatch.context() as m:
242
241
  m.setattr("requests.post", mock_post)
243
- ls(
244
- [src, f"{src}/dogs/others", f"{src}/dogs"],
245
- config={
246
- "type": "http",
247
- "url": "http://localhost:8111/api/datachain",
248
- "username": "datachain-team",
249
- "token": f"isat_{token}",
250
- },
251
- )
242
+ ls([src, f"{src}/dogs/others", f"{src}/dogs"], studio=True)
252
243
  captured = capsys.readouterr()
253
244
  assert captured.out == ls_remote_sources_output.format(src=src)
254
245