Closed candicehou07 closed 2 years ago
Hi, a few questions to troubleshoot this:
DEPLOYED_MODEL_NAME
variable?@aarondietz234 Can you take a look at this?
Hi, to answer the questions:
I have trained the model and uploaded the model to Vertex Models
(screenshot included)
I updated the DEPLOYED_MODEL_NAME as the deployed model name, "fraud-detection-model-v1"
Error Message:
_InactiveRpcError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/google/api_core/grpc_helpers.py in error_remappedcallable(*args, **kwargs) 65 try: ---> 66 return callable(*args, **kwargs) 67 except grpc.RpcError as exc:
/opt/conda/lib/python3.7/site-packages/grpc/_channel.py in call(self, request, timeout, metadata, credentials, wait_for_ready, compression) 945 wait_for_ready, compression) --> 946 return _end_unary_response_blocking(state, call, False, None) 947
/opt/conda/lib/python3.7/site-packages/grpc/_channel.py in _end_unary_response_blocking(state, call, with_call, deadline) 848 else: --> 849 raise _InactiveRpcError(state) 850
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "List of found errors: 1.Field: name; Message: Invalid Model resource name. " debug_error_string = "{"created":"@1636406161.921552593","description":"Error received from peer ipv4:142.250.128.95:443","file":"src/core/lib/surface/call.cc","file_line":1066,"grpc_message":"List of found errors:\t1.Field: name; Message: Invalid Model resource name.\t","grpc_status":3}"
The above exception was the direct cause of the following exception:
InvalidArgument Traceback (most recent call last)
/tmp/ipykernel_1/2157564676.py in
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/models.py in init(self, model_name, project, location, credentials) 1394 resource_name=model_name, 1395 ) -> 1396 self._gca_resource = self._get_gca_resource(resource_name=model_name) 1397 1398 # TODO(b/170979552) Add support for predict schemata
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/base.py in _get_gca_resource(self, resource_name) 531 ) 532 --> 533 return getattr(self.api_client, self._getter_method)(name=resource_name) 534 535 def _sync_gca_resource(self):
/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform_v1/services/model_service/client.py in get_model(self, request, name, retry, timeout, metadata) 589 590 # Send the request. --> 591 response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) 592 593 # Done; return the response.
/opt/conda/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py in call(self, timeout, retry, *args, *kwargs) 140 kwargs["metadata"] = metadata 141 --> 142 return wrapped_func(args, **kwargs) 143 144
/opt/conda/lib/python3.7/site-packages/google/api_core/grpc_helpers.py in error_remappedcallable(*args, **kwargs) 66 return callable(*args, **kwargs) 67 except grpc.RpcError as exc: ---> 68 raise exceptions.from_grpc_error(exc) from exc 69 70 return error_remapped_callable
InvalidArgument: 400 List of found errors: 1.Field: name; Message: Invalid Model resource name.
I tried to run with resource_name and it worked. I hope this helps with troubleshooting!
Expected Behavior
In the notebooks/community/managed_notebooks/fraud_detection/fraud-detection-model.ipynb we need to Instantiate the resources using the resource names.
model = aiplatform.Model(model_name=model.resource_name) endpoint = aiplatform.Endpoint(endpoint_name=endpoint.resource_name)
Actual Behavior
Failed to instantiate the resources using the displayed_names
Steps to Reproduce the Problem
Specifications