ValueError
- if the underlying assets are not videos, images, or audio.EncordException
- if data type not supported by SDK yet.filter_ontology_objects
- Specify a list of ontology objects to include.
If provided, only instances of these object types are included.
Strings are matched against feature_node_hashes
.
Returns
- The dependency to be injected into the cloud function.
lr.data_hash.{suffix}
.
When the function has finished running, the downloaded file is removed from the file system.
Example:
storage_item
- The Storage item. Automatically injected (see example above).DataLookup
is deprecated and will be removed in version 0.2.10.
Migration Guide:
dep_storage_item
instead:
StorageItem
is useful for multiple things like
storage_item
- Automatically injected storage item dependency.NotImplementedError
- Fails for data types other than video.label_row_metadata_include_args
- arguments to overwrite default arguments
on project.list_label_rows_v2()
.label_row_initialise_labels_args
- Arguments to overwrite default arguments
on label_row.initialise_labels(...)
custom_cors_regex
- A regex to use for the CORS settings. If not provided, the default regex will be used.
Only required if the agent is not deployed on Encord’s platform.ValueError
- if the underlying assets are not videos, images, or audio.EncordException
- if data type not supported by SDK yet.filter_ontology_objects
- Specify a list of ontology objects to include.
If provided, only instances of these object types are included.
Strings are matched against feature_node_hashes
.
Returns
- The dependency to be injected into the cloud function.
lr.data_hash.{suffix}
.
When the function has finished running, the downloaded file is removed from the file system.
Example:
storage_item
- The Storage item. Automatically injected (see example above).DataLookup
is deprecated and will be removed in version 0.2.10.
Migration Guide:
dep_storage_item
instead:
StorageItem
is useful for multiple things like
storage_item
- Automatically injected storage item dependency.NotImplementedError
- Fails for data types other than video.fastapi.middleware.cors.CORSMiddleware
but matches against
the Encord origin by default and handles X-Encord-Editor-Agent test header
Example:
The CORS middleware will allow POST requests from the Encord domain.
custom_cors_regex
str | None, optional - A regex to use for the CORS middleware.
Only necessary if you are not using the default Encord domain.FastAPI
- A FastAPI app with the Encord middleware.FrameData
is automatically injected via the api request body.
label_row_metadata_include_args
- What arguments to include on the metadata frontlabel_row_initialise_labels_args
- How and whether to initialize the label rowsframe_data
- the frame data from the route. This parameter is automatically injected
if it’s a part of your route (see example above)StorageItem
is useful for multiple things like
lr.data_hash.{suffix}
.
When the function has finished, the downloaded file will be removed from the file system.
Example:
storage_item
- The label row. Automatically injected (see example above).
frame_data
- the frame data from the route. This parameter is automatically injected
if it’s a part of your route (see example above).
Returns
- Numpy array of shape [h, w, 3] RGB colors.
ValueError
- if the underlying assets are not videos, images, or audio.EncordException
- if data type not supported by SDK yet.storage_item
- Automatically injected storage item dependency.NotImplementedError
- Will fail for other data types than video.dep_data_lookup
is deprecated and will be removed in version 0.2.10.
Use dep_storage_item
instead for accessing storage items.
Migration Guide:
lookup
- The object that you can use to lookup data rows and storage items. Automatically injected.filter_ontology_objects
- Optional list of ontology objects to filter by.
If provided, only instances of these object types will be included.
Strings are matched against feature_node_hashes
.