chariot.bulk_inference package

Submodules

chariot.bulk_inference.job module

chariot.bulk_inference.job.create_bulk_inference_job(job_spec: NewBulkInferenceJobRequest) str | None[source]

Create a bulk inference job.

Parameters:

job_spec (models.NewBulkInferenceJobRequest) – The bulk inference job specification.

Returns:

The bulk inference job id.

Return type:

Optional[str]

chariot.bulk_inference.job.get_bulk_inference_job(job_id: str) BulkInferenceJob | None[source]

Get a bulk inference job.

Parameters:

job_id (str) – The bulk inference job id.

Returns:

The bulk inference job.

Return type:

Optional[BulkInferenceJob]

chariot.bulk_inference.job.get_bulk_inference_jobs(model_id: str, dataset_version_id: str | None = None, dataset_snapshot_id: str | None = None, dataset_version_split: str | None = None, inference_method: str | None = None, limit: int | None = None, offset: int | None = None) list[BulkInferenceJob][source]

Get bulk inference jobs.

Parameters:
  • model_id (str) – The model id.

  • dataset_version_id (Optional[str]) – Optional dataset version ID. Defaults to None.

  • dataset_snapshot_id (Optional[str]) – Optional dataset snapshot ID. Defaults to None.

  • dataset_version_split (Optional[str]) – Optional dataset snapshot split. Defaults to None.

  • inference_method (Optional[str]) – Optional model inference method. Defaults to None.

  • limit (Optional[int]) – Optional pagination limit. Defaults to None.

  • offset (Optional[int]) – Optional pagination offset. Defaults to None.

Returns:

.

Return type:

List[BulkInferenceJob]

chariot.bulk_inference.models module

class chariot.bulk_inference.models.BulkInferenceJob(*, execution_id: str, execution_status: str, num_computed: int | None = None, expected_total: int | None = None)[source]

Bases: BaseModel

execution_id: str
execution_status: str
expected_total: int | None
property job_id
property job_status: ProgressState
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

num_computed: int | None
class chariot.bulk_inference.models.NewBulkInferenceJobRequest(*, model_project_id: str, model_id: str, dataset_project_id: str, dataset_id: str, dataset_snapshot_id: str, dataset_snapshot_split: str, inference_method: str = '', evaluate_metrics: bool = False, batch_size: int = 1)[source]

Bases: BaseModel

batch_size: int
dataset_id: str
dataset_project_id: str
dataset_snapshot_id: str
dataset_snapshot_split: str
evaluate_metrics: bool
inference_method: str
model_config: ClassVar[ConfigDict] = {'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_id: str
model_project_id: str
class chariot.bulk_inference.models.ProgressState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

ABORTED = 'aborted'
FAILED = 'failed'
INITIALIZED = 'initialized'
IN_PROGRESS = 'in_progress'
RUNNING = 'running'
RUNNING_FAILED = 'running_failed'
SUCCEEDED = 'succeeded'

Module contents