pixeltable 0.2.11__tar.gz → 0.2.13__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.
- pixeltable-0.2.13/PKG-INFO +206 -0
- pixeltable-0.2.13/README.md +168 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/__init__.py +2 -2
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/__version__.py +2 -2
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/insertable_table.py +2 -2
- pixeltable-0.2.13/pixeltable/catalog/schema_object.py +60 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/table.py +68 -30
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/table_version.py +14 -43
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/view.py +2 -2
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/dataframe.py +8 -7
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/expr_eval_node.py +8 -1
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/sql_scan_node.py +1 -1
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/__init__.py +0 -1
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/column_ref.py +2 -7
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/comparison.py +5 -5
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/compound_predicate.py +12 -12
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/expr.py +32 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/in_predicate.py +3 -3
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/is_null.py +5 -5
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/similarity_expr.py +27 -16
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/aggregate_function.py +10 -4
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/callable_function.py +4 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/function_registry.py +2 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/globals.py +36 -1
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/huggingface.py +62 -4
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/image.py +17 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/openai.py +1 -1
- pixeltable-0.2.13/pixeltable/functions/string.py +636 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/video.py +26 -8
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/globals.py +54 -50
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/index/embedding_index.py +28 -27
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/external_store.py +2 -2
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/globals.py +54 -5
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/label_studio.py +45 -5
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/pandas.py +18 -7
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/__init__.py +1 -1
- pixeltable-0.2.13/pixeltable/metadata/converters/convert_17.py +26 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/plan.py +6 -6
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/tool/create_test_db_dump.py +2 -2
- pixeltable-0.2.13/pixeltable/tool/doc_plugins/griffe.py +77 -0
- pixeltable-0.2.13/pixeltable/tool/doc_plugins/mkdocstrings.py +6 -0
- pixeltable-0.2.13/pixeltable/tool/doc_plugins/templates/material/udf.html.jinja +135 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/s3.py +1 -1
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pyproject.toml +5 -2
- pixeltable-0.2.11/PKG-INFO +0 -137
- pixeltable-0.2.11/README.md +0 -99
- pixeltable-0.2.11/pixeltable/catalog/schema_object.py +0 -34
- pixeltable-0.2.11/pixeltable/exprs/predicate.py +0 -44
- pixeltable-0.2.11/pixeltable/functions/string.py +0 -21
- {pixeltable-0.2.11 → pixeltable-0.2.13}/LICENSE +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/catalog.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/column.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/dir.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/globals.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/named_function.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/path.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/path_dict.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/catalog/table_version_path.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/env.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exceptions.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/aggregation_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/cache_prefetch_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/component_iteration_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/data_row_batch.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/exec_context.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/exec_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/in_memory_data_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exec/media_validation_node.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/arithmetic_expr.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/array_slice.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/column_property_ref.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/data_row.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/expr_set.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/function_call.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/globals.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/image_member_access.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/inline_array.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/inline_dict.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/json_mapper.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/json_path.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/literal.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/object_ref.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/row_builder.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/rowid_ref.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/type_cast.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/exprs/variable.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/ext/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/ext/functions/whisperx.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/ext/functions/yolox.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/expr_template_function.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/function.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/globals.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/query_template_function.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/signature.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/func/udf.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/eval.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/fireworks.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/together.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/util.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/functions/whisper.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/index/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/index/base.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/index/btree.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/hf_datasets.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/io/parquet.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/iterators/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/iterators/base.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/iterators/document.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/iterators/string.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/iterators/video.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_10.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_12.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_13.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_14.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_15.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/convert_16.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/converters/util.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/metadata/schema.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/store.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/tool/create_test_video.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/tool/embed_udf.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/type_system.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/__init__.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/arrow.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/coco.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/code.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/documents.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/filecache.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/formatter.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/help.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/http_server.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/media_store.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/pytorch.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/sql.py +0 -0
- {pixeltable-0.2.11 → pixeltable-0.2.13}/pixeltable/utils/transactional_directory.py +0 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pixeltable
|
|
3
|
+
Version: 0.2.13
|
|
4
|
+
Summary: Pixeltable: The Multimodal AI Data Plane
|
|
5
|
+
Author: Pixeltable, Inc.
|
|
6
|
+
Author-email: contact@pixeltable.com
|
|
7
|
+
Requires-Python: >=3.9,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Requires-Dist: av (>=10.0.0)
|
|
14
|
+
Requires-Dist: beautifulsoup4 (>=4.0.0,<5.0.0)
|
|
15
|
+
Requires-Dist: cloudpickle (>=2.2.1,<3.0.0)
|
|
16
|
+
Requires-Dist: ftfy (>=6.2.0,<7.0.0)
|
|
17
|
+
Requires-Dist: jinja2 (>=3.1.3,<4.0.0)
|
|
18
|
+
Requires-Dist: jmespath (>=1.0.1,<2.0.0)
|
|
19
|
+
Requires-Dist: mistune (>=3.0.2,<4.0.0)
|
|
20
|
+
Requires-Dist: more-itertools (>=10.2,<11.0)
|
|
21
|
+
Requires-Dist: numpy (>=1.25)
|
|
22
|
+
Requires-Dist: opencv-python-headless (>=4.7.0.68,<5.0.0.0)
|
|
23
|
+
Requires-Dist: pandas (>=2.0,<3.0)
|
|
24
|
+
Requires-Dist: pgserver (==0.1.4)
|
|
25
|
+
Requires-Dist: pgvector (>=0.2.1,<0.3.0)
|
|
26
|
+
Requires-Dist: pillow (>=9.3.0)
|
|
27
|
+
Requires-Dist: psutil (>=5.9.5,<6.0.0)
|
|
28
|
+
Requires-Dist: psycopg2-binary (>=2.9.5,<3.0.0)
|
|
29
|
+
Requires-Dist: pymupdf (>=1.24.1,<2.0.0)
|
|
30
|
+
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
31
|
+
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
32
|
+
Requires-Dist: setuptools (==69.1.1)
|
|
33
|
+
Requires-Dist: sqlalchemy[mypy] (>=2.0.23,<3.0.0)
|
|
34
|
+
Requires-Dist: tenacity (>=8.2,<9.0)
|
|
35
|
+
Requires-Dist: tqdm (>=4.64)
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
<div align="center">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/pixeltable/pixeltable/master/docs/release/pixeltable-banner.png" alt="Pixeltable" width="45%" />
|
|
40
|
+
|
|
41
|
+
# Unifying Data, Models, and Orchestration for AI Products
|
|
42
|
+
|
|
43
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
44
|
+

|
|
45
|
+
[]()
|
|
46
|
+
[](https://github.com/pixeltable/pixeltable/actions)
|
|
47
|
+
[](https://pypi.org/project/pixeltable/)
|
|
48
|
+
|
|
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/master/docs/release/tutorials)
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
Pixeltable is a Python library that lets ML Engineers and Data Scientists focus on exploration, modeling, and app development without dealing with the customary data plumbing.
|
|
53
|
+
|
|
54
|
+
### What problems does Pixeltable solve?
|
|
55
|
+
|
|
56
|
+
Today’s solutions for AI app development require extensive custom coding and infrastructure plumbing. Tracking lineage and versions between and across data transformations, models, and deployment is cumbersome.
|
|
57
|
+
|
|
58
|
+
## 💾 Installation
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
pip install pixeltable
|
|
62
|
+
```
|
|
63
|
+
> [!IMPORTANT]
|
|
64
|
+
> Pixeltable is persistent. Unlike in-memory Python libraries such as Pandas, Pixeltable is a database. When working locally or against an hosted version of Pixeltable, use [get_table](https://pixeltable.github.io/pixeltable/api/pixeltable/#pixeltable.get_table) at any time to retrieve an existing table.
|
|
65
|
+
|
|
66
|
+
## 💡 Getting Started
|
|
67
|
+
Learn how to create tables, populate them with data, and enhance them with built-in or user-defined transformations and AI operations.
|
|
68
|
+
|
|
69
|
+
| Topic | Notebook | Topic | Notebook |
|
|
70
|
+
|:----------|:-----------------|:-------------------------|:---------------------------------:|
|
|
71
|
+
| 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/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/master/docs/release/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
72
|
+
| User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/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/master/docs/release/tutorials/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
73
|
+
| Experimenting with Chunking (RAG) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/tutorials/rag-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/howto/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
74
|
+
| Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/Docs-Label Studio-blue" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/tutorials/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
75
|
+
|
|
76
|
+
## 🧱 Code Samples
|
|
77
|
+
|
|
78
|
+
### Import media data into Pixeltable (videos, images, audio...)
|
|
79
|
+
```python
|
|
80
|
+
import pixeltable as pxt
|
|
81
|
+
|
|
82
|
+
v = pxt.create_table('external_data.videos', {'video': pxt.VideoType()})
|
|
83
|
+
|
|
84
|
+
prefix = 's3://multimedia-commons/'
|
|
85
|
+
paths = [
|
|
86
|
+
'data/videos/mp4/ffe/ffb/ffeffbef41bbc269810b2a1a888de.mp4',
|
|
87
|
+
'data/videos/mp4/ffe/feb/ffefebb41485539f964760e6115fbc44.mp4',
|
|
88
|
+
'data/videos/mp4/ffe/f73/ffef7384d698b5f70d411c696247169.mp4'
|
|
89
|
+
]
|
|
90
|
+
v.insert({'video': prefix + p} for p in paths)
|
|
91
|
+
```
|
|
92
|
+
Learn how to [work with data in Pixeltable](https://pixeltable.readme.io/docs/working-with-external-files).
|
|
93
|
+
|
|
94
|
+
### Add an object detection model to your workflow
|
|
95
|
+
```python
|
|
96
|
+
table['detections'] = huggingface.detr_for_object_detection(table.input_image, model_id='facebook/detr-resnet-50')
|
|
97
|
+
```
|
|
98
|
+
Learn about computed columns and object detection: [Comparing object detection models](https://pixeltable.readme.io/docs/object-detection-in-videos).
|
|
99
|
+
|
|
100
|
+
### Extend Pixeltable's capabilities with user-defined functions
|
|
101
|
+
```python
|
|
102
|
+
@pxt.udf
|
|
103
|
+
def draw_boxes(img: PIL.Image.Image, boxes: list[list[float]]) -> PIL.Image.Image:
|
|
104
|
+
result = img.copy() # Create a copy of `img`
|
|
105
|
+
d = PIL.ImageDraw.Draw(result)
|
|
106
|
+
for box in boxes:
|
|
107
|
+
d.rectangle(box, width=3) # Draw bounding box rectangles on the copied image
|
|
108
|
+
return result
|
|
109
|
+
```
|
|
110
|
+
Learn more about user-defined functions: [UDFs in Pixeltable](https://pixeltable.readme.io/docs/user-defined-functions-udfs).
|
|
111
|
+
|
|
112
|
+
### Automate data operations with views
|
|
113
|
+
```python
|
|
114
|
+
# In this example, the view is defined by iteration over the chunks of a DocumentSplitter.
|
|
115
|
+
chunks_table = pxt.create_view(
|
|
116
|
+
'rag_demo.chunks',
|
|
117
|
+
documents_table,
|
|
118
|
+
iterator=DocumentSplitter.create(
|
|
119
|
+
document=documents_table.document,
|
|
120
|
+
separators='token_limit', limit=300)
|
|
121
|
+
)
|
|
122
|
+
```
|
|
123
|
+
Learn how to leverage views to build your [RAG workflow](https://pixeltable.readme.io/docs/document-indexing-and-rag).
|
|
124
|
+
|
|
125
|
+
### Evaluate model performance
|
|
126
|
+
```python
|
|
127
|
+
# The computation of the mAP metric can simply become a query over the evaluation output, aggregated with the mean_ap() function.
|
|
128
|
+
frames_view.select(mean_ap(frames_view.eval_yolox_tiny), mean_ap(frames_view.eval_yolox_m)).show()
|
|
129
|
+
```
|
|
130
|
+
Learn how to leverage Pixeltable for [Model analytics](https://pixeltable.readme.io/docs/object-detection-in-videos).
|
|
131
|
+
|
|
132
|
+
### Working with inference services
|
|
133
|
+
```python
|
|
134
|
+
chat_table = pxt.create_table('together_demo.chat', {'input': pxt.StringType()})
|
|
135
|
+
|
|
136
|
+
# The chat-completions API expects JSON-formatted input:
|
|
137
|
+
messages = [{'role': 'user', 'content': chat_table.input}]
|
|
138
|
+
|
|
139
|
+
# This example shows how additional parameters from the Together API can be used in Pixeltable to customize the model behavior.
|
|
140
|
+
chat_table['output'] = chat_completions(
|
|
141
|
+
messages=messages,
|
|
142
|
+
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
143
|
+
max_tokens=300,
|
|
144
|
+
stop=['\n'],
|
|
145
|
+
temperature=0.7,
|
|
146
|
+
top_p=0.9,
|
|
147
|
+
top_k=40,
|
|
148
|
+
repetition_penalty=1.1,
|
|
149
|
+
logprobs=1,
|
|
150
|
+
echo=True
|
|
151
|
+
)
|
|
152
|
+
chat_table['response'] = chat_table.output.choices[0].message.content
|
|
153
|
+
|
|
154
|
+
# Start a conversation
|
|
155
|
+
chat_table.insert([
|
|
156
|
+
{'input': 'How many species of felids have been classified?'},
|
|
157
|
+
{'input': 'Can you make me a coffee?'}
|
|
158
|
+
])
|
|
159
|
+
chat_table.select(chat_table.input, chat_table.response).head()
|
|
160
|
+
```
|
|
161
|
+
Learn how to interact with inference services such as [Together AI](https://pixeltable.readme.io/docs/together-ai) in Pixeltable.
|
|
162
|
+
|
|
163
|
+
## ❓ FAQ
|
|
164
|
+
|
|
165
|
+
### What is Pixeltable?
|
|
166
|
+
|
|
167
|
+
Pixeltable unifies data storage, versioning, and indexing with orchestration and model versioning under a declarative table interface, with transformations, model inference, and custom logic represented as computed columns.
|
|
168
|
+
|
|
169
|
+
### What does Pixeltable provide me with? Pixeltable provides:
|
|
170
|
+
|
|
171
|
+
- Data storage and versioning
|
|
172
|
+
- Combined Data and Model Lineage
|
|
173
|
+
- Indexing (e.g. embedding vectors) and Data Retrieval
|
|
174
|
+
- Orchestration of multimodal workloads
|
|
175
|
+
- Incremental updates
|
|
176
|
+
- Code is automatically production-ready
|
|
177
|
+
|
|
178
|
+
### Why should you use Pixeltable?
|
|
179
|
+
|
|
180
|
+
- **It gives you transparency and reproducibility**
|
|
181
|
+
- All generated data is automatically recorded and versioned
|
|
182
|
+
- You will never need to re-run a workload because you lost track of the input data
|
|
183
|
+
- **It saves you money**
|
|
184
|
+
- All data changes are automatically incremental
|
|
185
|
+
- You never need to re-run pipelines from scratch because you’re adding data
|
|
186
|
+
- **It integrates with any existing Python code or libraries**
|
|
187
|
+
- Bring your ever-changing code and workloads
|
|
188
|
+
- You choose the models, tools, and AI practices (e.g., your embedding model for a vector index); Pixeltable orchestrates the data
|
|
189
|
+
|
|
190
|
+
### What is Pixeltable not providing?
|
|
191
|
+
|
|
192
|
+
- Pixeltable is not a low-code, prescriptive AI solution. We empower you to use the best frameworks and techniques for your specific needs.
|
|
193
|
+
- We do not aim to replace your existing AI toolkit, but rather enhance it by streamlining the underlying data infrastructure and orchestration.
|
|
194
|
+
|
|
195
|
+
> [!TIP]
|
|
196
|
+
> Check out the [Integrations](https://pixeltable.readme.io/docs/working-with-openai) section, and feel free to submit a request for additional ones.
|
|
197
|
+
|
|
198
|
+
## 🐛 Contributions & Feedback
|
|
199
|
+
|
|
200
|
+
Are you experiencing issues or bugs with Pixeltable? File an [Issue](https://github.com/pixeltable/pixeltable/issues).
|
|
201
|
+
</br>Do you want to contribute? Feel free to open a [PR](https://github.com/pixeltable/pixeltable/pulls).
|
|
202
|
+
|
|
203
|
+
## :classical_building: License
|
|
204
|
+
|
|
205
|
+
This library is licensed under the Apache 2.0 License.
|
|
206
|
+
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/pixeltable/pixeltable/master/docs/release/pixeltable-banner.png" alt="Pixeltable" width="45%" />
|
|
3
|
+
|
|
4
|
+
# Unifying Data, Models, and Orchestration for AI Products
|
|
5
|
+
|
|
6
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
|
+

|
|
8
|
+
[]()
|
|
9
|
+
[](https://github.com/pixeltable/pixeltable/actions)
|
|
10
|
+
[](https://pypi.org/project/pixeltable/)
|
|
11
|
+
|
|
12
|
+
[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/master/docs/release/tutorials)
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
Pixeltable is a Python library that lets ML Engineers and Data Scientists focus on exploration, modeling, and app development without dealing with the customary data plumbing.
|
|
16
|
+
|
|
17
|
+
### What problems does Pixeltable solve?
|
|
18
|
+
|
|
19
|
+
Today’s solutions for AI app development require extensive custom coding and infrastructure plumbing. Tracking lineage and versions between and across data transformations, models, and deployment is cumbersome.
|
|
20
|
+
|
|
21
|
+
## 💾 Installation
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
pip install pixeltable
|
|
25
|
+
```
|
|
26
|
+
> [!IMPORTANT]
|
|
27
|
+
> Pixeltable is persistent. Unlike in-memory Python libraries such as Pandas, Pixeltable is a database. When working locally or against an hosted version of Pixeltable, use [get_table](https://pixeltable.github.io/pixeltable/api/pixeltable/#pixeltable.get_table) at any time to retrieve an existing table.
|
|
28
|
+
|
|
29
|
+
## 💡 Getting Started
|
|
30
|
+
Learn how to create tables, populate them with data, and enhance them with built-in or user-defined transformations and AI operations.
|
|
31
|
+
|
|
32
|
+
| Topic | Notebook | Topic | Notebook |
|
|
33
|
+
|:----------|:-----------------|:-------------------------|:---------------------------------:|
|
|
34
|
+
| 10-Minute Tour of Pixeltable | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/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/master/docs/release/fundamentals/tables-and-data-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
35
|
+
| User-Defined Functions (UDFs) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/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/master/docs/release/tutorials/object-detection-in-videos.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
36
|
+
| Experimenting with Chunking (RAG) | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/tutorials/rag-operations.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> | Working with External Files | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/howto/working-with-external-files.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
37
|
+
| Integrating with Label Studio | <a target="_blank" href="https://pixeltable.readme.io/docs/label-studio"> <img src="https://img.shields.io/badge/Docs-Label Studio-blue" alt="Visit our documentation"/></a> | Audio/Video Transcript Indexing | <a target="_blank" href="https://colab.research.google.com/github/pixeltable/pixeltable/blob/master/docs/release/tutorials/audio-transcriptions.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
|
|
38
|
+
|
|
39
|
+
## 🧱 Code Samples
|
|
40
|
+
|
|
41
|
+
### Import media data into Pixeltable (videos, images, audio...)
|
|
42
|
+
```python
|
|
43
|
+
import pixeltable as pxt
|
|
44
|
+
|
|
45
|
+
v = pxt.create_table('external_data.videos', {'video': pxt.VideoType()})
|
|
46
|
+
|
|
47
|
+
prefix = 's3://multimedia-commons/'
|
|
48
|
+
paths = [
|
|
49
|
+
'data/videos/mp4/ffe/ffb/ffeffbef41bbc269810b2a1a888de.mp4',
|
|
50
|
+
'data/videos/mp4/ffe/feb/ffefebb41485539f964760e6115fbc44.mp4',
|
|
51
|
+
'data/videos/mp4/ffe/f73/ffef7384d698b5f70d411c696247169.mp4'
|
|
52
|
+
]
|
|
53
|
+
v.insert({'video': prefix + p} for p in paths)
|
|
54
|
+
```
|
|
55
|
+
Learn how to [work with data in Pixeltable](https://pixeltable.readme.io/docs/working-with-external-files).
|
|
56
|
+
|
|
57
|
+
### Add an object detection model to your workflow
|
|
58
|
+
```python
|
|
59
|
+
table['detections'] = huggingface.detr_for_object_detection(table.input_image, model_id='facebook/detr-resnet-50')
|
|
60
|
+
```
|
|
61
|
+
Learn about computed columns and object detection: [Comparing object detection models](https://pixeltable.readme.io/docs/object-detection-in-videos).
|
|
62
|
+
|
|
63
|
+
### Extend Pixeltable's capabilities with user-defined functions
|
|
64
|
+
```python
|
|
65
|
+
@pxt.udf
|
|
66
|
+
def draw_boxes(img: PIL.Image.Image, boxes: list[list[float]]) -> PIL.Image.Image:
|
|
67
|
+
result = img.copy() # Create a copy of `img`
|
|
68
|
+
d = PIL.ImageDraw.Draw(result)
|
|
69
|
+
for box in boxes:
|
|
70
|
+
d.rectangle(box, width=3) # Draw bounding box rectangles on the copied image
|
|
71
|
+
return result
|
|
72
|
+
```
|
|
73
|
+
Learn more about user-defined functions: [UDFs in Pixeltable](https://pixeltable.readme.io/docs/user-defined-functions-udfs).
|
|
74
|
+
|
|
75
|
+
### Automate data operations with views
|
|
76
|
+
```python
|
|
77
|
+
# In this example, the view is defined by iteration over the chunks of a DocumentSplitter.
|
|
78
|
+
chunks_table = pxt.create_view(
|
|
79
|
+
'rag_demo.chunks',
|
|
80
|
+
documents_table,
|
|
81
|
+
iterator=DocumentSplitter.create(
|
|
82
|
+
document=documents_table.document,
|
|
83
|
+
separators='token_limit', limit=300)
|
|
84
|
+
)
|
|
85
|
+
```
|
|
86
|
+
Learn how to leverage views to build your [RAG workflow](https://pixeltable.readme.io/docs/document-indexing-and-rag).
|
|
87
|
+
|
|
88
|
+
### Evaluate model performance
|
|
89
|
+
```python
|
|
90
|
+
# The computation of the mAP metric can simply become a query over the evaluation output, aggregated with the mean_ap() function.
|
|
91
|
+
frames_view.select(mean_ap(frames_view.eval_yolox_tiny), mean_ap(frames_view.eval_yolox_m)).show()
|
|
92
|
+
```
|
|
93
|
+
Learn how to leverage Pixeltable for [Model analytics](https://pixeltable.readme.io/docs/object-detection-in-videos).
|
|
94
|
+
|
|
95
|
+
### Working with inference services
|
|
96
|
+
```python
|
|
97
|
+
chat_table = pxt.create_table('together_demo.chat', {'input': pxt.StringType()})
|
|
98
|
+
|
|
99
|
+
# The chat-completions API expects JSON-formatted input:
|
|
100
|
+
messages = [{'role': 'user', 'content': chat_table.input}]
|
|
101
|
+
|
|
102
|
+
# This example shows how additional parameters from the Together API can be used in Pixeltable to customize the model behavior.
|
|
103
|
+
chat_table['output'] = chat_completions(
|
|
104
|
+
messages=messages,
|
|
105
|
+
model='mistralai/Mixtral-8x7B-Instruct-v0.1',
|
|
106
|
+
max_tokens=300,
|
|
107
|
+
stop=['\n'],
|
|
108
|
+
temperature=0.7,
|
|
109
|
+
top_p=0.9,
|
|
110
|
+
top_k=40,
|
|
111
|
+
repetition_penalty=1.1,
|
|
112
|
+
logprobs=1,
|
|
113
|
+
echo=True
|
|
114
|
+
)
|
|
115
|
+
chat_table['response'] = chat_table.output.choices[0].message.content
|
|
116
|
+
|
|
117
|
+
# Start a conversation
|
|
118
|
+
chat_table.insert([
|
|
119
|
+
{'input': 'How many species of felids have been classified?'},
|
|
120
|
+
{'input': 'Can you make me a coffee?'}
|
|
121
|
+
])
|
|
122
|
+
chat_table.select(chat_table.input, chat_table.response).head()
|
|
123
|
+
```
|
|
124
|
+
Learn how to interact with inference services such as [Together AI](https://pixeltable.readme.io/docs/together-ai) in Pixeltable.
|
|
125
|
+
|
|
126
|
+
## ❓ FAQ
|
|
127
|
+
|
|
128
|
+
### What is Pixeltable?
|
|
129
|
+
|
|
130
|
+
Pixeltable unifies data storage, versioning, and indexing with orchestration and model versioning under a declarative table interface, with transformations, model inference, and custom logic represented as computed columns.
|
|
131
|
+
|
|
132
|
+
### What does Pixeltable provide me with? Pixeltable provides:
|
|
133
|
+
|
|
134
|
+
- Data storage and versioning
|
|
135
|
+
- Combined Data and Model Lineage
|
|
136
|
+
- Indexing (e.g. embedding vectors) and Data Retrieval
|
|
137
|
+
- Orchestration of multimodal workloads
|
|
138
|
+
- Incremental updates
|
|
139
|
+
- Code is automatically production-ready
|
|
140
|
+
|
|
141
|
+
### Why should you use Pixeltable?
|
|
142
|
+
|
|
143
|
+
- **It gives you transparency and reproducibility**
|
|
144
|
+
- All generated data is automatically recorded and versioned
|
|
145
|
+
- You will never need to re-run a workload because you lost track of the input data
|
|
146
|
+
- **It saves you money**
|
|
147
|
+
- All data changes are automatically incremental
|
|
148
|
+
- You never need to re-run pipelines from scratch because you’re adding data
|
|
149
|
+
- **It integrates with any existing Python code or libraries**
|
|
150
|
+
- Bring your ever-changing code and workloads
|
|
151
|
+
- You choose the models, tools, and AI practices (e.g., your embedding model for a vector index); Pixeltable orchestrates the data
|
|
152
|
+
|
|
153
|
+
### What is Pixeltable not providing?
|
|
154
|
+
|
|
155
|
+
- Pixeltable is not a low-code, prescriptive AI solution. We empower you to use the best frameworks and techniques for your specific needs.
|
|
156
|
+
- We do not aim to replace your existing AI toolkit, but rather enhance it by streamlining the underlying data infrastructure and orchestration.
|
|
157
|
+
|
|
158
|
+
> [!TIP]
|
|
159
|
+
> Check out the [Integrations](https://pixeltable.readme.io/docs/working-with-openai) section, and feel free to submit a request for additional ones.
|
|
160
|
+
|
|
161
|
+
## 🐛 Contributions & Feedback
|
|
162
|
+
|
|
163
|
+
Are you experiencing issues or bugs with Pixeltable? File an [Issue](https://github.com/pixeltable/pixeltable/issues).
|
|
164
|
+
</br>Do you want to contribute? Feel free to open a [PR](https://github.com/pixeltable/pixeltable/pulls).
|
|
165
|
+
|
|
166
|
+
## :classical_building: License
|
|
167
|
+
|
|
168
|
+
This library is licensed under the Apache 2.0 License.
|
|
@@ -3,8 +3,8 @@ from .dataframe import DataFrame
|
|
|
3
3
|
from .exceptions import Error
|
|
4
4
|
from .exprs import RELATIVE_PATH_ROOT
|
|
5
5
|
from .func import Function, udf, Aggregator, uda, expr_udf
|
|
6
|
-
from .globals import init, create_table, create_view, get_table, move, drop_table, list_tables, create_dir,
|
|
7
|
-
list_dirs, list_functions,
|
|
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
|
|
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.
|
|
3
|
-
__version_tuple__ = (0, 2,
|
|
2
|
+
__version__ = "0.2.13"
|
|
3
|
+
__version_tuple__ = (0, 2, 13)
|
|
@@ -129,11 +129,11 @@ class InsertableTable(Table):
|
|
|
129
129
|
msg = str(e)
|
|
130
130
|
raise excs.Error(f'Error in column {col.name}: {msg[0].lower() + msg[1:]}\nRow: {row}')
|
|
131
131
|
|
|
132
|
-
def delete(self, where: Optional['pixeltable.exprs.
|
|
132
|
+
def delete(self, where: Optional['pixeltable.exprs.Expr'] = None) -> UpdateStatus:
|
|
133
133
|
"""Delete rows in this table.
|
|
134
134
|
|
|
135
135
|
Args:
|
|
136
|
-
where: a
|
|
136
|
+
where: a predicate to filter rows to delete.
|
|
137
137
|
|
|
138
138
|
Examples:
|
|
139
139
|
Delete all rows in a table:
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from abc import abstractmethod
|
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from pixeltable import catalog
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SchemaObject:
|
|
10
|
+
"""
|
|
11
|
+
Base class of all addressable objects within a Db.
|
|
12
|
+
Each object has an id, a name and a parent directory.
|
|
13
|
+
"""
|
|
14
|
+
def __init__(self, obj_id: UUID, name: str, dir_id: Optional[UUID]):
|
|
15
|
+
# make these private so they don't collide with column names (id and name are fairly common)
|
|
16
|
+
self._id = obj_id
|
|
17
|
+
self._name = name
|
|
18
|
+
self._dir_id = dir_id
|
|
19
|
+
|
|
20
|
+
def _get_id(self) -> UUID:
|
|
21
|
+
return self._id
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def name(self) -> str:
|
|
25
|
+
"""Returns the name of this schema object."""
|
|
26
|
+
return self._name
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def parent(self) -> Optional['catalog.Dir']:
|
|
30
|
+
"""Returns the parent directory of this schema object."""
|
|
31
|
+
from pixeltable import catalog
|
|
32
|
+
if self._dir_id is None:
|
|
33
|
+
return None
|
|
34
|
+
dir = catalog.Catalog.get().paths.get_schema_obj(self._dir_id)
|
|
35
|
+
assert isinstance(dir, catalog.Dir)
|
|
36
|
+
return dir
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def path(self) -> str:
|
|
40
|
+
"""Returns the path to this schema object."""
|
|
41
|
+
parent = self.parent
|
|
42
|
+
if parent is None or parent.parent is None:
|
|
43
|
+
# Either this is the root directory, with empty path, or its parent is the
|
|
44
|
+
# root directory. Either way, we return just the name.
|
|
45
|
+
return self.name
|
|
46
|
+
else:
|
|
47
|
+
return f'{parent.path}.{self.name}'
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
@abstractmethod
|
|
51
|
+
def display_name(cls) -> str:
|
|
52
|
+
"""
|
|
53
|
+
Return name displayed in error messages.
|
|
54
|
+
"""
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
def _move(self, new_name: str, new_dir_id: UUID) -> None:
|
|
58
|
+
"""Subclasses need to override this to make the change persistent"""
|
|
59
|
+
self._name = new_name
|
|
60
|
+
self._dir_id = new_dir_id
|