Build

class verta.endpoint.build.Build(conn, workspace, json)

An initiated docker build process of a deployable model.

Changed in version 0.23.0: Moved from verta.endpoint.Build to verta.endpoint.build.Build.

New in version 0.23.0: The date_created property.

New in version 0.24.1: The location, requires_root, scan_external, and self_contained properties.

Represents an initiated docker build process. A build can be complete or in progress. Completed builds may be successful or failed. End-users of this library should not need to instantiate this class directly, but instead may obtain Build objects from methods such as Endpoint.get_current_build() and RegisteredModelVersion.list_builds().

Note

Build objects do not currently fetch live information from the backend; new objects must be obtained from public client methods to get up-to-date build statuses.

Variables:
  • id (int) – Build ID.

  • date_created (timezone-aware datetime) – The date and time when this build was created.

  • status (str) – Status of the build (e.g. "building", "finished").

  • message (str) – Message or logs associated with this build.

  • is_complete (bool) – Whether the build is finished either successfully or with an error.

  • location (str or None) – (alpha) The location of the build. This is only available for completed or external builds.

  • requires_root (bool or None) – (alpha) Whether the build requires root access.

  • scan_external (bool or None) – (alpha) Whether the build should be scanned by an external provider.

  • self_contained (bool or None) – (alpha) Whether the build is self-contained.

get_scan() BuildScan

Get this build’s most recent scan.

New in version 0.23.0.

Returns:

BuildScan – Build scan.

set_message(message: str) None

Set the message or logs associated with this build.

New in version 0.24.1.

Parameters:

message (str) – Message or logs to associate with this build.

start_scan(external: bool) BuildScan

Start a new scan for this build. Internal scans are not yet supported. Use external=True parameter.

This function only starts a scan; it does not wait for the finished scan to return results. Use Build.get_scan() to view progress and results of the scan.

Parameters:

external (bool) – True if using an external scan provider.

Returns:

BuildScan – Build scan.