-
Notifications
You must be signed in to change notification settings - Fork 2k
ci: enable new CI for vision package #3968
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
Changes from 4 commits
cadfd78
d9db94d
f6ac7bf
58571e5
ed365d4
5967346
23ce3ca
0bfe855
01c658d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,6 +217,7 @@ | |
| "texttospeech", | ||
| "tpu", | ||
| "translate", | ||
| "vision", | ||
| "workflows/invoke-private-endpoint" | ||
| ] | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} | ||
glasnt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -76,27 +76,33 @@ describe('detect', () => { | |||||||||||||
| it('should detect labels in a local file', async () => { | ||||||||||||||
| const output = execSync(`${cmd} labels ${files[4].localPath}`); | ||||||||||||||
| assert.match(output, /Labels:/); | ||||||||||||||
| assert.match(output, /cat/); | ||||||||||||||
| assert.match(output.toLowerCase(), /cat/); | ||||||||||||||
| }); | ||||||||||||||
|
|
||||||||||||||
| it('should detect labels in a remote file', async () => { | ||||||||||||||
| const output = execSync(`${cmd} labels-gcs ${bucketName} ${files[4].name}`); | ||||||||||||||
| assert.match(output, /Labels:/); | ||||||||||||||
| assert.match(output, /cat/); | ||||||||||||||
| assert.match(output.toLowerCase(), /cat/); | ||||||||||||||
| }); | ||||||||||||||
|
|
||||||||||||||
| it('should detect landmarks in a local file', async () => { | ||||||||||||||
| const output = execSync(`${cmd} landmarks ${files[1].localPath}`); | ||||||||||||||
| assert.match(output, /Landmarks:/); | ||||||||||||||
| assert.match(output, /Palace of Fine Arts/i); | ||||||||||||||
| // something changed in the output and this text is no longer in the output | ||||||||||||||
| // however, the API call itself still works, commenting this out so | ||||||||||||||
| // it's not breaking the tests. | ||||||||||||||
| // assert.match(output, /Palace of Fine Arts/i); | ||||||||||||||
|
||||||||||||||
| // something changed in the output and this text is no longer in the output | |
| // however, the API call itself still works, commenting this out so | |
| // it's not breaking the tests. | |
| // assert.match(output, /Palace of Fine Arts/i); | |
| // FLAKY: confirm there is output, if not an exact match on output | |
| assert.match(output, /description:/i); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test checks the output of the call node detect.js logos resources/google.png, which runs detectLogos, and writes results to console that this then checks (execSync returns stdout from the command).
The problem here is that one of the failing test executions shows that the output is just "Logos:\n". Which I can replicate on my local machine:
$ node detect.js logos resources/google.png
Logos:
$
The test will always return the "Logos:" string, but then loops around the results to return information. Since we're capturing stdout we can't easily get a count of the loops, but we could confirm that there is a description, rather than the contents of the description (description: appears in the output if there is a match).
Checking the other skipped tests, I am able to get consistent successes with the Landmarks detection, but I cannot get the Logo detection to work.
Looking further, it looks like the test data used in this test differs from the other repos (this repo uses "google.png", a transparent PNG, other repos use "logos.png", an upscaled logo on white background). But the existing resource "logos.png" in this repo, which uses the old logo, is detected correctly.
I would suggest changing the two logos tests to check that the literal string "description:" is in the output rather than the contents, and change the checked file to files[2].name (which is logos.png; while different to other repos logos.png, appears to succeed the logo identification test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this detailed investigation. Followed this and the suggestions in next commit.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // something changed in the output and this text is no longer in the output | |
| // however, the API call itself still works, commenting this out so | |
| // it's not breaking the tests. | |
| // assert.match(output, /Google/); | |
| // confirm there is output with a description, but not necessarily an exact value match | |
| assert.match(output, /description:/); |
Uh oh!
There was an error while loading. Please reload this page.