Get Evaluation Job Status#
To get the status of an evaluation job, send a GET request to the jobs endpoint, as shown in the following code.
Important
v2 API Change: In v2, job status information is consolidated into the main job details endpoint and more information is available with the /status endpoint (/status-details has been removed). For v2 usage, refer to Get Job Details instead.
v2 API - Status via Job Details#
In the v2 API, status information is included directly in the job details response. This eliminates the need for separate status API calls.
# v2 approach - single call gets all status information
job = client.v2.evaluation.jobs.retrieve("job-id")
print(f"Status: {job.status}")
print(f"Status details: {job.status_details}")
print(f"Error details: {job.error_details}")
# Progress information is included in status_details
if job.status_details and 'progress' in job.status_details:
print(f"Progress: {job.status_details['progress']}")
print(f"Samples processed: {job.status_details['samples_processed']}")
For complete v2 examples, refer to Get Job Details.
Job Status Values#
Status |
Description |
|---|---|
|
The job is created, but not yet scheduled. |
|
The job is waiting for resource allocation. |
|
The job is currently running. |
|
The job has completed successfully. |
|
The job has been cancelled by the user. |
|
The job failed to run and terminated. |
Progress Information#
The status response includes progress tracking information:
Field |
Description |
|---|---|
|
Completion percentage (0.0-100.0) when |
|
Number of dataset samples that have been processed during the evaluation. |
|
Status of individual evaluation tasks. Each task can be |
Progress Calculation#
Progress percentage is only calculated when you set the limit_samples parameter in your evaluation configuration. This allows the system to calculate completion as samples_processed / limit_samples * 100.
v1 API - Get Job Status#
Note
The following examples are for the v1 API only. In v2, this functionality is consolidated into the job details endpoint.
Choose one of the following options to get evaluation job status.
import os
from nemo_microservices import NeMoMicroservices
# Initialize the client
client = NeMoMicroservices(
base_url=os.environ['EVALUATOR_BASE_URL']
)
# Get job status details (v1 API)
status_response = client.evaluation.jobs.status("job-id")
# Get the status details
print(f"Message: {status_response.message}")
print(f"Progress: {status_response.progress}")
print(f"Samples Processed: {status_response.samples_processed}")
curl -X "GET" "${EVALUATOR_BASE_URL}/v1/evaluation/jobs/<job-id>/status" \
-H 'accept: application/json'
Example Response
{
"message": "Job is running",
"task_status": {
"question-answering": "running"
},
"progress": 42.5,
"samples_processed": 85
}