Labelbox / labelbox-python

The data factory for next gen AI
https://labelbox.com
Apache License 2.0
111 stars 58 forks source link

Refactor Dataset create_data_rows_sync to use upsert #1694

Closed vbrodsky closed 2 months ago

vbrodsky commented 2 months ago

Description

This PR introduces improvements to the data row creation process within the SDK. This PR refactors the following two data row creation methods:

Both methods now leverage the upsert mutation for data row creation.

Since the upsert mutation is asynchronous, a task waiting mechanism has been implemented within these methods to ensure synchronous data row creation behavior.

A new ResourceCreationError exception has been introduced. This exception provides informative error messages in case of data creation failures, replacing the previous approach of returning None.

Stories: https://labelbox.atlassian.net/browse/PLT-1066 https://labelbox.atlassian.net/browse/PLT-1067

On test failures:

Type of change

Please delete options that are not relevant.

All Submissions

New Feature Submissions

Changes to Core Features