As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Tpu v1 API

class google.cloud.tpu_v1.types.AcceleratorType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A accelerator type that a Node can be configured with.

name

The resource name.

Type

str

type_

the accelerator type.

Type

str

class google.cloud.tpu_v1.types.CreateNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [CreateNode][google.cloud.tpu.v1.Tpu.CreateNode].

parent

Required. The parent resource name.

Type

str

node_id

The unqualified resource name.

Type

str

node

Required. The node.

Type

google.cloud.tpu_v1.types.Node

class google.cloud.tpu_v1.types.DeleteNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [DeleteNode][google.cloud.tpu.v1.Tpu.DeleteNode].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v1.types.GetAcceleratorTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetAcceleratorType][google.cloud.tpu.v1.Tpu.GetAcceleratorType].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v1.types.GetNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetNode][google.cloud.tpu.v1.Tpu.GetNode].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v1.types.GetTensorFlowVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [GetTensorFlowVersion][google.cloud.tpu.v1.Tpu.GetTensorFlowVersion].

name

Required. The resource name.

Type

str

class google.cloud.tpu_v1.types.ListAcceleratorTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

filter

List filter.

Type

str

order_by

Sort results.

Type

str

class google.cloud.tpu_v1.types.ListAcceleratorTypesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListAcceleratorTypes][google.cloud.tpu.v1.Tpu.ListAcceleratorTypes].

accelerator_types

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v1.types.AcceleratorType]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v1.types.ListNodesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

class google.cloud.tpu_v1.types.ListNodesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListNodes][google.cloud.tpu.v1.Tpu.ListNodes].

nodes

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v1.types.Node]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v1.types.ListTensorFlowVersionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].

parent

Required. The parent resource name.

Type

str

page_size

The maximum number of items to return.

Type

int

page_token

The next_page_token value returned from a previous List request, if any.

Type

str

filter

List filter.

Type

str

order_by

Sort results.

Type

str

class google.cloud.tpu_v1.types.ListTensorFlowVersionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for [ListTensorFlowVersions][google.cloud.tpu.v1.Tpu.ListTensorFlowVersions].

tensorflow_versions

The listed nodes.

Type

MutableSequence[google.cloud.tpu_v1.types.TensorFlowVersion]

next_page_token

The next page token or empty if none.

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.tpu_v1.types.NetworkEndpoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A network endpoint over which a TPU worker can be reached.

ip_address

The IP address of this network endpoint.

Type

str

port

The port of this network endpoint.

Type

int

class google.cloud.tpu_v1.types.Node(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A TPU instance.

name

Output only. Immutable. The name of the TPU

Type

str

description

The user-supplied description of the TPU. Maximum of 512 characters.

Type

str

accelerator_type

Required. The type of hardware accelerators associated with this node.

Type

str

ip_address

Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances.

Type

str

port

Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances.

Type

str

state

Output only. The current state for the TPU Node.

Type

google.cloud.tpu_v1.types.Node.State

health_description

Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.

Type

str

tensorflow_version

Required. The version of Tensorflow running in the Node.

Type

str

network

The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, “default” will be used.

Type

str

cidr_block

The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user’s provided network, or the provided network is peered with another network that is using that CIDR block.

Type

str

service_account

Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.

Type

str

create_time

Output only. The time when the node was created.

Type

google.protobuf.timestamp_pb2.Timestamp

scheduling_config

The scheduling options for this node.

Type

google.cloud.tpu_v1.types.SchedulingConfig

network_endpoints

Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first.

Type

MutableSequence[google.cloud.tpu_v1.types.NetworkEndpoint]

health

The health status of the TPU node.

Type

google.cloud.tpu_v1.types.Node.Health

labels

Resource labels to represent user-provided metadata.

Type

MutableMapping[str, str]

use_service_networking

Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.

Type

bool

api_version

Output only. The API version that created this Node.

Type

google.cloud.tpu_v1.types.Node.ApiVersion

symptoms

Output only. The Symptoms that have occurred to the TPU Node.

Type

MutableSequence[google.cloud.tpu_v1.types.Symptom]

class ApiVersion(value)[source]

Bases: proto.enums.Enum

TPU API Version.

Values:
API_VERSION_UNSPECIFIED (0):

API version is unknown.

V1_ALPHA1 (1):

TPU API V1Alpha1 version.

V1 (2):

TPU API V1 version.

V2_ALPHA1 (3):

TPU API V2Alpha1 version.

class Health(value)[source]

Bases: proto.enums.Enum

Health defines the status of a TPU node as reported by Health Monitor.

Values:
HEALTH_UNSPECIFIED (0):

Health status is unknown: not initialized or failed to retrieve.

HEALTHY (1):

The resource is healthy.

DEPRECATED_UNHEALTHY (2):

The resource is unhealthy.

TIMEOUT (3):

The resource is unresponsive.

UNHEALTHY_TENSORFLOW (4):

The in-guest ML stack is unhealthy.

UNHEALTHY_MAINTENANCE (5):

The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class State(value)[source]

Bases: proto.enums.Enum

Represents the different states of a TPU node during its lifecycle.

Values:
STATE_UNSPECIFIED (0):

TPU node state is not known/set.

CREATING (1):

TPU node is being created.

READY (2):

TPU node has been created.

RESTARTING (3):

TPU node is restarting.

REIMAGING (4):

TPU node is undergoing reimaging.

DELETING (5):

TPU node is being deleted.

REPAIRING (6):

TPU node is being repaired and may be unusable. Details can be found in the help_description field.

STOPPED (8):

TPU node is stopped.

STOPPING (9):

TPU node is currently stopping.

STARTING (10):

TPU node is currently starting.

PREEMPTED (11):

TPU node has been preempted. Only applies to Preemptible TPU Nodes.

TERMINATED (12):

TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).

HIDING (13):

TPU node is currently hiding.

HIDDEN (14):

TPU node has been hidden.

UNHIDING (15):

TPU node is currently unhiding.

class google.cloud.tpu_v1.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata describing an [Operation][google.longrunning.Operation]

create_time

The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

target

Target of the operation - for example projects/project-1/connectivityTests/test-1

Type

str

verb

Name of the verb executed by the operation.

Type

str

status_detail

Human-readable status of the operation, if any.

Type

str

cancel_requested

Specifies if cancellation was requested for the operation.

Type

bool

api_version

API version.

Type

str

class google.cloud.tpu_v1.types.ReimageNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [ReimageNode][google.cloud.tpu.v1.Tpu.ReimageNode].

name

The resource name.

Type

str

tensorflow_version

The version for reimage to create.

Type

str

class google.cloud.tpu_v1.types.SchedulingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Sets the scheduling options for this node.

preemptible

Defines whether the node is preemptible.

Type

bool

reserved

Whether the node is created under a reservation.

Type

bool

class google.cloud.tpu_v1.types.StartNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [StartNode][google.cloud.tpu.v1.Tpu.StartNode].

name

The resource name.

Type

str

class google.cloud.tpu_v1.types.StopNodeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for [StopNode][google.cloud.tpu.v1.Tpu.StopNode].

name

The resource name.

Type

str

class google.cloud.tpu_v1.types.Symptom(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Symptom instance.

create_time

Timestamp when the Symptom is created.

Type

google.protobuf.timestamp_pb2.Timestamp

symptom_type

Type of the Symptom.

Type

google.cloud.tpu_v1.types.Symptom.SymptomType

details

Detailed information of the current Symptom.

Type

str

worker_id

A string used to uniquely distinguish a worker within a TPU node.

Type

str

class SymptomType(value)[source]

Bases: proto.enums.Enum

SymptomType represents the different types of Symptoms that a TPU can be at.

Values:
SYMPTOM_TYPE_UNSPECIFIED (0):

Unspecified symptom.

LOW_MEMORY (1):

TPU VM memory is low.

OUT_OF_MEMORY (2):

TPU runtime is out of memory.

EXECUTE_TIMED_OUT (3):

TPU runtime execution has timed out.

MESH_BUILD_FAIL (4):

TPU runtime fails to construct a mesh that recognizes each TPU device’s neighbors.

HBM_OUT_OF_MEMORY (5):

TPU HBM is out of memory.

PROJECT_ABUSE (6):

Abusive behaviors have been identified on the current project.

class google.cloud.tpu_v1.types.TensorFlowVersion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A tensorflow version that a Node can be configured with.

name

The resource name.

Type

str

version

the tensorflow version.

Type

str