Models

CUConsumptionInfo

class puddle.client.models.CUConsumptionInfo(cu_consumption_info)

Bases: object

Holds information about the current CU consumption in the whole Puddle instance.

__init__(cu_consumption_info)

Creates a new instance of CUConsumptionInfo.

Parameters

cu_consumption_info (GetCUConsumptionInfoResponse) – puddle.client.proto.v2.system_service_pb2.GetCUConsumptionInfoResponse response from the backend.

property available_cu
Return type

int

Returns

Number of CU still available.

property consumed_cu
Return type

int

Returns

Number of CU currently consumed by all users.

property systems_consumption_info
Return type

Optional[List[SystemConsumptionInfo]]

Returns

List of SystemConsumptionInfo objects, which hold information about systems of current user that are consuming CU.

DriverlessAIModel

class puddle.client.models.DriverlessAIModel(model)

Bases: object

Represents an experiment in DriverlessAI.

__init__(model)

Creates new DriverlessAIModel which represents an experiment in DriverlessAI.

Parameters

model (DAIModel) – puddle.client.proto.v2.system_service_pb2.DAIModel returned from backend.

property accuracy
Return type

int

Returns

Accuracy set for this experiment.

property created
Return type

int

Returns

Unix timestamp when this experiment was created.

property dataset
Return type

str

Returns

Name of the dataset used for this experiment.

property description
Return type

str

Returns

Description of this experiment.

property id
Return type

str

Returns

Id of this experiment.

property interpretability
Return type

int

Returns

Interpretability set for this experiment.

property progress
Return type

float

Returns

Progress of this experiment.

property score
Return type

float

Returns

Score for this experiment.

property scorer
Return type

str

Returns

Name of the scorer used for this experiment.

property status
Return type

float

Returns

Status code for this experiment.

property target
Return type

str

Returns

Target or response column set for this experiment.

property test_score
Return type

float

Returns

Test score for this experiment.

property time
Return type

int

Returns

Time set for this experiment.

property training_duration
Return type

float

Returns

Training duration in seconds of this experiment.

property updated
Return type

int

Returns

Unix timestamp when this experiment was updated.

Image

class puddle.client.models.Image(image)

Bases: object

Represents an Image in Puddle. Image contains a product of certain version and is used to provision new systems.

__init__(image)

Creates a new instance of Image.

Parameters

image (Image) – puddle.client.proto.v2.image_service_pb2.Image returned from backend.

property id
Return type

str

Returns

Id of this image.

property product
Return type

str

Returns

Product which is present in this image. For example dai.

property version
Return type

str

Returns

Version of product in this image. For example 1.7.0.

InstanceType

class puddle.client.models.InstanceType(instance_type)

Bases: object

Represents instance type specification.

__init__(instance_type)

Creates a new InstanceType.

Parameters

instance_type (InstanceType) – puddle.client.proto.v2.instance_type_service_pb2.InstanceType returned from backend.

property gpu
Return type

bool

Returns

True if this instance type has GPU, False otherwise.

property id
Return type

str

Returns

Id of this instance type.

property price
Return type

float

Returns

Price per hour for this instance type, while it’s in started state.

property text
Return type

str

Returns

Human readable text/name/label of this instance type.

System

class puddle.client.models.System(system, models)

Bases: object

Represents System in Puddle.

CONFIG_TOML_STATUS_FAILED = <puddle.client.models.system.System.ConfigTomlStatus object>

Status used when config.toml upload failed for any reason.

CONFIG_TOML_STATUS_OK = <puddle.client.models.system.System.ConfigTomlStatus object>

Status used when config.toml has not been changed since last start.

CONFIG_TOML_STATUS_UNKNOWN = <puddle.client.models.system.System.ConfigTomlStatus object>

Status used when status of config.toml upload is not known.

CONFIG_TOML_STATUS_UPLOADED = <puddle.client.models.system.System.ConfigTomlStatus object>

Status used when config.toml was uploaded, but the system has not been restarted yet.

CONFIG_TOML_STATUS_UPLOADING = <puddle.client.models.system.System.ConfigTomlStatus object>

Status used when config.toml is being uploaded.

class ConfigTomlStatus(code, text)

Bases: puddle.client.models.base_status.BaseStatus

Represents state of config.toml update process.

__init__(code, text)

Creates new BaseStatus.

Parameters
  • code (int) – Code of this status.

  • text (str) – Human readable text/description of this status.

property code
Return type

int

Returns

Code of this status.

property text
Return type

str

Returns

Human readable text/description of this status.

PRODUCT_STATUS_READY = <puddle.client.models.system.System.ProductStatus object>

Status used when a product is up and running.

PRODUCT_STATUS_UNKNOWN = <puddle.client.models.system.System.ProductStatus object>

Status used when the state of the product is not known.

PRODUCT_STATUS_VM_UNAVAILABLE = <puddle.client.models.system.System.ProductStatus object>

Status used when the VM is not available, for example because it is deallocated.

PRODUCT_STATUS_WAITING_FOR_PRODUCT = <puddle.client.models.system.System.ProductStatus object>

Status used when waiting for a product to become ready.

PRODUCT_STATUS_WAITING_FOR_VM = <puddle.client.models.system.System.ProductStatus object>

Status used when the VM is not yet available, because it is for example still starting.

class ProductStatus(code, text)

Bases: puddle.client.models.base_status.BaseStatus

Represents status of a product.

__init__(code, text)

Creates new BaseStatus.

Parameters
  • code (int) – Code of this status.

  • text (str) – Human readable text/description of this status.

property code
Return type

int

Returns

Code of this status.

property text
Return type

str

Returns

Human readable text/description of this status.

SYSTEM_STATUS_FAILED = <puddle.client.models.system.System.Status object>

Status used when a system fails for any reason.

SYSTEM_STATUS_FAILING = <puddle.client.models.system.System.Status object>

Status used when a system is about to enter failed state, but there are still some tasks that must be finished before doing so.

SYSTEM_STATUS_INITIALIZING = <puddle.client.models.system.System.Status object>

Status used when a system is initializing for the first time.

SYSTEM_STATUS_REBOOTING = <puddle.client.models.system.System.Status object>

Status used when a system is rebooting.

SYSTEM_STATUS_STARTED = <puddle.client.models.system.System.Status object>

Status used when a system is up and ready.

SYSTEM_STATUS_STARTING = <puddle.client.models.system.System.Status object>

Status used when a previously stopped system is starting.

SYSTEM_STATUS_STOPPED = <puddle.client.models.system.System.Status object>

Status used when a system is stopped/deallocated.

SYSTEM_STATUS_STOPPING = <puddle.client.models.system.System.Status object>

Status used when stopping/deallocating a system.

SYSTEM_STATUS_TERMINATED = <puddle.client.models.system.System.Status object>

Status used when a system was terminated.

SYSTEM_STATUS_TERMINATING = <puddle.client.models.system.System.Status object>

Status used when a system is terminating.

SYSTEM_STATUS_UNKNOWN = <puddle.client.models.system.System.Status object>

Status used when the status of a system is not known.

class Status(code, text)

Bases: puddle.client.models.base_status.BaseStatus

Represents status of a system.

__init__(code, text)

Creates new BaseStatus.

Parameters
  • code (int) – Code of this status.

  • text (str) – Human readable text/description of this status.

property code
Return type

int

Returns

Code of this status.

property text
Return type

str

Returns

Human readable text/description of this status.

VM_STATUS_DEALLOCATED = <puddle.client.models.system.System.VmStatus object>

Status used when the VM is deallocated.

VM_STATUS_DEALLOCATING = <puddle.client.models.system.System.VmStatus object>

Status used when the VM is being deallocated.

VM_STATUS_INVALID_VALUE_FROM_BACKEND = <puddle.client.models.system.System.VmStatus object>

Status used when the backend returns value unknown for Python client.

VM_STATUS_PROVISIONING = <puddle.client.models.system.System.VmStatus object>

Status used when the VM is being provisioned.

VM_STATUS_RUNNING = <puddle.client.models.system.System.VmStatus object>

Status used when when the VM is up and running.

VM_STATUS_STARTING = <puddle.client.models.system.System.VmStatus object>

Status used when the VM previously deallocated VM is being started.

VM_STATUS_TERMINATED = <puddle.client.models.system.System.VmStatus object>

Status used when the VM has been terminated.

VM_STATUS_TERMINATING = <puddle.client.models.system.System.VmStatus object>

Status used when the VM is being terminated.

VM_STATUS_UNKNOWN = <puddle.client.models.system.System.VmStatus object>

Status used when the state of the VM is not known.

VM_STATUS_WAITING = <puddle.client.models.system.System.VmStatus object>

Status used when waiting for the provision to start.

class VmStatus(code, text)

Bases: puddle.client.models.base_status.BaseStatus

Represents status of a virtual machine.

__init__(code, text)

Creates new BaseStatus.

Parameters
  • code (int) – Code of this status.

  • text (str) – Human readable text/description of this status.

property code
Return type

int

Returns

Code of this status.

property text
Return type

str

Returns

Human readable text/description of this status.

__init__(system, models)

Creates new System.

Parameters
  • system (System) – puddle.client.proto.v2.system_service_pb2.System object returned from backend.

  • models (Optional[List[DAIModel]]) – List of puddle.client.proto.v2.system_service_pb2.DAIModel returned from backend.

property can_fail
Returns

True if this system can be manually marked as failed. False otherwise.

property can_launch
Return type

bool

Returns

True if this system can be started, False otherwise.

property cloud
Return type

str

Returns

Cloud identifier of cloud provider used by this system. The same as CloudProvider.id. For example azure.

property cloud_id
Return type

str

Returns

Identifier of this system in the cloud.

property config_toml
Return type

str

Returns

config.toml content. This is refreshed with every start of the system.

property config_toml_status
Return type

int

Returns

Status of config.toml update.

property config_toml_status_text
Return type

str

Returns

Human readable config.toml status.

property created
Return type

int

Returns

Unix timestamp when this system was created.

property current_session_cost
Return type

float

Returns

Cost of the current session.

property default_url
Return type

str

Returns

URL which should be used to connect to the system.

property disk_size_gb
Return type

int

Returns

Size of disk in GB.

property gpu
Return type

bool

Returns

True if this system has GPU, False otherwise.

property id
Return type

str

Returns

Id of this system.

property idle_timeout
Return type

int

Returns

Unix timestamp. System will be automatically stopped if idle till this time.

property idle_timeout_interval
Return type

int

Returns

Number of minutes. If the system is idle for this number of minutes, it will be automatically stopped.

property in_transition
Return type

bool

Returns

True if this system is transition, False otherwise. System is in transition, if it is nor started, nor stopped nor terminated nor failed.

property instance_type
Return type

str

Returns

Name of the instance type used by this system.

property ip_address
Return type

str

Returns

Default IP address of this system. Based on the backend configuration this might be private or public IP address.

property models
Return type

Optional[List[DriverlessAIModel]]

Returns

List of DriverlessAIModel objects in this system. Empty for H2O-3 systems.

property name
Return type

str

Returns

Name of this system.

property password
Return type

str

Returns

DriverlessAI password for this system.

property previous_sessions_cost
Return type

float

Returns

Cumulative cost of all previous sessions of this system.

property private_ip
Return type

str

Returns

Private IP address of this system.

property product
Return type

str

Returns

Product in this system.

property product_status
Return type

int

Returns

Product status code of this system.

property product_status_text
Return type

str

Returns

Human readable product status.

property provisioned
Return type

bool

Returns

True if this system was provisioned successfully, False otherwise.

property public_ip
Return type

str

Returns

Public IP address of this system.

property status
Return type

int

Returns

Status code of this system.

property status_text
Return type

str

Returns

Human readable status of this system.

property updated
Return type

int

Returns

Unix timestamp when this system was updated.

property username
Return type

str

Returns

DriverlessAI username for this system.

property version
Return type

str

Returns

Version of product in this system.

property vm_status
Return type

int

Returns

Status of the VM.

property vm_status_text
Return type

str

Returns

Human readable status of the VM.

SystemConsumptionInfo

class puddle.client.models.SystemConsumptionInfo(system_consumption_info)

Bases: object

Holds data about system which is currently consuming CU.

__init__(system_consumption_info)

Creates new instance of SystemConsumptionInfo.

Parameters

system_consumption_info (SystemConsumptionInfo) – puddle.client.proto.v2.system_service_pb2.SystemConsumptionInfo object returned from backend.

property cu
Return type

int

Returns

Number of consumed CU.

property system_id
Return type

str

Returns

Id of the system.

property system_name
Return type

str

Returns

Name of the system.

Tag

class puddle.client.models.Tag(tag)

Bases: object

Represents tag which is used to tag all cloud provisioned resources.

TAG_STATUS_DELETED = <puddle.client.models.tag.Tag.TagStatus object>

Status used when this tag is disabled/deleted. Should not be returned from the backend.

TAG_STATUS_OK = <puddle.client.models.tag.Tag.TagStatus object>

Status used when this tag is enabled.

TAG_STATUS_UNKNOWN = <puddle.client.models.tag.Tag.TagStatus object>

Status used when status of this tag is not known.

class TagStatus(code, text)

Bases: puddle.client.models.base_status.BaseStatus

Represents tag status.

__init__(code, text)

Creates new BaseStatus.

Parameters
  • code (int) – Code of this status.

  • text (str) – Human readable text/description of this status.

property code
Return type

int

Returns

Code of this status.

property text
Return type

str

Returns

Human readable text/description of this status.

__init__(tag)

Creates new Tag.

Parameters

tag (Tag) – puddle.client.proto.v2.tag_service_pb2.Tag returned from backend.

property created
Return type

int

Returns

Unix timestamp when this tag was created.

property default_value
Return type

str

Returns

Default value associated with this tag.

property id
Return type

str

Returns

Id of this tag.

property input_type
Return type

str

Returns

Input type of this tag, for example number or text.

property label
Return type

str

Returns

Human readable label of this tag.

property required
Return type

bool

Returns

True if this tag is required, False otherwise.

property status
Return type

int

Returns

Status code of this tag.

property status_text
Return type

str

Returns

Human readable status of this tag.

property updated
Return type

int

Returns

Unix timestamp when this tag was updated.

TagData

class puddle.client.models.TagData(label, value)

Bases: object

Represents tag values filled in when creating new system.

__init__(label, value)

Creates a new TagData.

Parameters
  • label (str) – Label of the tag.

  • value (str) – Value of the tag.

property label
Return type

str

Returns

Label of the tag.

property value
Return type

str

Returns

Value used for this tag.