# AsyncJobFailed

Raised when an asynchronous job fails to execute successfully.

This exception is thrown when long-running operations (such as model training, data processing, or batch operations) fail to complete successfully. The job may have been submitted successfully but encountered an error during execution.

Async jobs in Fiddler include operations like model artifact uploads, baseline computations, batch data ingestion, and other time-intensive operations that run in the background.

## Examples

Handling async job failures:

```python
try:
    job = model.upload_artifact(artifact_path)
    job.wait()  # Wait for completion

except AsyncJobFailed as e:
    print(f"Job failed: {e.message}")
    # Check job logs or retry operation
```

Monitoring job status to avoid exceptions:

```python
job = model.upload_artifact(artifact_path)
while not job.is_complete():

    if job.status == JobStatus.FAILED:
        print(f"Job failed: {job.error_message}")
        break

        time.sleep(5)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/fiddler-python-client-sdk/exceptions/async-job-failed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
