Result Types

WebhookModel

Represents a webhook within a project, detailing its configuration and status.

Applicable Functions

Attributes

WebhookModel(
    id='webhook_f7d8aec2-7e2b-4d2c-a103-c8dd575c29c7',
    object='webhook',
    project_id='proj_ca5fe71e7592bbcf7705ea36e4f29ed4',
    name='aws-lambda',
    endpoint='https://lambda-url.ap-southeast-1.on.aws/',
    retries=WebhookRetries(
        max_retries=3,
        max_retry_delay=15000
    ),
    create_date=1723633671620,
    update_date=1723736909980
)
NameTypeDescription
idstrThe webhook ID as a string.
objectstrObject type of the webhook.
project_idstrIdentifier of the project associated with the webhook.
namestrName of the webhook.
endpointstrURL endpoint of the webhook.
retriesWebhookRetriesRetry configuration for the webhook.
create_dateintCreation timestamp of the webhook, in milliseconds.
update_dateintLast updated timestamp of the webhook, in milliseconds.

WebhookRetries

Represents the retry configuration of a webhook.

Attributes

WebhookRetries(
    max_retries=3,
    max_retry_delay=15000
)
NameTypeDescription
max_retriesintMaximum number of retries to send prediction results to the specified endpoint. Defaults to 3.
max_retry_delayintMaximum delay time between retries (in milliseconds). Defaults to 15000.

WebhookTestResponse

Represents the response data of a webhook test to send a sample payload to a specified endpoint URL.

Applicable Functions

Attributes

WebhookTestResponse(
    status='Ok',
    response_code=204,
    latency_ms=648,
    attempt_count=1,
    body=None,
    reason=None
)
NameTypeDescription
statusstrStatus of the webhook test
response_codeintResponse code of the webhook test.
latency_msintLatency of the webhook test, in milliseconds.
attempt_countintNumber of attempts made to test the webhook for a successful response.
bodyOptional[str]Body of the webhook test response, if any.

Dataset

Represents a batch dataset within a project, detailing its configuration and status.

Applicable Functions

Attributes

Dataset(
    id='dataset_652ef566-af5c-4d52-b1e4-ec8ec6dc4b8e',
    object='dataset',
    name='my-dataset-08-19',
    project_id='proj_ca5fe71e7592bbcf7705ea36e4f29ed4',
    expiry_time=1724561116000,
    status=DatasetStatus(
        overview='Uploaded',
        message='Uploaded Dataset',
        update_time=1723697121735,
        source=DatasetSource(
            kind='UploadedNewlineDelimitedJsonFile',
            upload_url=DatasetUploadUrl(
                method='PUT',
                url='',
                headers=[
                    'content-length',
                    'x-goog-hash',
                    'x-goog-meta-datature-dataset-link',
                    'x-goog-if-generation-match',
                    'content-type'
                ],
                expires_at_time=1723740318174
            )
        ),
        item_count=50
    ),
    create_date=1723697118174,
    update_date=1723697121774
)
NameTypeDescription
idstrDataset ID as a string.
objectstrObject type of the dataset.
namestrName of the dataset.
project_idstrIdentifier of the project associated with the dataset.
expiry_timestrExpiry timestamp of the dataset, in milliseconds.
statusDatasetStatusStatus object of the dataset.
create_dateintCreation timestamp of the dataset, in milliseconds.
update_dateintLast updated timestamp of the dataset, in milliseconds.

DatasetStatus

Represents the item status statistics of a batch dataset.

Attributes

DatasetStatus(
    overview='Uploaded',
    message='Uploaded Dataset',
    update_time=1723697121735,
    source=DatasetSource(
        kind='UploadedNewlineDelimitedJsonFile',
    		upload_url=DatasetUploadUrl(
            method='PUT',
            url='',
            headers=[
                'content-length',
                'x-goog-hash',
                'x-goog-meta-datature-dataset-link',
                'x-goog-if-generation-match',
                'content-type'
            ],
      			expires_at_time=1723740318174
    		)
  	),
  	item_count=50
)

NameTypeDescription
overviewstrOverview of the dataset status.
messagestrStatus message providing additional information.
update_timeintTimestamp of the last update to the dataset status (in milliseconds).
sourceDatasetSourceDataset source. Used internally to automatically upload dataset SignedURL items into a GCS bucket.
item_countintTotal number of items in the dataset.

Job

Represents a batch job within a project, detailing its configuration and status.

Applicable Functions

Attributes

Job(
    id='batchjob_4e5566d0-6538-441a-9fa5-f3495516646a',
    object='batch_job',
    name='my-batch-job-08-15',
    project_id='proj_ca5fe71e7592bbcf7705ea36e4f29ed4',
    spec=JobSpec(
        start_at_time=1723734419985,
        stop_at_time=1723993619985,
        dataset_id='dataset_652ef566-af5c-4d52-b1e4-ec8ec6dc4b8e',
        result_delivery=ResultDelivery(
            destinations=[Webhook(
                webhook_id='webhook_ed981529-0160-4704-8794-e7702a8de470'
            )]
        ),
        deployment=ExistingDeployment(
            deployment_id='deploy_3286bd71-9a8b-42bb-8ba6-c07549b81367'
        ),
    ),
    status=JobStatus(
        overview='Waiting',
        message='Waiting',
        update_date=1723734509417,
        items=JobItemStatus(
            gathered=50,
            failed_gather=0,
            preprocessed=0,
            failed_process=0,
            predicted=0,
            failed_predict=0,
            delivered=0,
            failed_deliver=0
        ),
        reason=None
    ),
    create_date=1723734419985,
    update_date=1723734509434
)
NameTypeDescription
idstrBatch job ID as a string.
objectstrObject type of the batch job.
namestrName of the batch job.
project_idstrIdentifier of the project associated with the batch job.
specJobSpecConfiguration object of the batch job.
statusJobStatusStatus object of the batch job.
create_dateintCreation timestamp of the batch job, in milliseconds.

JobSpec

Represents the configuration of a batch job.

Attributes

JobSpec(
  	start_at_time=1723734419985,
    stop_at_time=1723993619985,
    dataset_id='dataset_652ef566-af5c-4d52-b1e4-ec8ec6dc4b8e',
    result_delivery=ResultDelivery(
      	destinations=[Webhook(
        		webhook_id='webhook_ed981529-0160-4704-8794-e7702a8de470'
      	)]
    ),
    deployment=ExistingDeployment(
      	deployment_id='deploy_3286bd71-9a8b-42bb-8ba6-c07549b81367'
    ),
)

NameTypeDescription
start_at_timeintStart timestamp of the job, in milliseconds.
stop_at_timeintStop timestamp of the job, in milliseconds.
dataset_idstrDataset ID associated with the batch job.
result_deliveryResultDeliveryResult delivery configuration for the batch job.
deploymentNewEphemeralDeployment | ExistingDeploymentDeployment configuration for the batch job.

ResultDelivery

Result delivery configuration for a batch job.

Attributes

ResultDelivery(
  	destinations=[Webhook(
    		webhook_id='webhook_ed981529-0160-4704-8794-e7702a8de470'
  	)]
)
NameTypeDescription
destinationsList[Webhook]List of result destinations. Currently only supports webhooks.

NewEphemeralDeployment

Represents the configuration of a new temporary deployment created for a batch job.

Attributes

NewEphemeralDeployment(
  	template=Deployment(
        id='deploy_1c144673-c757-40b4-8eeb-d400f0b9b2f9',
        name='My API',
        project_id='proj_cd067221d5a6e4007ccbb4afb5966535',
        artifact_id='artifact_65a7678a91afa7d22455c5ba',
        version_tag='v1.0.0',
        history_versions=[
            DeploymentHistoryVersion(
                version_tag='v1.0.0',
                artifact_id='artifact_65a7678a91afa7d22455c5ba',
                update_date=1705475663570
            )
    		],
        resources=DeploymentResources(
            cpu=4,
            ram=8192,
            GPU_T4=None
        ),
        scaling=DeploymentScaling(
            replicas=1,
            mode='FixedReplicaCount'
        ),
        status=DeploymentStatus(
            overview='Available',
            message='Created service successfully',
            update_data=1705475727032
        ),
        create_date=1705475663570,
        update_date=1705475727051,
        url='https://asia-inference.nip.io/1c144673-c757-40b4-8eeb-d400f0b9b2f9'
		)
)
NameTypeDescription
templateDeploymentDeployment configuration for the batch job.

ExistingDeployment

Represents the configuration of an existing deployment.

Attributes

ExistingDeployment(
  	deployment_id='deploy_3286bd71-9a8b-42bb-8ba6-c07549b81367'
)
NameTypeDescription
deployment_idstrID of the existing deployment. To retrieve more information on the deployment, run project.deployments.get(DEPLOYMENT_ID).

JobStatus

Represents the job-level and item-level status statistics of a batch job.

Attributes

JobStatus(
    overview='Waiting',
    message='Waiting',
    update_date=1723734509417,
    items=JobItemStatus(
        gathered=50,
        failed_gather=0,
        preprocessed=0,
        failed_process=0,
        predicted=0,
        failed_predict=0,
        delivered=0,
        failed_deliver=0
    ),
    reason=None
)
NameTypeDescription
overviewstrOverview of the batch job status.
messagestrStatus message providing additional information about the batch job.
update_dateintLast update timestamp of the job status, in milliseconds.
itemsJobItemStatusStatus object containing item-level statistics.
reasonOptional[str]Reason for the error in the job status, if any. Defaults to None.
cancelled_atOptional[int]Timestamp when the job was cancelled (in milliseconds), if any. Defaults to None.

JobItemStatus

Represents the item-level status statistic of a batch job.

Attributes

JobItemStatus(
    gathered=50,
    failed_gather=0,
    preprocessed=0,
    failed_process=0,
    predicted=0,
    failed_predict=0,
    delivered=0,
    failed_deliver=0
)
NameTypeDescription
gatheredintNumber of dataset items that have successfully been retrieved and downloaded.
failed_gatherintNumber of dataset items that have failed to be retrieved and downloaded.
preprocessedintNumber of dataset items that have successfully been processed.
failed_processintNumber of dataset items that have failed to be processed.
predictedintNumber of dataset items that the deployed model has successfully run predictions on.
failed_predictintNumber of dataset items that the deployed model has failed to run predictions on.
deliveredintNumber of dataset items where the prediction results have successfully been delivered to the webhook endpoint URL.
failed_deliverintNumber of dataset items where the prediction results have failed to be delivered to the webhook endpoint URL.

JobLogs

Represnts the log entries of a batch job.

Applicable Functions

Attributes

JobLogs(
    id='batchjoblog_3d561cfa-9a53-4eb3-81c1-4193ae27f4fc',
    object='batch_job_log',
    project_id='proj_ca5fe71e7592bbcf7705ea36e4f29ed4',
    entries=[
        JobLogEntry(
            kind='ItemPredicted',
            create_time=1723080300011,
            id='1e0ad7896a4aa2dd47eda727',
            level='Info',
            item='https://my-endpoint.url/blood_cell/36.jpg',
            status='Delivered',
            time_ms=9819.226,
            reason=''
        )
    ]
)
NameTypeDescription
idstrBatch job ID as a string.
objectstrObject type of the batch job.
project_idstrIdentifier of the project associated with the batch job.
entriesList[JobLogEntry]List of log entries for the batch job.

JobLogEntry

Represents a single log entry of a batch job.

Attributes

JobLogEntry(
    kind='ItemPredicted',
    create_time=1723080300011,
    id='1e0ad7896a4aa2dd47eda727',
    level='Info',
    item='https://my-endpoint.url/blood_cell/36.jpg',
    status='Delivered',
    time_ms=9819.226,
    reason=''
)
NameTypeDescription
kindstrType of log entry.
create_timeintCreation timestamp of the log entry, in milliseconds.
idstrLog entry ID.
levelstrSeverity level of the log entry.
itemstrDataset item associated with the log entry.
statusstrStatus of the log entry.
time_msintTime taken for the event described by the log entry, in milliseconds.
reasonOptional[str]Reason for the error in the log entry, if any. Defaults to None.