Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

feat(tables): update samples for making prediction with exported model#3993

Closed
helinwang wants to merge 2 commits intoGoogleCloudPlatform:masterfrom
helinwang:master
Closed

feat(tables): update samples for making prediction with exported model#3993
helinwang wants to merge 2 commits intoGoogleCloudPlatform:masterfrom
helinwang:master

Conversation

@helinwang
Copy link

Exported models runs inside a docker image in localhost. This commit
adds code sample for making prediction with exported model with
Python. It will be used in
https://cloud.google.com/automl-tables/docs/model-export#automl-tables-example-drest

Exported models runs inside a docker image in localhost. This commit
adds code sample for making prediction with exported model with
Python. It will be used in
https://cloud.google.com/automl-tables/docs/model-export#automl-tables-example-drest
@helinwang helinwang requested review from a team, sirtorry and telpirion as code owners June 6, 2020 00:09
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 6, 2020
@telpirion
Copy link
Contributor

It looks like this sample is missing tests. Would you please add them?

Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sirtorry sirtorry assigned sirtorry and unassigned crwilcox Jul 17, 2020
@sirtorry
Copy link
Contributor

this is going to be part of a tutorial where the reader will be asked to stand up a local server before running this snippet. how should we test it? should we test it?

@helinwang
Copy link
Author

Maybe we can test the correctness of the request JSON example.

@busunkim96
Copy link
Contributor

Passing along testing suggestions from @tmatsuo and @kurtisvg in chat:

kurtisvg

My first attempt would be just to mock the response to the request being sent to the local server

My second suggestion (and perhaps a little more e2e, but also potentially more flaky) would be to create a pytest fixture > that runs the server... I think we have some other tests that already use docker in docker but I'm not sure.

tmatsuo

docker in docker should work with a caveat. If you mount files when running the image, the path should be under /tmp. For example, this docker run -v /somewhere/mydir:/mydir hello doesn't work but docker run -v /tmp/mydir:/mydir hello should work

@busunkim96
Copy link
Contributor

Closing since this PR has gone stale. These samples have been moved to the python-automl repository.

@busunkim96 busunkim96 closed this Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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