Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Param "scoreThreshold" should be "score_threshold"#234

Merged
JustinBeckwith merged 6 commits intogoogleapis:masterfrom
normankong:patch-1
Nov 26, 2018
Merged

Param "scoreThreshold" should be "score_threshold"#234
JustinBeckwith merged 6 commits intogoogleapis:masterfrom
normankong:patch-1

Conversation

@normankong
Copy link
Copy Markdown
Contributor

Sine 18 Oct 2018, I found that the scoreThreshold param won't work and encounter "Error: 3 INVALID_ARGUMENT: Request contains an invalid argument." during prediction call. I compared the doc below and the params should be score_threshold instead of scoreThreshold.

https://cloud.google.com/vision/automl/docs/reference/rest/v1beta1/projects.locations.models/predict#request-body

Sine 18 Oct 2018, I found that the scoreThreshold param won't work and encounter  "Error: 3 INVALID_ARGUMENT: Request contains an invalid argument." during prediction call. I compared the doc below and the params should be score_threshold instead of scoreThreshold. 

https://cloud.google.com/vision/automl/docs/reference/rest/v1beta1/projects.locations.models/predict#request-body
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2018
@ghost ghost assigned JustinBeckwith Oct 20, 2018
@JustinBeckwith
Copy link
Copy Markdown
Contributor

@beccasaurus @googleapis/ml-apis would y'all mind taking a look?

@JustinBeckwith JustinBeckwith requested review from a team and beccasaurus October 20, 2018 19:47
@jkwlui jkwlui added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 19, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 19, 2018
@beccasaurus
Copy link
Copy Markdown
Contributor

Ah, I was hesitant to accept this because the Node.js client does not use snake_case_variables

Also, the REST API endpoint isn't called, here is the API endpoint for the underlying RPC endpoint:
https://cloud.google.com/vision/automl/docs/reference/rpc/google.cloud.automl.v1beta1#google.cloud.automl.v1beta1.PredictionService

Upon taking a closer look, this makes sense. score_threshold is not a proto field, so scoreThreshold won't work. This value goes into a proto map<string, string> (ref) so exact casing of the key is required.

Great catch!

CLA ok. Bug confirmed. Updating the branch & merging...

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 26, 2018

Codecov Report

Merging #234 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #234   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines          83     83           
=====================================
  Hits           83     83

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af55904...fa0799a. Read the comment docs.

@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 26, 2018
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Nov 26, 2018
@JustinBeckwith
Copy link
Copy Markdown
Contributor

Samples test failure seems unrelated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants