Hi! Im trying to create a Google Cloud TPU node using TPU client API and I cannot figure out the parent resource name of a TPU node in Google Cloud.I tried all the possible combinations, for example:
And I always get the same error (google.api_core.exceptions.InvalidArgument: 400 Malformed name) :
Traceback (most recent call last):
File "C:\Users\Smarthank\anaconda3\lib\site-packages\google\api_core\grpc_helpers.py", line 67, in error_remapped_callable
return callable_(*args, **kwargs)
File "C:\Users\Smarthank\anaconda3\lib\site-packages\grpc\_channel.py", line 923, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "C:\Users\Smarthank\anaconda3\lib\site-packages\grpc\_channel.py", line 826, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Malformed name: 'projects/my-project-id/locations/europe-west4-a/nodes/'"
debug_error_string = "{"created":"@1645878700.379000000","description":"Error received from peer ipv4:142.250.179.170:443","file":"src/core/lib/surface/call.cc","file_line":1068,"grpc_message":"Malformed name: 'projects/my-project-id/locations/europe-west4-a/nodes/'","grpc_status":3}"
Below you can find the full code I'm using to create the node. Im using Python 3.8, google-cloud-tpu v1.2.1, on a Conda virtualenv.
from google.cloud import tpu_v2alpha1 def sample_create_node(): # Create a client client = tpu_v2alpha1.TpuClient() # Initialize request argument(s) node = tpu_v2alpha1.Node() node.accelerator_type = "accelerator_type_value" node.runtime_version = "runtime_version_value" request = tpu_v2alpha1.CreateNodeRequest( parent="parent_value", node=node, ) # Make the request operation = client.create_node(request=request) print("Waiting for operation to complete...") response = operation.result() # Handle the response print(response)
Any help would be much apprecciated!