Job
Job
Represents an asynchronous operation in the Fiddler platform.
A Job tracks the execution of long-running operations such as data publishing, model artifact uploads, surrogate model training, and other async tasks. Jobs provide status monitoring, progress tracking, and error handling for operations that may take significant time to complete.
Key Features:
Status Monitoring: Real-time tracking of job execution state
Progress Tracking: Percentage completion for running operations
Error Reporting: Detailed error messages and failure reasons
Timeout Handling: Configurable timeouts for job completion
Responsive Polling: Efficient status checking with backoff strategies
Job States:
PENDING: Job queued and waiting to start execution
STARTED: Job actively running with progress updates
SUCCESS: Job completed successfully
FAILURE: Job failed with detailed error information
RETRY: Job being retried after a failure
REVOKED: Job cancelled or terminated
Example
Initialize a Job instance.
Creates a job object for tracking asynchronous operations. This constructor is typically used internally when deserializing API responses rather than for direct job creation.
classmethod get(id_, verbose=False)
Retrieve a job by its unique identifier.
Fetches a job from the Fiddler platform using its UUID. This is the primary way to retrieve job information for monitoring async operations.
Parameters
verbose
bool
✗
None
Whether to include detailed task execution information. When True, provides additional debugging and progress details.
Returns
The job instance with current status, progress, and metadata.
Return type: Job
Raises
NotFound – If no job exists with the specified ID.
ApiError – If there’s an error communicating with the Fiddler API.
Example
watch()
Monitor job progress with real-time status updates.
Continuously polls the job status at specified intervals and yields updated job instances. This method provides real-time monitoring of job progress and automatically handles network errors and retries.
Parameters
interval
int
✗
None
Polling interval in seconds between status checks. Default is configured by JOB_POLL_INTERVAL (typically 5-10 seconds).
timeout
int
✗
None
Maximum time in seconds to monitor the job before giving up. Default is configured by JOB_WAIT_TIMEOUT (typically 1800 seconds).
Yields
Job – Updated job instances with current status and progress.
Raises
TimeoutError – If the job doesn’t complete within the specified timeout.
AsyncJobFailed – If the job fails during execution (raised by wait() method). Return type: Iterator[Job]
Example
wait()
Wait for job completion with automatic progress logging.
Blocks execution until the job completes (successfully or with failure). Provides automatic progress logging and raises an exception if the job fails. This is the most convenient method for simple job completion waiting.
Parameters
interval
int
✗
None
Polling interval in seconds between status checks. Default is configured by JOB_POLL_INTERVAL (typically 5-10 seconds).
timeout
int
✗
None
Maximum time in seconds to wait for job completion. Default is configured by JOB_WAIT_TIMEOUT (typically 1800 seconds).
Raises
TimeoutError – If the job doesn’t complete within the specified timeout.
AsyncJobFailed – If the job fails during execution, includes error details. Return type: None
Example
Last updated
Was this helpful?