pixeltable 0.2.25__tar.gz → 0.3.0__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 pixeltable might be problematic. Click here for more details.

Files changed (166) hide show
  1. {pixeltable-0.2.25 → pixeltable-0.3.0}/PKG-INFO +30 -20
  2. {pixeltable-0.2.25 → pixeltable-0.3.0}/README.md +9 -16
  3. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/__init__.py +2 -2
  4. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/__version__.py +2 -2
  5. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/__init__.py +1 -1
  6. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/dir.py +6 -0
  7. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/globals.py +25 -0
  8. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/named_function.py +4 -0
  9. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/path_dict.py +37 -11
  10. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/schema_object.py +6 -0
  11. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/table.py +421 -231
  12. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/table_version.py +22 -8
  13. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/view.py +5 -7
  14. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/dataframe.py +439 -105
  15. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/env.py +19 -5
  16. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/__init__.py +1 -1
  17. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/exec_node.py +6 -7
  18. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/expr_eval_node.py +1 -1
  19. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/sql_node.py +92 -45
  20. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/__init__.py +1 -0
  21. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/arithmetic_expr.py +1 -1
  22. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/array_slice.py +1 -1
  23. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/column_property_ref.py +1 -1
  24. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/column_ref.py +29 -2
  25. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/comparison.py +1 -1
  26. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/compound_predicate.py +1 -1
  27. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/expr.py +12 -5
  28. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/expr_set.py +8 -0
  29. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/function_call.py +147 -39
  30. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/in_predicate.py +1 -1
  31. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/inline_expr.py +25 -5
  32. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/is_null.py +1 -1
  33. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/json_mapper.py +1 -1
  34. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/json_path.py +1 -1
  35. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/method_ref.py +1 -1
  36. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/row_builder.py +1 -1
  37. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/rowid_ref.py +1 -1
  38. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/similarity_expr.py +14 -7
  39. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/sql_element_cache.py +4 -0
  40. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/type_cast.py +2 -2
  41. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/variable.py +3 -0
  42. pixeltable-0.3.0/pixeltable/func/__init__.py +9 -0
  43. pixeltable-0.3.0/pixeltable/func/aggregate_function.py +289 -0
  44. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/callable_function.py +48 -16
  45. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/expr_template_function.py +64 -23
  46. pixeltable-0.3.0/pixeltable/func/function.py +377 -0
  47. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/function_registry.py +2 -1
  48. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/query_template_function.py +51 -9
  49. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/signature.py +64 -7
  50. pixeltable-0.3.0/pixeltable/func/tools.py +153 -0
  51. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/udf.py +57 -35
  52. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/__init__.py +2 -2
  53. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/anthropic.py +51 -4
  54. pixeltable-0.3.0/pixeltable/functions/gemini.py +85 -0
  55. pixeltable-0.3.0/pixeltable/functions/globals.py +164 -0
  56. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/huggingface.py +10 -28
  57. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/json.py +3 -8
  58. pixeltable-0.3.0/pixeltable/functions/math.py +67 -0
  59. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/ollama.py +8 -8
  60. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/openai.py +51 -4
  61. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/timestamp.py +1 -1
  62. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/video.py +3 -9
  63. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/vision.py +1 -1
  64. pixeltable-0.3.0/pixeltable/globals.py +820 -0
  65. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/index/embedding_index.py +106 -34
  66. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/__init__.py +1 -1
  67. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/label_studio.py +1 -1
  68. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/parquet.py +39 -19
  69. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/document.py +12 -0
  70. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/__init__.py +1 -1
  71. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_16.py +2 -1
  72. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_17.py +2 -1
  73. pixeltable-0.3.0/pixeltable/metadata/converters/convert_22.py +17 -0
  74. pixeltable-0.3.0/pixeltable/metadata/converters/convert_23.py +35 -0
  75. pixeltable-0.3.0/pixeltable/metadata/converters/convert_24.py +56 -0
  76. pixeltable-0.3.0/pixeltable/metadata/converters/convert_25.py +19 -0
  77. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/util.py +4 -2
  78. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/notes.py +4 -0
  79. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/schema.py +1 -0
  80. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/plan.py +128 -50
  81. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/store.py +1 -1
  82. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/type_system.py +196 -54
  83. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/arrow.py +8 -3
  84. pixeltable-0.3.0/pixeltable/utils/description_helper.py +89 -0
  85. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/documents.py +14 -0
  86. {pixeltable-0.2.25 → pixeltable-0.3.0}/pyproject.toml +48 -10
  87. pixeltable-0.2.25/pixeltable/func/__init__.py +0 -8
  88. pixeltable-0.2.25/pixeltable/func/aggregate_function.py +0 -206
  89. pixeltable-0.2.25/pixeltable/func/function.py +0 -209
  90. pixeltable-0.2.25/pixeltable/functions/globals.py +0 -144
  91. pixeltable-0.2.25/pixeltable/globals.py +0 -546
  92. pixeltable-0.2.25/pixeltable/tool/create_test_db_dump.py +0 -311
  93. pixeltable-0.2.25/pixeltable/tool/create_test_video.py +0 -81
  94. pixeltable-0.2.25/pixeltable/tool/doc_plugins/griffe.py +0 -50
  95. pixeltable-0.2.25/pixeltable/tool/doc_plugins/mkdocstrings.py +0 -6
  96. pixeltable-0.2.25/pixeltable/tool/doc_plugins/templates/material/udf.html.jinja +0 -135
  97. pixeltable-0.2.25/pixeltable/tool/embed_udf.py +0 -9
  98. pixeltable-0.2.25/pixeltable/tool/mypy_plugin.py +0 -55
  99. {pixeltable-0.2.25 → pixeltable-0.3.0}/LICENSE +0 -0
  100. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/catalog.py +0 -0
  101. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/column.py +0 -0
  102. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/insertable_table.py +0 -0
  103. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/path.py +0 -0
  104. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/catalog/table_version_path.py +0 -0
  105. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exceptions.py +0 -0
  106. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/aggregation_node.py +0 -0
  107. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/cache_prefetch_node.py +0 -0
  108. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/component_iteration_node.py +0 -0
  109. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/data_row_batch.py +0 -0
  110. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/exec_context.py +0 -0
  111. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/in_memory_data_node.py +0 -0
  112. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exec/row_update_node.py +0 -0
  113. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/data_row.py +0 -0
  114. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/expr_dict.py +0 -0
  115. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/globals.py +0 -0
  116. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/literal.py +0 -0
  117. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/exprs/object_ref.py +0 -0
  118. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/ext/__init__.py +0 -0
  119. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/ext/functions/__init__.py +0 -0
  120. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/ext/functions/whisperx.py +0 -0
  121. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/ext/functions/yolox.py +0 -0
  122. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/func/globals.py +0 -0
  123. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/audio.py +0 -0
  124. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/fireworks.py +0 -0
  125. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/image.py +0 -0
  126. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/llama_cpp.py +0 -0
  127. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/mistralai.py +0 -0
  128. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/replicate.py +0 -0
  129. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/string.py +0 -0
  130. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/together.py +0 -0
  131. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/util.py +0 -0
  132. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/functions/whisper.py +0 -0
  133. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/index/__init__.py +0 -0
  134. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/index/base.py +0 -0
  135. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/index/btree.py +0 -0
  136. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/external_store.py +0 -0
  137. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/fiftyone.py +0 -0
  138. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/globals.py +0 -0
  139. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/hf_datasets.py +0 -0
  140. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/io/pandas.py +0 -0
  141. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/__init__.py +0 -0
  142. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/base.py +0 -0
  143. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/image.py +0 -0
  144. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/string.py +0 -0
  145. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/iterators/video.py +0 -0
  146. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_10.py +0 -0
  147. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_12.py +0 -0
  148. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_13.py +0 -0
  149. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_14.py +0 -0
  150. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_15.py +0 -0
  151. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_18.py +0 -0
  152. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_19.py +0 -0
  153. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_20.py +0 -0
  154. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/metadata/converters/convert_21.py +0 -0
  155. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/py.typed +0 -0
  156. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/__init__.py +0 -0
  157. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/coco.py +0 -0
  158. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/code.py +0 -0
  159. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/filecache.py +0 -0
  160. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/formatter.py +0 -0
  161. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/http_server.py +0 -0
  162. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/media_store.py +0 -0
  163. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/pytorch.py +0 -0
  164. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/s3.py +0 -0
  165. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/sql.py +0 -0
  166. {pixeltable-0.2.25 → pixeltable-0.3.0}/pixeltable/utils/transactional_directory.py +0 -0
@@ -1,31 +1,46 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pixeltable
3
- Version: 0.2.25
4
- Summary: Pixeltable: The Multimodal AI Data Plane
3
+ Version: 0.3.0
4
+ Summary: AI Data Infrastructure: Declarative, Multimodal, and Incremental
5
+ Home-page: https://pixeltable.com/
6
+ License: Apache-2.0
7
+ Keywords: data-science,machine-learning,database,ai,computer-vision,chatbot,ml,artificial-intelligence,feature-engineering,multimodal,mlops,feature-store,vector-database,llm,genai
5
8
  Author: Pixeltable, Inc.
6
9
  Author-email: contact@pixeltable.com
7
10
  Requires-Python: >=3.9,<4.0
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: POSIX :: Linux
8
17
  Classifier: Programming Language :: Python :: 3
9
18
  Classifier: Programming Language :: Python :: 3.9
10
19
  Classifier: Programming Language :: Python :: 3.10
11
20
  Classifier: Programming Language :: Python :: 3.11
12
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Database
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
26
  Requires-Dist: av (>=10.0.0)
14
27
  Requires-Dist: beautifulsoup4 (>=4.0.0,<5.0.0)
15
28
  Requires-Dist: cloudpickle (>=2.2.1,<3.0.0)
16
29
  Requires-Dist: ftfy (>=6.2.0,<7.0.0)
17
30
  Requires-Dist: jinja2 (>=3.1.3,<4.0.0)
18
31
  Requires-Dist: jmespath (>=1.0.1,<2.0.0)
32
+ Requires-Dist: jsonschema (>=4.1.0)
19
33
  Requires-Dist: lxml (>=5.0)
20
34
  Requires-Dist: more-itertools (>=10.2,<11.0)
21
35
  Requires-Dist: numpy (>=1.25,<2.0)
22
36
  Requires-Dist: pandas (>=2.0,<3.0)
23
37
  Requires-Dist: pgvector (>=0.2.1,<0.3.0)
24
38
  Requires-Dist: pillow (>=9.3.0)
25
- Requires-Dist: pixeltable-pgserver (==0.2.7)
39
+ Requires-Dist: pixeltable-pgserver (==0.2.9)
26
40
  Requires-Dist: psutil (>=5.9.5,<6.0.0)
27
- Requires-Dist: psycopg[binary] (==3.1.18)
41
+ Requires-Dist: psycopg[binary] (>=3.1.18)
28
42
  Requires-Dist: puremagic (>=1.20)
43
+ Requires-Dist: pydantic (>=2.7.4)
29
44
  Requires-Dist: pymupdf (>=1.24.1,<2.0.0)
30
45
  Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
31
46
  Requires-Dist: requests (>=2.31.0,<3.0.0)
@@ -33,10 +48,12 @@ Requires-Dist: sqlalchemy (>=2.0.23,<3.0.0)
33
48
  Requires-Dist: tenacity (>=8.2,<9.0)
34
49
  Requires-Dist: toml (>=0.10)
35
50
  Requires-Dist: tqdm (>=4.64)
51
+ Project-URL: Documentation, https://docs.pixeltable.com/
52
+ Project-URL: Repository, https://github.com/pixeltable/pixeltable
36
53
  Description-Content-Type: text/markdown
37
54
 
38
55
  <div align="center">
39
- <img src="https://raw.githubusercontent.com/pixeltable/pixeltable/main/docs/source/data/pixeltable-logo-large.png"
56
+ <img src="https://raw.githubusercontent.com/pixeltable/pixeltable/main/docs/resources/pixeltable-logo-large.png"
40
57
  alt="Pixeltable" width="50%" />
41
58
  <br></br>
42
59
 
@@ -97,11 +114,12 @@ Learn how to create tables, populate them with data, and enhance them with built
97
114
 
98
115
  | Topic | Notebook | Topic | Notebook |
99
116
  |:----------|:-----------------|:-------------------------|:---------------------------------:|
100
- | 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/pixeltable-basics.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Tables and Data Operations | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
101
- | User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/udfs-in-pixeltable.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Object Detection Models | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
102
- | Incremental Prompt Engineering | <a target="_blank" href="https://colab.research.google.com/github/mistralai/cookbook/blob/main/third_party/Pixeltable/incremental_prompt_engineering_and_model_comparison.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Github"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
103
- | Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/Documentation-013056" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
104
- | Multimodal Application | <a target="_blank" href="https://huggingface.co/spaces/Pixeltable/Multimodal-Powerhouse"> <img src="https://img.shields.io/badge/Hugging Face-FF7D04" alt="Visit our documentation"/></a> | Document Indexing and RAG | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/rag-demo.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
117
+ | 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/pixeltable-basics.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Tables and Data Operations | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
118
+ | User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/feature-guides/udfs-in-pixeltable.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Object Detection Models | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
119
+ | Incremental Prompt Engineering | <a target="_blank" href="https://colab.research.google.com/github/mistralai/cookbook/blob/main/third_party/Pixeltable/incremental_prompt_engineering_and_model_comparison.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Github"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/feature-guides/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
120
+ | Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/📚 Documentation-013056" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
121
+ | Multimodal Application | <a target="_blank" href="https://huggingface.co/spaces/Pixeltable/Multimodal-Powerhouse"> <img src="https://img.shields.io/badge/🤗-Gradio App-FF7D04" alt="Visit our Hugging Face Space"/></a> | Document Indexing and RAG | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/rag-demo.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
122
+ | Context-Aware Discord Bot | <a target="_blank" href="https://github.com/pixeltable/pixeltable/blob/main/docs/sample-apps/context-aware-discord-bot"> <img src="https://img.shields.io/badge/%F0%9F%92%AC-Discord Bot-%235865F2.svg" alt="Visit our documentation"/></a> | Image/Text Similarity Search | <a target="_blank" href="https://github.com/pixeltable/pixeltable/tree/main/docs/sample-apps/text-and-image-similarity-search-nextjs-fastapi"> <img src="https://img.shields.io/badge/🖥️-Next.js + FastAPI-black.svg" alt="Open In Colab"/> |
105
123
 
106
124
  ## 🧱 Code Samples
107
125
 
@@ -237,7 +255,7 @@ Learn how to interact with inference services such as [Together AI](https://pixe
237
255
 
238
256
  ```python
239
257
  import pixeltable as pxt
240
- from pixeltable.functions.huggingface import clip_image, clip_text
258
+ from pixeltable.functions.huggingface import clip
241
259
  from pixeltable.iterators import FrameIterator
242
260
  import PIL.Image
243
261
 
@@ -248,16 +266,8 @@ video_table.insert([{'video': '/video.mp4'}])
248
266
  frames_view = pxt.create_view(
249
267
  'frames', video_table, iterator=FrameIterator.create(video=video_table.video))
250
268
 
251
- @pxt.expr_udf
252
- def embed_image(img: PIL.Image.Image):
253
- return clip_image(img, model_id='openai/clip-vit-base-patch32')
254
-
255
- @pxt.expr_udf
256
- def str_embed(s: str):
257
- return clip_text(s, model_id='openai/clip-vit-base-patch32')
258
-
259
269
  # Create an index on the 'frame' column that allows text and image search
260
- frames_view.add_embedding_index('frame', string_embed=str_embed, image_embed=embed_image)
270
+ frames_view.add_embedding_index('frame', embed=clip.using('openai/clip-vit-base-patch32'))
261
271
 
262
272
  # Now we will retrieve images based on a sample image
263
273
  sample_image = '/image.jpeg'
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img src="https://raw.githubusercontent.com/pixeltable/pixeltable/main/docs/source/data/pixeltable-logo-large.png"
2
+ <img src="https://raw.githubusercontent.com/pixeltable/pixeltable/main/docs/resources/pixeltable-logo-large.png"
3
3
  alt="Pixeltable" width="50%" />
4
4
  <br></br>
5
5
 
@@ -60,11 +60,12 @@ Learn how to create tables, populate them with data, and enhance them with built
60
60
 
61
61
  | Topic | Notebook | Topic | Notebook |
62
62
  |:----------|:-----------------|:-------------------------|:---------------------------------:|
63
- | 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/pixeltable-basics.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Tables and Data Operations | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
64
- | User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/udfs-in-pixeltable.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Object Detection Models | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
65
- | Incremental Prompt Engineering | <a target="_blank" href="https://colab.research.google.com/github/mistralai/cookbook/blob/main/third_party/Pixeltable/incremental_prompt_engineering_and_model_comparison.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Github"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
66
- | Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/Documentation-013056" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
67
- | Multimodal Application | <a target="_blank" href="https://huggingface.co/spaces/Pixeltable/Multimodal-Powerhouse"> <img src="https://img.shields.io/badge/Hugging Face-FF7D04" alt="Visit our documentation"/></a> | Document Indexing and RAG | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/rag-demo.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
63
+ | 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/pixeltable-basics.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Tables and Data Operations | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
64
+ | User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/feature-guides/udfs-in-pixeltable.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> | Object Detection Models | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
65
+ | Incremental Prompt Engineering | <a target="_blank" href="https://colab.research.google.com/github/mistralai/cookbook/blob/main/third_party/Pixeltable/incremental_prompt_engineering_and_model_comparison.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Github"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/feature-guides/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> |
66
+ | Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/📚 Documentation-013056" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
67
+ | Multimodal Application | <a target="_blank" href="https://huggingface.co/spaces/Pixeltable/Multimodal-Powerhouse"> <img src="https://img.shields.io/badge/🤗-Gradio App-FF7D04" alt="Visit our Hugging Face Space"/></a> | Document Indexing and RAG | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/notebooks/use-cases/rag-demo.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> |
68
+ | Context-Aware Discord Bot | <a target="_blank" href="https://github.com/pixeltable/pixeltable/blob/main/docs/sample-apps/context-aware-discord-bot"> <img src="https://img.shields.io/badge/%F0%9F%92%AC-Discord Bot-%235865F2.svg" alt="Visit our documentation"/></a> | Image/Text Similarity Search | <a target="_blank" href="https://github.com/pixeltable/pixeltable/tree/main/docs/sample-apps/text-and-image-similarity-search-nextjs-fastapi"> <img src="https://img.shields.io/badge/🖥️-Next.js + FastAPI-black.svg" alt="Open In Colab"/> |
68
69
 
69
70
  ## 🧱 Code Samples
70
71
 
@@ -200,7 +201,7 @@ Learn how to interact with inference services such as [Together AI](https://pixe
200
201
 
201
202
  ```python
202
203
  import pixeltable as pxt
203
- from pixeltable.functions.huggingface import clip_image, clip_text
204
+ from pixeltable.functions.huggingface import clip
204
205
  from pixeltable.iterators import FrameIterator
205
206
  import PIL.Image
206
207
 
@@ -211,16 +212,8 @@ video_table.insert([{'video': '/video.mp4'}])
211
212
  frames_view = pxt.create_view(
212
213
  'frames', video_table, iterator=FrameIterator.create(video=video_table.video))
213
214
 
214
- @pxt.expr_udf
215
- def embed_image(img: PIL.Image.Image):
216
- return clip_image(img, model_id='openai/clip-vit-base-patch32')
217
-
218
- @pxt.expr_udf
219
- def str_embed(s: str):
220
- return clip_text(s, model_id='openai/clip-vit-base-patch32')
221
-
222
215
  # Create an index on the 'frame' column that allows text and image search
223
- frames_view.add_embedding_index('frame', string_embed=str_embed, image_embed=embed_image)
216
+ frames_view.add_embedding_index('frame', embed=clip.using('openai/clip-vit-base-patch32'))
224
217
 
225
218
  # Now we will retrieve images based on a sample image
226
219
  sample_image = '/image.jpeg'
@@ -2,9 +2,9 @@ from .catalog import Column, InsertableTable, Table, UpdateStatus, View
2
2
  from .dataframe import DataFrame
3
3
  from .exceptions import Error
4
4
  from .exprs import RELATIVE_PATH_ROOT
5
- from .func import Aggregator, Function, expr_udf, uda, udf
5
+ from .func import Aggregator, Function, expr_udf, query, uda, udf
6
6
  from .globals import (array, configure_logging, create_dir, create_snapshot, create_table, create_view, drop_dir,
7
- drop_table, get_table, init, list_dirs, list_functions, list_tables, move)
7
+ drop_table, get_table, init, list_dirs, list_functions, list_tables, move, tool, tools)
8
8
  from .type_system import (Array, ArrayType, Audio, AudioType, Bool, BoolType, ColumnType, Document, DocumentType, Float,
9
9
  FloatType, Image, ImageType, Int, IntType, Json, JsonType, Required, String, StringType,
10
10
  Timestamp, TimestampType, Video, VideoType)
@@ -1,3 +1,3 @@
1
1
  # These version placeholders will be replaced during build.
2
- __version__ = "0.2.25"
3
- __version_tuple__ = (0, 2, 25)
2
+ __version__ = "0.3.0"
3
+ __version_tuple__ = (0, 3, 0)
@@ -1,7 +1,7 @@
1
1
  from .catalog import Catalog
2
2
  from .column import Column
3
3
  from .dir import Dir
4
- from .globals import UpdateStatus, is_valid_identifier, is_valid_path, MediaValidation
4
+ from .globals import UpdateStatus, is_valid_identifier, is_valid_path, MediaValidation, IfExistsParam, IfNotExistsParam
5
5
  from .insertable_table import InsertableTable
6
6
  from .named_function import NamedFunction
7
7
  from .path import Path
@@ -21,6 +21,12 @@ class Dir(SchemaObject):
21
21
  def _display_name(cls) -> str:
22
22
  return 'directory'
23
23
 
24
+ @property
25
+ def _has_dependents(self) -> bool:
26
+ """ Returns True if this directory has any children. """
27
+ from pixeltable.catalog import Catalog, Path
28
+ return len(Catalog.get().paths.get_children(Path(self._path), child_type=None, recursive=False)) > 0
29
+
24
30
  def _move(self, new_name: str, new_dir_id: UUID) -> None:
25
31
  super()._move(new_name, new_dir_id)
26
32
  with Env.get().engine.begin() as conn:
@@ -51,6 +51,31 @@ class MediaValidation(enum.Enum):
51
51
  val_strs = ', '.join(f'{s.lower()!r}' for s in cls.__members__.keys())
52
52
  raise excs.Error(f'{error_prefix} must be one of: [{val_strs}]')
53
53
 
54
+ class IfExistsParam(enum.Enum):
55
+ ERROR = 0
56
+ IGNORE = 1
57
+ REPLACE = 2
58
+ REPLACE_FORCE = 3
59
+
60
+ @classmethod
61
+ def validated(cls, param_val: str, param_name: str) -> IfExistsParam:
62
+ try:
63
+ return cls[param_val.upper()]
64
+ except KeyError:
65
+ val_strs = ', '.join(f'{s.lower()!r}' for s in cls.__members__.keys())
66
+ raise excs.Error(f'{param_name} must be one of: [{val_strs}]')
67
+
68
+ class IfNotExistsParam(enum.Enum):
69
+ ERROR = 0
70
+ IGNORE = 1
71
+
72
+ @classmethod
73
+ def validated(cls, param_val: str, param_name: str) -> IfNotExistsParam:
74
+ try:
75
+ return cls[param_val.upper()]
76
+ except KeyError:
77
+ val_strs = ', '.join(f'{s.lower()!r}' for s in cls.__members__.keys())
78
+ raise excs.Error(f'{param_name} must be one of: [{val_strs}]')
54
79
 
55
80
  def is_valid_identifier(name: str) -> bool:
56
81
  return name.isidentifier() and not name.startswith('_')
@@ -25,6 +25,10 @@ class NamedFunction(SchemaObject):
25
25
  def _display_name(cls) -> str:
26
26
  return 'function'
27
27
 
28
+ @property
29
+ def _has_dependents(self) -> bool:
30
+ return False
31
+
28
32
  def _move(self, new_name: str, new_dir_id: UUID) -> None:
29
33
  super()._move(new_name, new_dir_id)
30
34
  with Env.get().engine.begin() as conn:
@@ -51,11 +51,41 @@ class PathDict:
51
51
  record_dir(dir)
52
52
 
53
53
  def _resolve_path(self, path: Path) -> SchemaObject:
54
+ """Resolve the path to a SchemaObject.
55
+
56
+ Args:
57
+ path: path to resolve
58
+
59
+ Returns:
60
+ SchemaObject at the path.
61
+
62
+ Raises:
63
+ Error if path is invalid or does not exist.
64
+ """
65
+ schema_obj = self.get_object(path)
66
+ if schema_obj is None:
67
+ raise excs.Error(f"No such path: {str(path)}")
68
+ return schema_obj
69
+
70
+ def get_object(self, path: Path) -> Optional[SchemaObject]:
71
+ """Get the object at the given path, if any.
72
+
73
+ Args:
74
+ path: path to object
75
+
76
+ Returns:
77
+ SchemaObject at the path if it exists, None otherwise.
78
+
79
+ Raises:
80
+ Error if path is invalid.
81
+ """
54
82
  if path.is_root:
55
83
  return self.root_dir
56
84
  dir = self.root_dir
57
85
  for i, component in enumerate(path.components):
58
86
  if component not in self.dir_contents[dir._id]:
87
+ if i == len(path.components) - 1:
88
+ return None
59
89
  raise excs.Error(f'No such path: {".".join(path.components[:i + 1])}')
60
90
  schema_obj = self.dir_contents[dir._id][component]
61
91
  if i < len(path.components) - 1:
@@ -112,19 +142,15 @@ class PathDict:
112
142
  Error if path is invalid or object at path has wrong type
113
143
  """
114
144
  # check for existence
145
+ obj = self.get_object(path)
115
146
  if expected is not None:
116
- schema_obj = self._resolve_path(path)
117
- if not isinstance(schema_obj, expected):
118
- raise excs.Error(
119
- f'{str(path)} needs to be a {expected._display_name()} but is a {type(schema_obj)._display_name()}')
120
- if expected is None:
121
- parent_obj = self._resolve_path(path.parent)
122
- if not isinstance(parent_obj, Dir):
147
+ if obj is None:
148
+ raise excs.Error(f"No such path: {str(path)}")
149
+ if not isinstance(obj, expected):
123
150
  raise excs.Error(
124
- f'{str(path.parent)} is a {type(parent_obj)._display_name()}, not a {Dir._display_name()}')
125
- if path.name in self.dir_contents[parent_obj._id]:
126
- obj = self.dir_contents[parent_obj._id][path.name]
127
- raise excs.Error(f"{type(obj)._display_name()} '{str(path)}' already exists")
151
+ f'{str(path)} needs to be a {expected._display_name()} but is a {type(obj)._display_name()}')
152
+ if expected is None and obj is not None:
153
+ raise excs.Error(f"{type(obj)._display_name()} '{str(path)}' already exists")
128
154
 
129
155
  def get_children(self, parent: Path, child_type: Optional[type[SchemaObject]], recursive: bool) -> list[Path]:
130
156
  dir = self._resolve_path(parent)
@@ -66,7 +66,13 @@ class SchemaObject:
66
66
  """
67
67
  pass
68
68
 
69
+ @property
70
+ @abstractmethod
71
+ def _has_dependents(self) -> bool:
72
+ """Returns True if this object has dependents (e.g., children, views)"""
73
+
69
74
  def _move(self, new_name: str, new_dir_id: UUID) -> None:
70
75
  """Subclasses need to override this to make the change persistent"""
71
76
  self.__name = new_name
72
77
  self.__dir_id = new_dir_id
78
+