pixano.features.schemas.annotations.annotation
Annotation(created_at=None, updated_at=None, **data)
Bases: BaseSchema
Annotations are used to annotate an entity in a dataset.
It can refer to an entity, an item, and a view.
Attributes:
Name | Type | Description |
---|---|---|
item_ref |
ItemRef
|
Reference to the annotation's item. |
view_ref |
ViewRef
|
Reference to the annotation's view. |
entity_ref |
EntityRef
|
Reference to the annotation's entity. |
source_ref |
SourceRef
|
Reference to the annotation's source. |
Raises ValidationError
if the input data cannot be
validated to form a valid model.
self
is explicitly positional-only to allow self
as a field name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
created_at
|
datetime | None
|
The creation date of the object. |
None
|
updated_at
|
datetime | None
|
The last modification date of the object. |
None
|
data
|
Any
|
The data of the object validated by Pydantic. |
{}
|
Source code in pixano/features/schemas/base_schema.py
entity: Entity
property
Get the annotation's entity.
item: Item
property
Get the annotation's item.
view: View
property
Get the annotation's view.
is_annotation(cls, strict=False)
Check if a class is an Annotation or subclass of Annotation.