plexus.dashboard.api.models.batch_job module
- class plexus.dashboard.api.models.batch_job.BatchJob(id: str, accountId: str, status: str, type: str, batchId: str, modelProvider: str, modelName: str, scoringJobCountCache: int | None = None, startedAt: datetime | None = None, estimatedEndAt: datetime | None = None, completedAt: datetime | None = None, totalRequests: int | None = None, completedRequests: int | None = None, failedRequests: int | None = None, errorMessage: str | None = None, errorDetails: Dict | None = None, scorecardId: str | None = None, scoreId: str | None = None, client: _BaseAPIClient | None = None)
Bases:
BaseModelRepresents a batch processing job for scoring multiple items.
A BatchJob manages the execution of scoring operations across multiple items, tracking progress, handling errors, and maintaining state throughout the batch processing lifecycle.
- Parameters:
accountId – Identifier for the account owning this batch job
status – Current status of the batch job (PENDING, RUNNING, etc.)
type – Type of batch operation being performed
batchId – Unique identifier for this batch of operations
modelProvider – Provider of the model being used
modelName – Name of the model being used
scoringJobCountCache – Number of scoring jobs in this batch
startedAt – Timestamp when the batch job started
estimatedEndAt – Estimated completion timestamp
completedAt – Timestamp when the batch job completed
totalRequests – Total number of requests in this batch
completedRequests – Number of completed requests
failedRequests – Number of failed requests
errorMessage – Error message if the batch job failed
errorDetails – Detailed error information
scorecardId – Associated scorecard identifier
scoreId – Associated score identifier
- __init__(id: str, accountId: str, status: str, type: str, batchId: str, modelProvider: str, modelName: str, scoringJobCountCache: int | None = None, startedAt: datetime | None = None, estimatedEndAt: datetime | None = None, completedAt: datetime | None = None, totalRequests: int | None = None, completedRequests: int | None = None, failedRequests: int | None = None, errorMessage: str | None = None, errorDetails: Dict | None = None, scorecardId: str | None = None, scoreId: str | None = None, client: _BaseAPIClient | None = None)
- accountId: str
- batchId: str
- completedAt: datetime | None = None
- completedRequests: int | None = None
- classmethod create(client: _BaseAPIClient, accountId: str, type: str, modelProvider: str, modelName: str, parameters: Dict, **kwargs) BatchJob
Creates a new batch job.
- Parameters:
client – API client instance for making requests
accountId – Account identifier for the batch job
type – Type of batch operation
modelProvider – Provider of the model
modelName – Name of the model
parameters – Additional parameters for job creation
kwargs – Optional parameters (status, scorecardId, etc.)
- Returns:
New BatchJob instance
- Raises:
Exception if creation fails
- errorDetails: Dict | None = None
- errorMessage: str | None = None
- estimatedEndAt: datetime | None = None
- failedRequests: int | None = None
- classmethod fields() str
Return the GraphQL fields to query for this model
- classmethod from_dict(data: Dict[str, Any], client: _BaseAPIClient) BatchJob
Creates a BatchJob instance from dictionary data.
- Parameters:
data – Dictionary containing batch job data
client – API client instance
- Returns:
BatchJob instance
- classmethod get_by_id(id: str, client: _BaseAPIClient) BatchJob
Retrieves a batch job by its identifier.
- Parameters:
id – Batch job identifier
client – API client instance
- Returns:
BatchJob instance
- Raises:
Exception if batch job not found
- modelName: str
- modelProvider: str
- scoreId: str | None = None
- scorecardId: str | None = None
- scoringJobCountCache: int | None = None
- startedAt: datetime | None = None
- status: str
- totalRequests: int | None = None
- type: str