Failed upload exception
FailedUploadException #
FailedUploadException(
dataset: RapidataDataset,
failed_uploads: list[FailedUpload[Datapoint]],
job_definition: Optional[RapidataJobDefinition] = None,
machine: Optional[JobDefinitionCreationMachine] = None,
)
Bases: Exception
Custom error class for failed datapoint uploads during job-definition creation.
Source code in src/rapidata/rapidata_client/exceptions/failed_upload_exception.py
machine
property
#
The creation state machine backing retry() for job-definition
creation.
failed_uploads
property
#
Get list of failed datapoints (backward compatibility).
Returns:
| Type | Description |
|---|---|
list[Datapoint]
|
List of datapoints that failed to upload. |
detailed_failures
property
#
detailed_failures: list[FailedUpload[Datapoint]]
Get detailed failure information including error messages.
Returns:
| Type | Description |
|---|---|
list[FailedUpload[Datapoint]]
|
List of FailedUpload objects with item and error details. |
failures_by_reason
property
#
Get failures grouped by error reason.
Returns:
| Type | Description |
|---|---|
dict[str, list[Datapoint]]
|
Dictionary mapping error reasons to lists of failed datapoints. |
failures_by_stage
property
#
Get failures grouped by ingestion stage (remote-URL assets).
Only failures that carry a stage are included, so an empty dict means no failure reached the asset service with a classified stage (e.g. local file errors or datapoint-creation failures). The "internal" key is the only Rapidata-side fault; every other stage is caller-actionable.
Returns:
| Type | Description |
|---|---|
dict[str, list[Datapoint]]
|
Dictionary mapping ingestion stage to lists of failed datapoints. |
retry #
retry() -> RapidataJobDefinition
Retry the failed datapoints and finish creating the job definition.
Re-uploads only the datapoints that failed into the same dataset
(never a new one), then creates the job definition once the upload is
within the configured failure tolerance. Returns the created
RapidataJobDefinition. If some datapoints still fail beyond the
tolerance, this raises FailedUploadException again (with the same
dataset attached) so it can be caught and retried in a loop.
This is the intended recovery path for a failed job-definition
creation: fix whatever caused the failures (e.g. correct file paths),
then call retry() - no need to re-specify the datapoints or drop
down to dataset.add_datapoints manually.