vertex-ai-samples icon indicating copy to clipboard operation
vertex-ai-samples copied to clipboard

community -> official for bqml-online-prediction.ipynb

Open polong-lin opened this issue 3 years ago • 3 comments

If you are opening a PR for Official Notebooks under the notebooks/official folder, follow this mandatory checklist:

  • [x] Use the notebook template as a starting point.
  • [x] Follow the style and grammar rules outlined in the above notebook template.
  • [x] Verify the notebook runs successfully in Colab since the automated tests cannot guarantee this even when it passes.
  • [x] Passes all the required automated checks. You can locally test for formatting and linting with these instructions.
  • [x] You have consulted with a tech writer to see if tech writer review is necessary. If so, the notebook has been reviewed by a tech writer, and they have approved it.
  • [x] This notebook has been added to the CODEOWNERS file under the Official Notebooks section, pointing to the author or the author's team.
  • [x] The Jupyter notebook cleans up any artifacts it has created (datasets, ML models, endpoints, etc) so as not to eat up unnecessary resources.

If you are opening a PR for Community Notebooks under the notebooks/community folder:

  • [ ] This notebook has been added to the CODEOWNERS file under the Community Notebooks section, pointing to the author or the author's team.
  • [ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

If you are opening a PR for Community Content under the community-content folder:

  • [ ] Make sure your main Content Directory Name is descriptive, informative, and includes some of the key products and attributes of your content, so that it is differentiable from other content
  • [ ] The main content directory has been added to the CODEOWNERS file under the Community Content section, pointing to the author or the author's team.
  • [ ] Passes all the required formatting and linting checks. You can locally test with these instructions.

polong-lin avatar Aug 03 '22 14:08 polong-lin

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@polong-lin what was the decision behind TW review? Please have them review this PR and add approval.

ivanmkc avatar Aug 09 '22 17:08 ivanmkc

@ivanmkc the test is failing because the BQML model was previously deployed in a previous test, and needs to be undeployed first in the test project (by first undeploying the model from the endpoint, then deleting the model from BQML, I presume). What's the next step here?

polong-lin avatar Aug 10 '22 13:08 polong-lin

@ivanmkc I've finished resolving the comments from @sarahcdugan , but the execution tests are failing (because of the issue stated earlier).

BadRequest: 400 Model Registry failed: com.google.cloud.ai.platform.common.errors.AiPlatformException: code=FAILED_PRECONDITION, message=The Model is deployed or being deployed at the following Endpoint(s): projects/1012616486416/locations/us-central1/endpoints/3218305718872440832. Please undeploy the model before retry., cause=null

I can append a UUID to the model name to make it unique. Is that the recommended approach, @ivanmkc ?

polong-lin avatar Aug 17 '22 14:08 polong-lin

@ivanmkc Finally this has passed the CI tests! Could you check and merge if this looks good with you? Sarah has already approved.

polong-lin avatar Aug 18 '22 21:08 polong-lin

@ivanmkc the test is failing because the BQML model was previously deployed in a previous test, and needs to be undeployed first in the test project (by first undeploying the model from the endpoint, then deleting the model from BQML, I presume). What's the next step here?

A UUID should be used to prevent conflicts. Also, the notebook cleanup step should cleanup models.

ivanmkc avatar Aug 23 '22 18:08 ivanmkc

@polong-lin In the context of this repo (which is for Vertex AI), we might discuss what is the appropriate folder this is for.

It may be more appropriate for it be in the model_registry folder since that is the Vertex AI product used. Conversely, if we expect more notebooks to tackle the "how does BQML integrate with Vertex", I could see an argument to keep the "bigquery_ml" folder as you have now.

ivanmkc avatar Sep 06 '22 18:09 ivanmkc

@ivanmkc Regarding the folder -- we should also consider how these notebooks are used/discovered. If the entry point is Model Registry, then moving to the Model Registry makes sense, but I see this notebook catering more towards BigQuery (ML) users who come to this repo looking to find what integration points Vertex AI can also offer. Also, the highlight of this notebook is not Model Registry; it's for online prediction using models trained in BQML, which happens to be made easier through Model Registry to deploy to Vertex AI endpoints.

polong-lin avatar Sep 07 '22 10:09 polong-lin