Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleCloudMlV1_PredictRequest Mount Wrong URL #8971

Open
danieldocki opened this issue Jan 13, 2022 · 1 comment
Open

GoogleCloudMlV1_PredictRequest Mount Wrong URL #8971

danieldocki opened this issue Jan 13, 2022 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@danieldocki
Copy link

Environment details

  • Programming language: Elixir
  • OS: macOS 12.1
  • Language runtime version: Elixir 1.13.1 (compiled with Erlang/OTP 24)
  • Package version: {:google_api_machine_learning, "~> 0.28.0"}

Steps to reproduce

Can run this livebook
https://gist.github.com/danieldocki/6b063661eee1062be322b9711f5b0814

the error is in the formation of the URL, as you can see in the error below

{:error,
 %Tesla.Env{
   __client__: %Tesla.Client{
     adapter: nil,
     fun: nil,
     post: [],
     pre: [
       {Tesla.Middleware.Headers, :call,
        [
          [
            {"authorization",
             "Bearer TOKEN"}
          ]
        ]}
     ]
   },
   __module__: GoogleApi.MachineLearning.V1.Connection,
   body: "{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Field: name Error: The name should be a model or a version resource name, e.g 'projects/your-project-id/models/your-model-name' or 'projects/your-project-id/models/your-model-name/versions/your-version-name'.\",\n    \"status\": \"INVALID_ARGUMENT\",\n    \"details\": [\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n        \"fieldViolations\": [\n          {\n            \"field\": \"name\",\n            \"description\": \"The name should be a model or a version resource name, e.g 'projects/your-project-id/models/your-model-name' or 'projects/your-project-id/models/your-model-name/versions/your-version-name'.\"\n          }\n        ]\n      }\n    ]\n  }\n}\n",
   headers: [
     {"cache-control", "private"},
     {"date", "Thu, 13 Jan 2022 12:27:53 GMT"},
     {"accept-ranges", "none"},
     {"server", "ESF"},
     {"vary", "X-Origin"},
     {"content-length", "711"},
     {"content-type", "application/json; charset=UTF-8"},
     {"x-xss-protection", "0"},
     {"x-frame-options", "SAMEORIGIN"},
     {"x-content-type-options", "nosniff"},
     {"alt-svc",
      "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}
   ],
   method: :post,
   opts: [],
   query: [],
   status: 400,
   url: "https://ml.googleapis.com/v1/projects/PROJECT_ID%2Fmodels%2FMODEL_NAME:predict"
 }}

was expected to assemble the URL
https://ml.googleapis.com/v1/projects/PROJECT_ID/models/MODEL_NAME:predict

@danieldocki danieldocki added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 13, 2022
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Apr 13, 2022
@artonragsdale
Copy link

This seems to be a breaking bug for the MachineLearning client. I can't find a way to specify a project and a model name. If I'm missing something, I'd love to know so I can use the library to access these services. Right now, I seem to always get PERMISSION_DENIED CONSUMER_INVALID when trying to just use the project id like the code seems to indicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants