Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docarray/documents/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ def create_doc(
"""
Dynamically create a subclass of BaseDoc. This is a wrapper around pydantic's create_model.

!!! note
To pickle a dynamically created BaseDoc subclass:

- the class must be defined globally
- it must provide `__module__`

```python
from docarray.documents import Audio
from docarray.documents.helper import create_doc
Expand Down