Code Monkey home page Code Monkey logo

Comments (3)

kweinmeister avatar kweinmeister commented on May 28, 2024

Hi, a few questions to troubleshoot this:

  • Can you confirm that you've successfully trained a model in the previous steps?
  • Also you've updated the DEPLOYED_MODEL_NAME variable?
  • Can you provide the details of the error message you're seeing?

from vertex-ai-samples.

mattcarrollcode avatar mattcarrollcode commented on May 28, 2024

@aarondietz234 Can you take a look at this?

from vertex-ai-samples.

candicehou07 avatar candicehou07 commented on May 28, 2024

Hi, to answer the questions:

  • I have trained the model and uploaded the model to Vertex Models
    (screenshot included)
    Screen Shot 2021-11-08 at 3 20 00 PM

  • I updated the DEPLOYED_MODEL_NAME as the deployed model name, "fraud-detection-model-v1"

    • variables used to retrieve the model and the endpoint: MODEL_DISPLAY_NAME: fraud-detection-model
      ENDPOINT_DISPLAY_NAME: fraud-detection-model-ep1
      Screen Shot 2021-11-08 at 3 22 17 PM
  • Error Message:


InactiveRpcError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*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
1 # instantiate the model and endpoint resources
----> 2 model = aiplatform.Model(model_name=MODEL_DISPLAY_NAME)
3 endpoint = aiplatform.Endpoint(endpoint_name=ENDPOINT_DISPLAY_NAME)
4
5 # deploy the model to the endpoint

/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_remapped_callable(*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 checked the Apiplatform SDK, both APIs need to use resource name or ID to retrieve model and endpoint. Here we're using the display names rather than the resource names.
    Screen Shot 2021-11-08 at 3 24 17 PM
    Screen Shot 2021-11-08 at 3 24 28 PM

I tried to run with resource_name and it worked. I hope this helps with troubleshooting!

from vertex-ai-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.