Skip to content

Studio Client

EdgeFirst Client Library This library provides a client for the EdgeFirst API, allowing users to interact with the EdgeFirst Studio Server and perform various operations such as logging in, managing projects, and working with datasets and snapshots.

This is the Python API binding for the EdgeFirst Client Library. A Rust library and a command-line interface are also available. The CLI tool is bundgled with the Python wheel and can be called using the edgefirst-client command.

The Python API is available as the edgefirst_client module. The main class is Client, which provides methods for interacting with the EdgeFirst Studio Server. To use the Client object you need to create an instance, with an optional authentication token or username and password.

__all__ module

__all__ = ['Client', 'Project', 'Experiment', 'TrainerSession', 'AnnotationSet', 'AnnotationType', 'AnnotationGroup', 'Dataset', 'Box2d', 'Box3d', 'Segmentation', 'DatasetParams']

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

__cached__ module

__cached__ = '/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/edgefirst_client/__pycache__/__init__.cpython-310.pyc'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__doc__ module

__doc__ = 'EdgeFirst Client Library\nThis library provides a client for the EdgeFirst API, allowing users to\ninteract with the EdgeFirst Studio Server and perform various operations\nsuch as logging in, managing projects, and working with datasets and\nsnapshots.\n\nThis is the Python API binding for the EdgeFirst Client Library.  A Rust\nlibrary and a command-line interface are also available.  The CLI tool is\nbundgled with the Python wheel and can be called using the\n`edgefirst-client` command.\n\nThe Python API is available as the `edgefirst_client` module.  The main\nclass is `Client`, which provides methods for interacting with the EdgeFirst\nStudio Server.  To use the `Client` object you need to create an instance,\nwith an optional authentication token or username and password.'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__file__ module

__file__ = '/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/edgefirst_client/__init__.py'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__name__ module

__name__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__package__ module

__package__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__path__ module

__path__ = ['/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/edgefirst_client']

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

AnnotationGroup

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

AnnotationSet

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).

AnnotationType

AnnotationType is used to identify the type of annotation in the dataset.

Box2d class

Box2d = AnnotationType.Box2d

AnnotationType is used to identify the type of annotation in the dataset.

Box3d class

Box3d = AnnotationType.Box3d

AnnotationType is used to identify the type of annotation in the dataset.

Segmentation class

Segmentation = AnnotationType.Segmentation

AnnotationType is used to identify the type of annotation in the dataset.

__doc__ class

__doc__ = 'AnnotationType is used to identify the type of annotation in the dataset.'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__eq__ method descriptor

__eq__(value)

Return self==value.

__ge__ method descriptor

__ge__(value)

Return self>=value.

__gt__ method descriptor

__gt__(value)

Return self>value.

__int__ method descriptor

__int__()

int(self)

__le__ method descriptor

__le__(value)

Return self<=value.

__lt__ method descriptor

__lt__(value)

Return self<value.

__ne__ method descriptor

__ne__(value)

Return self!=value.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

Box2d

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

Box3d

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

Client

The EdgeFirst Client handles the connection to the EdgeFirst Studio Server and manages authentication and the client RPC calls. The client also provides various utility methods for interacting with datasets and converting them to and from Polars DataFrames.

__doc__ class

__doc__ = 'The EdgeFirst Client handles the connection to the EdgeFirst Studio Server\nand manages authentication and the client RPC calls.  The client also\nprovides various utility methods for interacting with datasets and\nconverting them to and from Polars DataFrames.'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

annotation_set_sync method descriptor

annotation_set_sync(annotation_set_id)

Retrieve the annotation set with the specified ID.

annotation_sets_sync method descriptor

annotation_sets_sync(dataset_id)

List available annotation sets for the specified dataset.

annotations_dataframe_sync method descriptor

annotations_dataframe_sync(annotation_set_id, types=Ellipsis, progress=None)

Get the AnnotationGroup for the specified annotation set with the requested annotation types. The annotation type is used to filter the annotations returned. Images which do not have any annotations are included in the result.

The result is a DataFrame following the EdgeFirst Dataset Format definition.

To get the annotations as a vector of AnnotationGroup objects, use the annotations_sync method instead.

annotations_sync method descriptor

annotations_sync(annotation_set_id, types=Ellipsis, progress=None)

Get the AnnotationGroup for the specified annotation set with the requested annotation types. The annotation type is used to filter the annotations returned. Images which do not have any annotations are included in the result.

The result is a vector of AnnotationGroup objects which contain the full dataset along with the annotations for the specified types.

To get the annotations as a DataFrame, use the annotations_dataframe_sync method instead.

artifacts_sync method descriptor

artifacts_sync(trainer_session_id)

List the artifacts for the specified trainer session. The artifacts are returned as a vector of strings.

create_snapshot_sync method descriptor

create_snapshot_sync(path, progress=None)

Create a new snapshot from the file at the specified path. If the path is a directory then all the files in the directory are uploaded. The snapshot name will be the specified path, either file or directory.

The progress callback can be used to monitor the progress of the upload. The callback must have the signature fn(current: int, total: int).

dataset_images_sync method descriptor

dataset_images_sync(dataset_id)

Get image ids for the dataset with the specified dataset ID.

dataset_sync method descriptor

dataset_sync(dataset_id)

Return the dataset with the specified dataset ID. If the dataset does not exist, an error is returned.

datasets_sync method descriptor

datasets_sync(project_id)

Returns a list of datasets available to the user. The datasets are returned as a vector of Dataset objects.

download_artifact_sync method descriptor

download_artifact_sync(trainer_session_id, modelname, filename, progress=None)

Download the model artifact for the specified trainer session to the specified file path. A progress callback can be provided to monitor the progress of the download over a watch channel.

download_dataset_sync method descriptor

download_dataset_sync(dataset_id, output=None, progress=None)

Downloads the dataset with the specified dataset ID to the specified file path. A progress callback can be provided to monitor the progress of the download.

The callback must have the signature fn(current: int, total: int).

download_snapshot_sync method descriptor

download_snapshot_sync(snapshot_id, output=None, progress=None)

Downloads a snapshot from the server. The snapshot could be a single file or a directory of files. The snapshot is downloaded to the specified path.

A progress callback can be provided to monitor the progress of the download.

The callback must have the signature fn(current: int, total: int).

experiment_sync method descriptor

experiment_sync(trainer_id)

Return the experiment with the specified experiment ID. If the experiment does not exist, an error is returned.

experiments_sync method descriptor

experiments_sync(project_id)

Returns a list of experiments available to the user. The experiments are returned as a vector of Experiment objects. Experiments provide a method of organizing training and validation sessions together and are akin to an Experiment in MLFlow terminology. Each experiment can have multiple trainer sessions associated with it, these would be akin to runs in MLFlow terminology.

find_datasets_sync method descriptor

find_datasets_sync(project_id, name)

Find a dataset by name within the project with the specified project ID.

find_experiments_sync method descriptor

find_experiments_sync(project_id, name)

Find an experiment containing the provided name within the project. If no experiment is found an empty list is returned.

find_projects_sync method descriptor

find_projects_sync(name)

Find a project by name. If the project does not exist, None is returned.

find_snapshots_sync method descriptor

find_snapshots_sync(name)

Find the snapshots containing the provided description.

find_trainer_sessions_sync method descriptor

find_trainer_sessions_sync(trainer_id, name)

Find a trainer session by name within the trainer with the specified trainer ID. If the trainer session does not exist, None is returned.

image_sync method descriptor

image_sync(image_id)

Get image metadata for the specified image ID.

login_sync method descriptor

login_sync(username, password)

Login to the server using the specified username and password. The server will authenticate the user and return a token that can be used to authenticate future requests. The token is stored in the client and used to authenticate the client with the server.

project_sync method descriptor

project_sync(project_id)

Return the project with the specified project ID. If the project does not exist, an error is returned.

projects_sync method descriptor

projects_sync()

Returns a list of projects available to the user. The projects are returned as a vector of Project objects.

Projects are the top-level organizational unit in EdgeFirst Studio. Projects contain datasets, trainers, and trainer sessions. Projects are used to group related datasets and trainers together.

restore_snapshot_sync method descriptor

restore_snapshot_sync(project_id, snapshot_id, topics, autolabel, autodepth, dataset_name=None, dataset_description=None)

The snapshot restore method is used to restore a snapshot to the server. The restore method can perform a few different operations depending on the snapshot type.

The auto-annotation workflow is used to automatically annotate the dataset with 2D masks and boxes using the labels within the autolabel list. If autolabel is empty then the auto-annotation workflow is not used. If the MCAP includes radar or LiDAR data then the auto-annotation workflow will also generate 3D bounding boxes for detected objects.

The autodepth flag is used to determine if a depthmap should be automatically generated for the dataset, this will currently only work accurately for Maivin or Raivin cameras.

snapshot_sync method descriptor

snapshot_sync(snapshot_id)

Get the snapshot with the specified id.

snapshots_sync method descriptor

snapshots_sync()

List available snapshots.

token_sync method descriptor

token_sync()

Return the token used to authenticate the client with the server. When logging into the server using a username and password, the token is returned by the server and stored in the client for future interactions.

trainer_session_sync method descriptor

trainer_session_sync(trainer_session_id)

Return the trainer session with the specified trainer session ID. If the trainer session does not exist, an error is returned.

trainer_sessions_sync method descriptor

trainer_sessions_sync(trainer_id)

Returns a list of trainer sessions available to the user. The trainer sessions are returned as a vector of TrainerSession objects. Trainer sessions are akin to runs in MLFlow terminology. These represent an actual training session which will produce metrics and model artifacts.

verify_token_sync method descriptor

verify_token_sync()

Verify the token used to authenticate the client with the server. This method is used to ensure that the token is still valid and has not expired. If the token is invalid, the server will return an error and the client will need to login again.

version_sync method descriptor

version_sync()

Return the version of the EdgeFirst Studio server for the current client connection.

Dataset

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).

DatasetParams

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

Experiment

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).

Project

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).

Segmentation

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

TrainerSession

__module__ class

__module__ = 'edgefirst_client'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).