pixeltable 0.2.18__tar.gz → 0.2.19__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 (149) hide show
  1. pixeltable-0.2.19/LICENSE +201 -0
  2. {pixeltable-0.2.18 → pixeltable-0.2.19}/PKG-INFO +6 -4
  3. {pixeltable-0.2.18 → pixeltable-0.2.19}/README.md +4 -2
  4. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/__init__.py +1 -1
  5. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/__version__.py +2 -2
  6. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/table.py +0 -1
  7. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/table_version.py +1 -1
  8. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/view.py +1 -1
  9. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/dataframe.py +1 -1
  10. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/env.py +34 -5
  11. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exceptions.py +5 -1
  12. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/component_iteration_node.py +1 -1
  13. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/__init__.py +1 -2
  14. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/expr.py +5 -6
  15. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/function_call.py +8 -10
  16. pixeltable-0.2.19/pixeltable/exprs/inline_expr.py +200 -0
  17. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/ext/functions/whisperx.py +2 -0
  18. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/ext/functions/yolox.py +5 -3
  19. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/huggingface.py +89 -12
  20. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/image.py +3 -3
  21. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/together.py +15 -8
  22. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/vision.py +43 -21
  23. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/whisper.py +3 -0
  24. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/globals.py +5 -1
  25. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/__init__.py +1 -1
  26. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_18.py +1 -1
  27. pixeltable-0.2.19/pixeltable/metadata/converters/convert_20.py +56 -0
  28. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/util.py +29 -4
  29. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/notes.py +1 -0
  30. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/create_test_db_dump.py +14 -3
  31. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/type_system.py +3 -1
  32. {pixeltable-0.2.18 → pixeltable-0.2.19}/pyproject.toml +5 -5
  33. pixeltable-0.2.18/LICENSE +0 -18
  34. pixeltable-0.2.18/pixeltable/exprs/inline_array.py +0 -117
  35. pixeltable-0.2.18/pixeltable/exprs/inline_dict.py +0 -104
  36. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/__init__.py +0 -0
  37. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/catalog.py +0 -0
  38. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/column.py +0 -0
  39. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/dir.py +0 -0
  40. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/globals.py +0 -0
  41. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/insertable_table.py +0 -0
  42. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/named_function.py +0 -0
  43. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/path.py +0 -0
  44. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/path_dict.py +0 -0
  45. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/schema_object.py +0 -0
  46. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/catalog/table_version_path.py +0 -0
  47. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/__init__.py +0 -0
  48. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/aggregation_node.py +0 -0
  49. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/cache_prefetch_node.py +0 -0
  50. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/data_row_batch.py +0 -0
  51. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/exec_context.py +0 -0
  52. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/exec_node.py +0 -0
  53. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/expr_eval_node.py +0 -0
  54. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/in_memory_data_node.py +0 -0
  55. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/media_validation_node.py +0 -0
  56. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/row_update_node.py +0 -0
  57. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exec/sql_node.py +0 -0
  58. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/arithmetic_expr.py +0 -0
  59. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/array_slice.py +0 -0
  60. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/column_property_ref.py +0 -0
  61. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/column_ref.py +0 -0
  62. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/comparison.py +0 -0
  63. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/compound_predicate.py +0 -0
  64. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/data_row.py +0 -0
  65. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/expr_set.py +0 -0
  66. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/globals.py +0 -0
  67. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/in_predicate.py +0 -0
  68. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/is_null.py +0 -0
  69. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/json_mapper.py +0 -0
  70. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/json_path.py +0 -0
  71. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/literal.py +0 -0
  72. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/method_ref.py +0 -0
  73. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/object_ref.py +0 -0
  74. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/row_builder.py +0 -0
  75. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/rowid_ref.py +0 -0
  76. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/similarity_expr.py +0 -0
  77. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/sql_element_cache.py +0 -0
  78. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/type_cast.py +0 -0
  79. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/exprs/variable.py +0 -0
  80. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/ext/__init__.py +0 -0
  81. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/ext/functions/__init__.py +0 -0
  82. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/__init__.py +0 -0
  83. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/aggregate_function.py +0 -0
  84. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/callable_function.py +0 -0
  85. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/expr_template_function.py +0 -0
  86. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/function.py +0 -0
  87. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/function_registry.py +0 -0
  88. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/globals.py +0 -0
  89. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/query_template_function.py +0 -0
  90. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/signature.py +0 -0
  91. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/func/udf.py +0 -0
  92. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/__init__.py +0 -0
  93. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/anthropic.py +0 -0
  94. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/audio.py +0 -0
  95. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/fireworks.py +0 -0
  96. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/globals.py +0 -0
  97. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/json.py +0 -0
  98. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/mistralai.py +0 -0
  99. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/openai.py +0 -0
  100. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/string.py +0 -0
  101. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/timestamp.py +0 -0
  102. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/util.py +0 -0
  103. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/functions/video.py +0 -0
  104. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/index/__init__.py +0 -0
  105. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/index/base.py +0 -0
  106. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/index/btree.py +0 -0
  107. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/index/embedding_index.py +0 -0
  108. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/__init__.py +0 -0
  109. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/external_store.py +0 -0
  110. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/globals.py +0 -0
  111. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/hf_datasets.py +0 -0
  112. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/label_studio.py +0 -0
  113. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/pandas.py +0 -0
  114. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/io/parquet.py +0 -0
  115. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/iterators/__init__.py +0 -0
  116. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/iterators/base.py +0 -0
  117. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/iterators/document.py +0 -0
  118. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/iterators/string.py +0 -0
  119. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/iterators/video.py +0 -0
  120. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_10.py +0 -0
  121. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_12.py +0 -0
  122. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_13.py +0 -0
  123. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_14.py +0 -0
  124. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_15.py +0 -0
  125. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_16.py +0 -0
  126. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_17.py +0 -0
  127. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/converters/convert_19.py +0 -0
  128. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/metadata/schema.py +0 -0
  129. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/plan.py +0 -0
  130. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/store.py +0 -0
  131. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/create_test_video.py +0 -0
  132. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/doc_plugins/griffe.py +0 -0
  133. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/doc_plugins/mkdocstrings.py +0 -0
  134. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/doc_plugins/templates/material/udf.html.jinja +0 -0
  135. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/tool/embed_udf.py +0 -0
  136. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/__init__.py +0 -0
  137. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/arrow.py +0 -0
  138. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/coco.py +0 -0
  139. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/code.py +0 -0
  140. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/documents.py +0 -0
  141. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/filecache.py +0 -0
  142. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/formatter.py +0 -0
  143. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/help.py +0 -0
  144. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/http_server.py +0 -0
  145. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/media_store.py +0 -0
  146. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/pytorch.py +0 -0
  147. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/s3.py +0 -0
  148. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/sql.py +0 -0
  149. {pixeltable-0.2.18 → pixeltable-0.2.19}/pixeltable/utils/transactional_directory.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pixeltable
3
- Version: 0.2.18
3
+ Version: 0.2.19
4
4
  Summary: Pixeltable: The Multimodal AI Data Plane
5
5
  Author: Pixeltable, Inc.
6
6
  Author-email: contact@pixeltable.com
@@ -17,7 +17,7 @@ Requires-Dist: ftfy (>=6.2.0,<7.0.0)
17
17
  Requires-Dist: jinja2 (>=3.1.3,<4.0.0)
18
18
  Requires-Dist: jmespath (>=1.0.1,<2.0.0)
19
19
  Requires-Dist: more-itertools (>=10.2,<11.0)
20
- Requires-Dist: numpy (>=1.25)
20
+ Requires-Dist: numpy (>=1.25,<2.0)
21
21
  Requires-Dist: opencv-python-headless (>=4.7.0.68,<5.0.0.0)
22
22
  Requires-Dist: pandas (>=2.0,<3.0)
23
23
  Requires-Dist: pgvector (>=0.2.1,<0.3.0)
@@ -40,8 +40,10 @@ Description-Content-Type: text/markdown
40
40
 
41
41
  [![License](https://img.shields.io/badge/License-Apache%202.0-darkblue.svg)](https://opensource.org/licenses/Apache-2.0)
42
42
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pixeltable?logo=python&logoColor=white)
43
- [![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-8A2BE2)]()
44
- [![pytest status](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions)
43
+ ![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-8A2BE2)
44
+ <br>
45
+ [![tests status](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml)
46
+ [![tests status](https://github.com/pixeltable/pixeltable/actions/workflows/nightly.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions/workflows/nightly.yml)
45
47
  [![PyPI Package](https://img.shields.io/pypi/v/pixeltable?color=darkorange)](https://pypi.org/project/pixeltable/)
46
48
 
47
49
  [Installation](https://pixeltable.github.io/pixeltable/getting-started/) | [Documentation](https://pixeltable.readme.io/) | [API Reference](https://pixeltable.github.io/pixeltable/) | [Code Samples](https://pixeltable.readme.io/recipes) | [Examples](https://github.com/pixeltable/pixeltable/tree/release/docs/release/tutorials)
@@ -4,8 +4,10 @@
4
4
 
5
5
  [![License](https://img.shields.io/badge/License-Apache%202.0-darkblue.svg)](https://opensource.org/licenses/Apache-2.0)
6
6
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pixeltable?logo=python&logoColor=white)
7
- [![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-8A2BE2)]()
8
- [![pytest status](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions)
7
+ ![Platform Support](https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-8A2BE2)
8
+ <br>
9
+ [![tests status](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions/workflows/pytest.yml)
10
+ [![tests status](https://github.com/pixeltable/pixeltable/actions/workflows/nightly.yml/badge.svg)](https://github.com/pixeltable/pixeltable/actions/workflows/nightly.yml)
9
11
  [![PyPI Package](https://img.shields.io/pypi/v/pixeltable?color=darkorange)](https://pypi.org/project/pixeltable/)
10
12
 
11
13
  [Installation](https://pixeltable.github.io/pixeltable/getting-started/) | [Documentation](https://pixeltable.readme.io/) | [API Reference](https://pixeltable.github.io/pixeltable/) | [Code Samples](https://pixeltable.readme.io/recipes) | [Examples](https://github.com/pixeltable/pixeltable/tree/release/docs/release/tutorials)
@@ -4,7 +4,7 @@ from .exceptions import Error
4
4
  from .exprs import RELATIVE_PATH_ROOT
5
5
  from .func import Function, udf, Aggregator, uda, expr_udf
6
6
  from .globals import init, create_table, create_view, get_table, move, drop_table, list_tables, create_dir, drop_dir, \
7
- list_dirs, list_functions, configure_logging
7
+ list_dirs, list_functions, configure_logging, array
8
8
  from .type_system import (
9
9
  ColumnType,
10
10
  StringType,
@@ -1,3 +1,3 @@
1
1
  # These version placeholders will be replaced during build.
2
- __version__ = "0.2.18"
3
- __version_tuple__ = (0, 2, 18)
2
+ __version__ = "0.2.19"
3
+ __version_tuple__ = (0, 2, 19)
@@ -2,7 +2,6 @@ from __future__ import annotations
2
2
 
3
3
  import abc
4
4
  import builtins
5
- import itertools
6
5
  import json
7
6
  import logging
8
7
  from pathlib import Path
@@ -147,7 +147,7 @@ class TableVersion:
147
147
  module = importlib.import_module(module_name)
148
148
  self.iterator_cls = getattr(module, class_name)
149
149
  self.iterator_args = exprs.InlineDict.from_dict(tbl_md.view_md.iterator_args)
150
- output_schema, _ = self.iterator_cls.output_schema(**self.iterator_args.to_dict())
150
+ output_schema, _ = self.iterator_cls.output_schema(**self.iterator_args.to_kwargs())
151
151
  self.num_iterator_cols = len(output_schema)
152
152
  assert tbl_md.view_md.iterator_args is not None
153
153
 
@@ -94,7 +94,7 @@ class View(Table):
94
94
  ]
95
95
  sig = func.Signature(InvalidType(), params)
96
96
  from pixeltable.exprs import FunctionCall
97
- FunctionCall.normalize_args(sig, bound_args)
97
+ FunctionCall.normalize_args(iterator_cls.__name__, sig, bound_args)
98
98
  except TypeError as e:
99
99
  raise Error(f'Cannot instantiate iterator with given arguments: {e}')
100
100
 
@@ -501,7 +501,7 @@ class DataFrame:
501
501
  elif isinstance(raw_expr, dict):
502
502
  select_list.append((exprs.InlineDict(raw_expr), name))
503
503
  elif isinstance(raw_expr, list):
504
- select_list.append((exprs.InlineArray(raw_expr), name))
504
+ select_list.append((exprs.InlineList(raw_expr), name))
505
505
  else:
506
506
  select_list.append((exprs.Literal(raw_expr), name))
507
507
  expr = select_list[-1][0]
@@ -8,6 +8,7 @@ import importlib.util
8
8
  import inspect
9
9
  import logging
10
10
  import os
11
+ import subprocess
11
12
  import sys
12
13
  import threading
13
14
  import uuid
@@ -486,6 +487,8 @@ class Env:
486
487
  """Check for and start runtime services"""
487
488
  self._start_web_server()
488
489
  self.__register_packages()
490
+ if self.is_installed_package('spacy'):
491
+ self.__init_spacy()
489
492
 
490
493
  def __register_packages(self) -> None:
491
494
  """Declare optional packages that are utilized by some parts of the code."""
@@ -500,7 +503,7 @@ class Env:
500
503
  self.__register_package('openpyxl')
501
504
  self.__register_package('pyarrow')
502
505
  self.__register_package('sentence_transformers', library_name='sentence-transformers')
503
- self.__register_package('spacy') # TODO: deal with en-core-web-sm
506
+ self.__register_package('spacy')
504
507
  self.__register_package('tiktoken')
505
508
  self.__register_package('together')
506
509
  self.__register_package('toml')
@@ -511,10 +514,6 @@ class Env:
511
514
  self.__register_package('whisperx')
512
515
  self.__register_package('yolox', library_name='git+https://github.com/Megvii-BaseDetection/YOLOX@ac58e0a')
513
516
 
514
- if self.is_installed_package('spacy'):
515
- import spacy
516
- self._spacy_nlp = spacy.load('en_core_web_sm')
517
-
518
517
  def __register_package(self, package_name: str, library_name: Optional[str] = None) -> None:
519
518
  self.__optional_packages[package_name] = PackageInfo(
520
519
  is_installed=importlib.util.find_spec(package_name) is not None,
@@ -556,6 +555,35 @@ class Env:
556
555
  f'To fix this, run: `pip install -U {package_info.library_name}`'
557
556
  )
558
557
 
558
+ def __init_spacy(self) -> None:
559
+ """
560
+ spaCy relies on a pip-installed model to operate. In order to avoid requiring the model as a separate
561
+ dependency, we install it programmatically here. This should cause no problems, since the model packages
562
+ have no sub-dependencies (in fact, this is how spaCy normally manages its model resources).
563
+ """
564
+ import spacy
565
+ from spacy.cli.download import get_model_filename
566
+ spacy_model = 'en_core_web_sm'
567
+ spacy_model_version = '3.7.1'
568
+ filename = get_model_filename(spacy_model, spacy_model_version, sdist=False)
569
+ url = f'{spacy.about.__download_url__}/{filename}'
570
+ # Try to `pip install` the model. We set check=False; if the pip command fails, it's not necessarily
571
+ # a problem, because the model have been installed on a previous attempt.
572
+ self._logger.info(f'Ensuring spaCy model is installed: {filename}')
573
+ ret = subprocess.run([sys.executable, '-m', 'pip', 'install', '-qU', url], check=False)
574
+ if ret.returncode != 0:
575
+ self._logger.warn(f'pip install failed for spaCy model: {filename}')
576
+ try:
577
+ self._logger.info(f'Loading spaCy model: {spacy_model}')
578
+ self._spacy_nlp = spacy.load(spacy_model)
579
+ except Exception as exc:
580
+ self._logger.warn(f'Failed to load spaCy model: {spacy_model}', exc_info=exc)
581
+ warnings.warn(
582
+ f"Failed to load spaCy model '{spacy_model}'. spaCy features will not be available.",
583
+ excs.PixeltableWarning
584
+ )
585
+ self.__optional_packages['spacy'].is_installed = False
586
+
559
587
  def num_tmp_files(self) -> int:
560
588
  return len(glob.glob(f'{self._tmp_dir}/*'))
561
589
 
@@ -594,6 +622,7 @@ class Env:
594
622
 
595
623
  @property
596
624
  def spacy_nlp(self) -> spacy.Language:
625
+ Env.get().require_package('spacy')
597
626
  assert self._spacy_nlp is not None
598
627
  return self._spacy_nlp
599
628
 
@@ -14,4 +14,8 @@ class ExprEvalError(Exception):
14
14
  exc: Exception
15
15
  exc_tb: TracebackType
16
16
  input_vals: List[Any]
17
- row_num: int
17
+ row_num: int
18
+
19
+
20
+ class PixeltableWarning(Warning):
21
+ pass
@@ -24,7 +24,7 @@ class ComponentIterationNode(ExecNode):
24
24
  assert isinstance(self.iterator_args, exprs.InlineDict)
25
25
  self.iterator_args_ctx = self.row_builder.create_eval_ctx([self.iterator_args])
26
26
  self.iterator_output_schema, self.unstored_column_names = \
27
- self.view.iterator_cls.output_schema(**self.iterator_args.to_dict())
27
+ self.view.iterator_cls.output_schema(**self.iterator_args.to_kwargs())
28
28
  self.iterator_output_fields = list(self.iterator_output_schema.keys())
29
29
  self.iterator_output_cols = \
30
30
  {field_name: self.view.cols_by_name[field_name] for field_name in self.iterator_output_fields}
@@ -9,8 +9,7 @@ from .expr import Expr
9
9
  from .expr_set import ExprSet
10
10
  from .function_call import FunctionCall
11
11
  from .in_predicate import InPredicate
12
- from .inline_array import InlineArray
13
- from .inline_dict import InlineDict
12
+ from .inline_expr import InlineArray, InlineDict, InlineList
14
13
  from .is_null import IsNull
15
14
  from .json_mapper import JsonMapper
16
15
  from .json_path import RELATIVE_PATH_ROOT, JsonPath
@@ -356,15 +356,14 @@ class Expr(abc.ABC):
356
356
  """
357
357
  if isinstance(o, Expr):
358
358
  return o
359
- # Try to create a literal. We need to check for InlineArray/InlineDict
360
- # first, to prevent arrays from inappropriately being interpreted as JsonType
359
+ # Try to create a literal. We need to check for InlineList/InlineDict
360
+ # first, to prevent them from inappropriately being interpreted as JsonType
361
361
  # literals.
362
- # TODO: general cleanup of InlineArray/InlineDict
363
362
  if isinstance(o, list):
364
- from .inline_array import InlineArray
365
- return InlineArray(tuple(o))
363
+ from .inline_expr import InlineList
364
+ return InlineList(o)
366
365
  if isinstance(o, dict):
367
- from .inline_dict import InlineDict
366
+ from .inline_expr import InlineDict
368
367
  return InlineDict(o)
369
368
  obj_type = ts.ColumnType.infer_literal_type(o)
370
369
  if obj_type is not None:
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  import inspect
4
4
  import json
5
5
  import sys
6
- from typing import Optional, Any
6
+ from typing import Any, Optional
7
7
 
8
8
  import sqlalchemy as sql
9
9
 
@@ -11,10 +11,10 @@ import pixeltable.catalog as catalog
11
11
  import pixeltable.exceptions as excs
12
12
  import pixeltable.func as func
13
13
  import pixeltable.type_system as ts
14
+
14
15
  from .data_row import DataRow
15
16
  from .expr import Expr
16
- from .inline_array import InlineArray
17
- from .inline_dict import InlineDict
17
+ from .inline_expr import InlineDict, InlineList
18
18
  from .row_builder import RowBuilder
19
19
  from .rowid_ref import RowidRef
20
20
  from .sql_element_cache import SqlElementCache
@@ -53,7 +53,7 @@ class FunctionCall(Expr):
53
53
  super().__init__(fn.call_return_type(bound_args))
54
54
  self.fn = fn
55
55
  self.is_method_call = is_method_call
56
- self.normalize_args(signature, bound_args)
56
+ self.normalize_args(fn.name, signature, bound_args)
57
57
 
58
58
  self.agg_init_args = {}
59
59
  if self.is_agg_fn_call:
@@ -143,7 +143,7 @@ class FunctionCall(Expr):
143
143
  return super().default_column_name()
144
144
 
145
145
  @classmethod
146
- def normalize_args(cls, signature: func.Signature, bound_args: dict[str, Any]) -> None:
146
+ def normalize_args(cls, fn_name: str, signature: func.Signature, bound_args: dict[str, Any]) -> None:
147
147
  """Converts all args to Exprs and checks that they are compatible with signature.
148
148
 
149
149
  Updates bound_args in place, where necessary.
@@ -163,9 +163,7 @@ class FunctionCall(Expr):
163
163
 
164
164
  if isinstance(arg, list) or isinstance(arg, tuple):
165
165
  try:
166
- # If the column type is JsonType, force the literal to be JSON
167
- is_json = is_var_param or (param.col_type is not None and param.col_type.is_json_type())
168
- arg = InlineArray(arg, force_json=is_json)
166
+ arg = InlineList(arg)
169
167
  bound_args[param_name] = arg
170
168
  continue
171
169
  except excs.Error:
@@ -177,7 +175,7 @@ class FunctionCall(Expr):
177
175
  try:
178
176
  _ = json.dumps(arg)
179
177
  except TypeError:
180
- raise excs.Error(f'Argument for parameter {param_name!r} is not json-serializable: {arg}')
178
+ raise excs.Error(f'Argument for parameter {param_name!r} is not json-serializable: {arg} (of type {type(arg)})')
181
179
  if arg is not None:
182
180
  try:
183
181
  param_type = param.col_type
@@ -215,7 +213,7 @@ class FunctionCall(Expr):
215
213
  or (arg.col_type.is_json_type() and param.col_type.is_scalar_type())
216
214
  ):
217
215
  raise excs.Error(
218
- f'Parameter {param_name}: argument type {arg.col_type} does not match parameter type '
216
+ f'Parameter {param_name} (in function {fn_name}): argument type {arg.col_type} does not match parameter type '
219
217
  f'{param.col_type}')
220
218
 
221
219
  def _equals(self, other: FunctionCall) -> bool: