Compare commits

...
Author SHA1 Message Date
Holt SkinnerandGitHub 5af5936172 Update run_linter.sh
Fix spelling error `notebooked` → `notebooks`
2024-07-29 17:33:58 +02:00
Kathy YuandGitHub 462f0b6276 Update vLLM version in Llama 3.1 and Guard deployment notebooks. (#3335) 2024-07-27 00:25:53 +00:00
Ravi DalalandGitHub 2111ade4a6 Update github id in CODEOWNERS file (#3334) 2024-07-26 17:45:40 +00:00
Kathy YuandGitHub 07579d4274 Update OpenAI API Llama 3.1 and RAG notebooks. (#3323) 2024-07-26 16:54:57 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
20b9538572 chore(deps): bump torch (#3328)
Bumps [torch](https://github.com/pytorch/pytorch) from 1.13.1 to 2.2.0.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](https://github.com/pytorch/pytorch/compare/v1.13.1...v2.2.0)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-26 16:51:19 +00:00
Kathy YuandGitHub 9ec0d3336a Update Llama Guard and synthetic data generation notebooks. (#3332) 2024-07-26 16:50:39 +00:00
Kathy YuandGitHub af45c644e3 Add variant in Llama 3.1 deployment notebook. (#3329) 2024-07-26 16:49:47 +00:00
Kathy YuandGitHub 2d092701c4 Update vLLM version in Llama 3.1 and Guard deployment notebooks. Fix bugs. (#3321) 2024-07-24 22:48:18 +00:00
weiran-workandGitHub c9272f1f85 chore: remove outdated benchmark report (#3320) 2024-07-24 22:46:23 +00:00
a37ff0e1f4 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3102)
* refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template

* refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template

* Fixed issue related to image building

* Did minor fixes regarding docker image path and bucket creation command

* Updated command of bucket creation

* Did major changes in docker related code

* Fixed issue raised on PR

* Removed output of executed cells

* fix, refactor, chore: updates the model saving location in training script, removes the unnecessary code for training, refactors and updates the training image creation section accordingly

* chore: updates explanation about python package in the overview section

* fix, chore: specifies the working dir while building and running the container, adds '.' in a sentence in Overview

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-24 20:05:34 +00:00
sumanvitaandGitHub 89e243899e refactor, chore(egen): Changes aiplatfrom import statement, refactors as per notebook template guidelines, linter performed (#3315)
* refactor, chore(egen):  Changes aiplatfrom import statement, refactors as per notebook template guidelines, linter performed

* case change
2024-07-24 19:57:26 +00:00
0181e7bc2a refactor(egen): Colab enterprise link fix (#3307)
* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored notebook according to new notebook template

* <refactor>: refactored notebook according to new notebook template

* Updated colab enterprise link

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-24 19:54:38 +00:00
75bd4bb561 fix: fixes the path in the colab enterprise link (#3303)
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-24 19:52:20 +00:00
sumanvitaandGitHub 3959a5f1d7 refactor, chore(egen): replaces region with location, adds additional parameters in dataset_delete() function inside cleanup cell (#3300)
* refactor, chore(egen): replaces region with location, adds additional parameters in dataset_delete() function inside cleanup cell

* wording changes

* wording and case change
2024-07-24 19:50:57 +00:00
16e87c024a fix,chore,refactor(egen): minor changes to the automl_image_classification_online_prediction notebook. (#3299)
* fix,chore,refactor(egen):Changed REGION variable name to LOCATION, modified the import file, added version for the tensorflow package in installation step, added comments in cleanup section, removed os.getenv(IS_TESTING) from the cleanup section, refactored code according to the template guidelines and performed linter test.

* chore(egen): Done changes according to @kittyabs and performed linter test.

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-24 19:48:17 +00:00
sumanvitaandGitHub 07045c6f3b fix, refactor, chore(egen): adds numpy==1.23.0 and replaces google-vizier==0.0.4 to resolve dependency errors, replaces REGION with LOCATION, refactors code (#3295)
* fix, refactor, chore(egen): adds numpy==1.23.0 and replaces google-vizier==0.0.4 to remove dependency errors, refactors code as per template guidelines, performs linter

* adds code highlight

* removes overview as per PR comments
2024-07-24 19:45:31 +00:00
sumanvitaandGitHub 76c089430c fix, chore, refactor(egen): Adds numpy==1.23.0, removes version ==0.0.4 from vizier installation, replaces K80 with T4, refactors as per template guidelines (#3292)
* fix, chore, refactor(egen): Adds numpy==1.23.0, removes version ==0.0.4 from vizier installation, replaces K80 with T4, refactors as per template guidelines

* removes use of future tense

* case change, wording changes as per PR comments
2024-07-24 19:43:26 +00:00
Xiang XuandGitHub 0de6d08a16 Fix input template in model_garden_pytorch_llama3_1_deployment (#3317) 2024-07-24 18:43:01 +00:00
d703f31f89 feat: Update vllm and peft docker URI. (#3314)
Co-authored-by: Weiran <weiranzhao@google.com>
2024-07-24 17:48:14 +00:00
Sujit KhasnisandGitHub 8963a9275f fix: typo in Mistral AI Colab ent link (#3316) 2024-07-24 15:55:27 +00:00
Sujit KhasnisandGitHub 623c15662a feat: Official notebook for Mistral AI Release 07/24 (#3308)
* feat: Official notebook for Mistral AI Release 07/24

* feat: Official notebook for Mistral AI Release 07/24,added links to Vertex, Public docs

* feat: Official notebook for Mistral AI Release 07/24; links reorged

* feat: Official notebook for Mistral AI Release 07/24;lint issue resolved

* feat: Official notebook for Mistral AI Release 07/24;large name change [2407]
2024-07-24 15:34:41 +00:00
Xiang XuandGitHub c62089b99d Fix request format in model_garden_pytorch_llama3_1_deployment (#3313) 2024-07-24 02:24:51 +00:00
Xiang XuandGitHub ed51eb4689 Fix endpoint in synthetic_data_generation_using_llama3_1.ipynb (#3312) 2024-07-23 18:35:21 +00:00
Ivan NardiniandGitHub 1915c8ca3e feat: add llama3_1 notebooks (#3311)
* add llama3_1 notebooks

* fix conflict
2024-07-23 16:00:01 +00:00
Kathy YuandGitHub 35db5c5889 Add Llama Guard, RAG, synthetic data generation notebooks. (#3310)
* Add Llama Guard, RAG, synthetica data generation notebooks.

* Fix linter
2024-07-23 15:27:37 +00:00
Xiang XuandGitHub 27f903deb0 Add llama3.1 finetune and deploy notebooks (#3309) 2024-07-23 15:15:47 +00:00
81d900051b refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3132)
* Adapted code with new notebook template

* Updated working libraries and replace all the REGION variable with LOCATION

* Testead code and gone through notebook template. Did required changes.

* Did required changes based on the feedbak given on PR

* Did required changes based on feedback given on PR

* fix, chore: upgrades the tensorflow version to the latest, reorganizes and rewords the heading structure to follow the tutorial flow, removes unnecessary code highlights, fixes typos

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-21 18:04:04 +00:00
c20d754717 chore(egen): Follows new template, removes IS_TESTING, REGION --> LOCATION (#3207)
* chore: Follows new template, removes IS_TESTING, relaces REGION with LOCATION

* chore: Cloud console --> Google Cloud console

* chore: addresses review comments, sets delete_bucket to True to remove the GCS bucket in the cleaning up step

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-21 17:57:56 +00:00
Kaushik KoiladaandGitHub b98aeb471f refactor, chore: (egen):sdk-automl-object-tracking-batch-prediction (#3249)
* chore: removes boiler plate, adds colab enterprise and edits acording to template

* chore: run end to end and reformat according to template

* chore: lint

* fix: removes testing induced error and runs lint

* chore: update REGION to LOCATION

* chore: lint test and update checks failure

* chore: address review comments
2024-07-21 17:52:56 +00:00
5cb93b266b fix,chore,refactor(egen): minor fix and changes to the model monitoring automl image online notebook. (#3268)
* fix,chore,refactor(egen): Added colab enterprise logo with link, heading changes according to template guidelines,changed REGION variable name to LOCATION, modified code in online prediction using the SDK interface, added the clean up code for endpoint and training job, added comments in cleanup code, refactored code according to template guidelines and performed linter test.

* chore(egen): removed version in the installation step and performed linter test

* chore,refactor(Egen):Done changes according to @kittyabs review and performed linter test.

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-21 17:50:18 +00:00
67abf6ad8b chore,refactor(egen): Changed REGION variable name to LOCATION, removed IS_TESTING from the cleaning up section, refactored code according to template guidelines and performed linter test. (#3280)
* chore,refactor(egen): Changed REGION variable name to LOCATION, removed IS_TESTING from the cleaning up section, refactored code according to template guidelines and performed linter test.

* chore(egen): Done changes according to @kittyabs review and performed linter test.

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-21 17:46:16 +00:00
3238d99f08 fix,chore,refactor(egen): Changed REGION variable name to LOCATION, changed CLUSTER_REGION variable name to CLUSTER_LOCATION, added gcloud command to enable dataproc cluster, refactored code according to the template guidelines and performed linter test. (#3284)
* fix,chore,refactor(egen): Changed REGION variable name to LOCATION, changed CLUSTER_REGION variable name to CLUSTER_LOCATION, added gcloud command to enable dataproc cluster, refactored code according to the template guidelines and performed linter test.

* chore(egen): Done changes according to @kittyabs review and performed linter test.

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-21 17:44:03 +00:00
5388cd53f7 fix,chore,refactor(egen): Changed CLUSTER_REGION variable name to CLUSTER_LOCATION, added gcloud command to enable dataproc api, modified bigquery dataset name by replacing hyphens to underscores, removed uuid code generation and replaced uuid with unique, refactored code according to template guidelines and perfomed linter test. (#3286)
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-21 17:40:26 +00:00
Kaushik KoiladaandGitHub e5e68af5fa chore, refactor(egen): updates and refactors sdk_automl_video_classification_batch notebook (#3287)
* chore, refactor: adds colab enterprise and removes boilerplate

* chore: updates REGION to LOCATION and run end to end test

* chore: lint run
2024-07-21 17:38:29 +00:00
2b796ea454 <Refactor> Refactored the notebook according to the template. (#3288)
Co-authored-by: UBhavani <bhavani.ummadi@egen.ai>
2024-07-21 17:37:11 +00:00
66563cb700 refactor, chore(egen): refactored the notebook according to the template, updated and added new package (#3289)
* <Refactor, Chore> Refactored the notebook according to the template, updated and added new package.

* Applied suggested edits.

* Applied suggested edits.

---------

Co-authored-by: UBhavani <bhavani.ummadi@egen.ai>
2024-07-21 17:35:15 +00:00
Aaron DietzandGitHub 56516b496a Update tensorboard_profiler_custom_training_with_prebuilt_container.ipynb (#3294)
Updated name of Cloud Profiler (used to be called various versions of Tensorboard Profiler etc. It's Cloud Profiler on first use, Profiler (shortened) for further uses.
2024-07-21 17:31:02 +00:00
Ravi DalalandGitHub 5236aced75 updated instruction for retry block (#3293) 2024-07-19 17:32:30 +00:00
Ravi DalalandGitHub 61ea845e26 Spark on Ray on Vertex AI notebook (#3282)
* added example notebook for Spark on RoV

* added example notebook for Spark on RoV

* ran linter on spark_on_ray_on_vertex_ai.ipynb

* updated official CODEOWNERS file for spark on ray on vertex ai notebook

* fixed text

* fixed project and location variables for build

* lint run

* added docker authentication

* renamed docker repo

* added sdk version

* added quiet to docker authentication

* added explicit dependencies installation

* added google cloud aiplatform ray module installation

* added gcloud update and cleanup

* added a wait to avoid timeout error in the test build

* fixed cluster resource name in delete

* added timestamp suffix to cluster name

* added a 5 minutes wait after cluster creation

* address PR comments
2024-07-19 03:03:45 +00:00
21864fd3a5 refcator,chore(egen) : refactored code according to template guidelines (#3279)
* forecasting-retail-demand.ipynb

* refcator,chore(egen) : refactored code according to template guidelines

* refcator,chore(egen) : refactored code according to template guidelines

* refactor(egen) : refactored according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-19 02:11:11 +00:00
598c91ace0 refactor, chore(egen): Tensorflow version fix, grammar corrections, other corrections from template (#3277)
* <refator, chore> Adds Tensorflow in installation section, corrections from template

* <refator, chore> Adds Tensorflow in installation section, corrections from template

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-19 02:02:47 +00:00
sumanvitaandGitHub 91d027ee02 refactor, chore(egen): removes import os, refactors as per new template guidelines (#3275)
* refactor, chore(egen): removes import os, refactors as per new template guidelines

* changes did'nt to didn't

* changes made as per PR comments
2024-07-19 01:58:42 +00:00
0674f3cdec Refactor(egen): Corrections from template (#3270)
* <refactor, chore> Updated prebuilt container image for prediction to 1.3, scikit-learn package updated to 2.5.1, other corrections from template

* <refactor> refactored notebok according to notebook template

* <refactor> refactored notebok according to notebook template

* <refactor> refactored notebok according to notebook template

* <refactor> refactored notebok according to notebook template

* <refactor> refactored notebok according to notebook template

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-19 01:51:03 +00:00
sumanvitaandGitHub 59a1cd0a1a refactor, chore(egen): refactors code as per new template guidelines, removes future tense, replaces REGION with LOCATION, removes generate_uuid function (#3267)
* refactor, chore(egen): refactors code as per new template guidelines, removes future tense, replaces REGION with LOCATION, performs linter test

* you are changed to you're

* wording changes, performed linter test

* notebook changed to notebooks (plural)
2024-07-19 01:37:03 +00:00
f7937c7117 chore,refactor(egen): minor changes to prophet on vertex pipelines notebook. (#3263)
* chore,refactor(egen): Changed REGION variable name to LOCATION, changed DATA_REGION variable name to DATA_LOCATION, added cleanup code for pipeline jobs, batch prediction job, modified cleanup code for deletion of bigquery dataset, removed versions of packages in the install step, removed os.getenv(IS_TESTING) while cleanup bucket, refactored code according to template guidelines and performed linter test.

* chore,refactor(Egen):Done changes according to @kittyabs review and performed linter test.

* chore(egen): redefined the variables of training pipeline job name and prediction pipeline job name and performed linter test

* chore(egen): redefined the model variable in cleanup section and performed linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-19 01:27:19 +00:00
Kaushik KoiladaandGitHub abf3594267 refactor, chore (egen): refactors sdk_automl_video_action_recognition_batch notebook (#3276)
* chore, refactor: adds colab enterprise, remove boiler plate

* refactor: changes REGION to LOCATION

* chore: run end to end and remove testing variable

* chore: lint
2024-07-18 23:35:21 +00:00
Kaushik KoiladaandGitHub 3ab0d62efe chore, refactor (egen): refactors wide_and_deep_on_vertex_pipelines.ipynb notebook (#3273)
* chore, refactor: edits according to template, adds colab eneterprise and changes REGION to LOCATION

* chore: testing end to end

* chore: lint
2024-07-18 23:32:53 +00:00
Manu KumarandGitHub d893c7857c feat: add online serving w/multiple entities notebook (#3245) 2024-07-18 12:22:33 +00:00
Manu KumarandGitHub 463adaefb0 feat: add offline feature serving notebook (#3184) 2024-07-17 19:01:48 +00:00
Jose BracheandGitHub 8fc1b2fb42 feat: Adding a new persistent resources notebook that uses the Vertex AI SDK (#3274) 2024-07-17 12:55:28 +00:00
Aaron DietzandGitHub aa5ab3c64f Update get_started_with_custom_training_autologging_local_script.ipynb (#3236)
Fixed typo: paramenters --> parameters
2024-07-17 12:50:45 +00:00
siping-huandGitHub 10385c316b Update notebook to use Gemini model instead of text-bison because text-bison will be deprecated. (#3265)
* [AutoSxS] Replace 1p model `text-bison` to `Gemini` because text-bison will be deprecated.

* product name edit

* Replace gemini 1.0 pro to gemini 1.5 pro.

* Fix the error when downloading the public dataset.
2024-07-17 12:49:53 +00:00
6afa3968b6 fix,chore,refactor(egen): done minor changes to sdk automl image classification batch online notebook (#3261)
* fix,chore,refactor(egen): replaced import file of gcs with new one to create dataset, removed import statement of os module, removed os.getenv(IS_TESTING) while cleanup bucket, replaced UUID with unique and deleted code to generate UUID, changed aip to aiplatform, changed REGION to LOCATION, added endpoint.delete() to delete the endpoint, hardcoded TF version to 2.15.1, refactored code according to template guidelines and performed linter test.

* chore(egen): removed back ticks

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-17 00:48:34 +00:00
6cc596accf refactor(egen) : refactored notebook according to template guidelines nd added missed modules and libraries (#3260)
* refactor(egen) : refactored notebook according to template guidelines and added missed imports and libraries

* refactor(egen) : added code to delete locally generated files

* refactor(egen) : refactored according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-17 00:43:56 +00:00
0dcce973bf chore,refactor(egen): Added opencv-python-headless and tensorflow==2.15.1 packages and cleanup code for local files and cloud storage bucket (#3258)
* chore,refactor(egen): Added opencv-python-headless and tensorflow==2.15.1 packages in installation step, Added import os statement in set machine type configuaration cell, Added cloud storage bucket and local files cleanup code, refactored code according to template guidelines and performed lintr test

* refactor(Egen):Done changes according to @kittyabs review and performed linter test.

* chore(egen): added IS_TESTING part while creating artifact repository and perfomred linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-17 00:37:55 +00:00
Kaushik KoiladaandGitHub 0791c52923 refactor, fix, chore(egen): edits get_started_bq_datasets (#3248)
* chore: refactor according to template, removes boilerplate, adds colab enterprise

* refactore: adds testing variables

* fix, chore: end to end testing with version change as fix

* chore: lint

* chore: addresses review comments and runs lint
2024-07-17 00:26:55 +00:00
575d2f9479 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3071)
* Fixed code issue template issue in distillation file

* Did required changes in notebook template

* Did minor changes

* Added execption handling at cleanup step to handle error while performing cleanup

* Fixed issue based on feedback given on feedback

* fix, chore, refactor: removes hard-coded project-id, remove future tense and reorganizes the sections, refactors the cleaning up section

* fix, refactor, chore: cleans up the resources using display name rather than resource name, adds wait step to wait until the pipeline job is finished, updates the overview section to remove 'we'

* fix: runs _job.wait() instead of .wait() method for waiting, updates the var pipeline_job to pipeline

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-17 00:10:17 +00:00
sumanvitaandGitHub 50d70a3037 refactor, chore(egen): refactors code as per new template guidelines, adds code to delete custom job and locally generated files (#3205)
* refactor, chore(egen): refactors code as per new template guidelines, adds code to delete locally generated files

* added code to delete custom job in the cleanup section

* license year changed to 2022, removed you as per PR comments

* future to present tense

* adds tensorflow installation, protobuf version changes to resolve dependency issues
2024-07-17 00:01:11 +00:00
Aaron DietzandGitHub 25e0b91162 Fix typo in pytorch_gcs_data_training.ipynb (#3237)
Fixed typo: runing --> running
2024-07-15 14:12:10 +00:00
5d8489e3e0 chore, refactor, feat(egen): follows new template, simplifies code, adds cleanup step (#3259)
* chore, refactor, feat: follows new template, simplifies code for display-names, adds steps for deleting the resources in the cleaning up section

* chore: addresses the review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-12 20:18:01 +00:00
sumanvitaandGitHub 8f2d26abb2 fix, refactor, chore(egen): adds endpoint.wait() to fix timeout error, hardcodes TF to 2.15.1, adds code in cleanup section to delete locally generated files, refactors code as per template guidelides, performs linter test (#3252)
* fix, refactor, chore(egen): adds endpoint.wait() to fix timeout error, hardcodes TF to 2.15.1, adds code in cleanup section to delete locally generated files, refactors code as per template guidelides, performs linter test

* replaces UUID with unique

* updates URL involving redirect
2024-07-12 20:13:27 +00:00
sumanvitaandGitHub fdba11d9b8 refacto, chore (egen): refactors code as per template guidelines, hardcodes TF version to 2.15.1,deletes locally generated files (#3251)
* refacto, chore (egen): refactors code as per template guidelines, hardcodes TF version to 2.15.1, adds code to delete locally generated files, markdown changes ,performs linter test

* adds space

* changed URL for notebook redirects
2024-07-12 19:58:56 +00:00
Katie NguyenandGitHub a537eab067 fix: branding corrections (#3256) 2024-07-12 17:56:16 +00:00
bcff5c3cb3 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3018)
* Updated notebook templace and did minor changes in notebook comments

* Added link of colab enterprice

* Fixed the link related issue and removed unwated variable value

* Added below comment in notebook:
# @title Copyright & License (click to expand)

* Fixed the issue related to notebook template based on reviewers feedback

* Fixed issue based on feedback given on PR

* Fixed the issue based on feedback given on PR

* fix, chore: replace REGION with LOCATION, remove will, contracts 'is not'

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-12 17:03:25 +00:00
Alok PattaniandGitHub 6ef29df46f Updating dataset and other changes from review (#3257) 2024-07-12 16:50:08 +00:00
6c7fa4b3d8 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3125)
* Adapted notebook with new notebook template

* Hardcode tensorflow version

* Removed unwated commentes from notebook

* Revert "Removed unwated commentes from notebook"

This reverts commit 1f120466b0.

* Perform lint code on notebook

* fix, chore: updates the deprecated matplotlib function, adds installation for matplotlib, removes future tense, removes 'we', removes try-except in the cleaning up section

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-12 05:28:10 +00:00
a7ed179e22 refactor,chore(egen) : refactored code according to template guidelines (#3254)
* refactor,chore(egen) : refactored code according to template guidelines and removed unused and deprecated code

* refactor,chore(egen) : refactored code according to template guidelines and removed unused and deprecated code

* refactor(egen) : refactored notebook according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-12 05:25:24 +00:00
16f117a7eb chore, refactor, feat(egen): Follows new template, markdown fixes, refactors (#3227)
* chore, refactor, feat: follows new template, fixes typos, updates dsl.Condition to ds.If, rewords the headings and organizes them as per the tutorial, adds a cleanup step for the pipeline file

* chore, fix: minor sentence corrections, removes undefined UUID parameter

* chore: addresses the review comments

* fix: fixes the var name pipeline --> pipeline_job

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-12 05:22:54 +00:00
Kaushik KoiladaandGitHub 236b2b751f chore, refactor, fix(egen): formats and fixes pytorch_distributed_training_reduction_server.ipynb (#3235)
* chore: removes boilerplate, adds colab enterprise, changes region to location, adds testing variables

* chore, fix: adds verification_mode to load_dataset to deal with error and runs end to end

* chore: removes testing code

* chore: lint

* chore: addresses review comments
2024-07-12 00:37:36 +00:00
f5d57558fe refactor, chore(egen): Replaces K80 GPU with T4, kfp and tensorflow versoin updates, pre-built Docker container image for training and prediction update, other corrections from template (#3219)
* <refactor, chore> replaces K80 GPU with T4, updates pre-built Docker container image for training and prediction to 2.13, cleansup intermediate files, updates kfp and tensorflow versions, fixes minor spelling mistakes and contracts words, removes future tense

* <refactor, chore> replaces K80 GPU with T4, updates pre-built Docker container image for training and prediction to 2.13, cleansup intermediate files, updates kfp and tensorflow versions, fixes minor spelling mistakes and contracts words, removes future tense

* <refactor, chore> replaces K80 GPU with T4, updates pre-built Docker container image for training and prediction to 2.13, cleansup intermediate files, updates kfp and tensorflow versions, fixes minor spelling mistakes and contracts words, removes future tense

* Grammar fix

* lint fix

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-12 00:34:20 +00:00
0f01fd7c18 chore(egen): follows new template, fixes typos, K80-->T4, REGION-->LOCATION etc. (#3214)
* chore: follows new template, fixes typos, removes unnecessary code-highlights, replaces K80 with T4, replaces REGION with LOCATION, removes IS_TESTING in cleaning up section, makes sentence/heading corrections and re-organizes some subsections as per the tutorial

* chore, refactor: minor markdown corrections, updates machine_type description and code to suit the explanation

* chore: addresses review comments and corrects 'uploading to a Vertex AI model resource' to 'uploading to Vertex AI Model Registry'

* chore: addresses the review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-12 00:31:39 +00:00
4f7b63f3af refactor,chore(egen) : refcatored code according to template guidelines and added cleanup code (#3211)
* refactor,chore(egen) : refcatored code according to template guidelines and added cleanup code

* refactored code according to template guidelines

* refcatord code according to template guidelines

* refactor(egen) : refactored code according to template guidelines

* refactor(egen) : refactored code according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-12 00:23:53 +00:00
sumanvitaandGitHub 42bdad56e3 chore, refactor(Egen): adds code to delete batch prediction job and locally generated files, refactors code as per notebook template guidelines (#3202)
* refactor, chore(egen): refactors code as per new template guidelines ,hardcodes TF version to 2.15.1, changes K80 to T4

* adds code to delete batch prediction jobs in the clean up section

* Changed lower to upper case

* reverted license to 2022 as per comment

* case change, wording changes as per PR comments
2024-07-12 00:20:18 +00:00
dc702a614b refactor, chore(egen): Removes boilerplate, heading fixes, corrections from template. (#3181)
* <refactore, chore>refactored notebook according to the template

* refactor: Apply markdown text edit

* source distribution fix

* source distribution fix

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-12 00:12:27 +00:00
73517d4b40 chore(egen) : Adds deprecation note to the notebook (#3243)
* Added deprecation note

* format and lint fix

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-11 23:44:26 +00:00
e0a3e785ec refactor,chore(egen) : added delete experiment code in cleanup section and required packages in installation section (#3216)
* refactor,chore(egen) : added delete experiment code in cleanup section and added required packages in installation section, refactored code according to template guideline

* refactor,chore(egen): removed hardcoded values

* downgraded numpy version

* refactor(egen) : refactored code according to template guidelines

* refcator(egen) : refactored code accordi gto template guidelines

* refactor(egen) : refactored code according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-11 23:39:08 +00:00
b9ac5a0296 refcator, chore(egen) : refactored code according to template guidelines , performed linter test (#3215)
* refcator, chore(egen) : refactored code according to template guidelines

* chore(egen) : changed headings as per guidelines

* performs linter test

* refactored code accordig to template guidelines

* formatted according to template guidelines

* formatted according to template guidelines

* refcator(egen) : refactored code according to template guidelines

* refactor(egen) : added warning message for kernal restart

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-11 23:36:01 +00:00
671e9f84fa refactor: refactor gemma notebooks (#3255)
Co-authored-by: Rayan Dasoriya <dasoriya@google.com>
2024-07-11 19:23:15 +00:00
9387236c01 feat: add a fn to resize an image (#3246)
Co-authored-by: Rayan Dasoriya <dasoriya@google.com>
2024-07-11 17:30:47 +00:00
8142ce631a Add instructions for securing more GPUs. (#3247)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-07-11 17:30:11 +00:00
Huguens JeanandGitHub 8923b4a7bd [Vertex AI MG Team] Remove corp link in NeRF gradio application. (#3253) 2024-07-11 17:29:11 +00:00
803bc9b489 chore,refactor(egen): minor changes to sdk feature store notebook (#3240)
* chore,refactor(egen): Changed REGION variable name to LOCATION, Added cleanup code fro cloud storage bucket, refactored code according to the template and performed linter test

* chore(egen): replaced region variable with location and perfomred linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 22:26:31 +00:00
5dc036b311 refcator,chore(egen) : refcatored code according to template guidelines (#3234)
* refcator,chore(egen) : refcatored code according to template guidelines

* refcator(egen) : formatted accorded to template guidelines

* refactor(egen) : refactored code according to template guidelines,removed hardcoded values  and performed linter test

* refactor(egen) : added warning message for kernal restart

* refactor(egen) : refactored according to template guidelines

* refactor(egen) : refactored according to template guidelines

* refactor(egen) : refactored according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-10 22:24:11 +00:00
fd15c01586 chore,refaactor(egen): minor changes to sdk feature store pandas notebook (#3239)
* chore,refactor(egen): Changed REGION variable name to LOCATION, Removed os.getenv(IS_TESTING) while cleanup bucket, refactored code according to the template and performed linter test

* chore,refactor(egen): Changed REGION variable name to LOCATION, Removed os.getenv(IS_TESTING) while cleanup bucket, refactored code according to the template and performed linter test

* chore(egen): replaced region variable with location and perfomred linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 22:20:51 +00:00
sumanvitaandGitHub 84cadc2c9a fix,refactor,chore(egen): adds endpoint.wait() to resolve timeout error, hardcodes TF version to 2.15.1, refactors code as per template, performs linter test (#3231)
* fix,refactor,chore(egen): adds endpoint.wait() to resolve timeout error, hardcodes tf version to 2.15.1, refactors code as per tempalte, performs linter test

* contraction of words

* added code highlight
2024-07-10 22:19:19 +00:00
f694abc42e refactor,chore(egen) : refactored code according to template guidelines (#3230)
* refactor,chore(egen) : refactored code according to template guidelines

* added code to remove locally generated files

* refactor(egen) : refactored code according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-10 22:04:27 +00:00
Kaushik KoiladaandGitHub 99fa616a14 refactor, chore, fix(egen): edits google_cloud_pipeline_components_model_upload_predict_evaluate.ipynb notebook (#3229)
* chore: removes boiler plate and reformats according to the template

* chore: adds colab enterprise link to the notebook

* chore: testing end to end

* chore:end to end test with reformatting

* chore: lint

* chore: addresses comment on the markups
2024-07-10 22:02:12 +00:00
sumanvitaandGitHub 0583f152ac fix, chore, refactor(egen): hardcodes scikit-learn version to 1.2, changes python version from 3.9 to 3.10, adds numpy==1.26.4 installation, adds code to undeploy model from endpoints (#3228)
* fix, chore, refactor(egen): hardcodes scikit-learn version to 1.2, changes python version from 3.9 to 3.10, adds numpy==1.26.4 installation, adds code to undeploy model from endpoints, rusage of future tense

* wording changes

* markdown wording changes as per PR comments
2024-07-10 21:51:01 +00:00
sumanvitaandGitHub f22fee6f84 fix, refactor, chore(egen): removes keras3 dependency error while saving the model, refactors code as per template (#3222)
* fix, refactor, chore(egen): removes keras3 dependency error while saving the model, refactors code as per template, performs linter test

* set epochs to 14 as per original code

* changed CustomJob to Custom Job
2024-07-10 21:42:04 +00:00
650272e370 chore, fix(egen): follows new template, markdown updates and fixes (#3221)
* chore: follows new template, remove IS_TESTING, replace REGION with LOCATION, organizes headings and styles, removes unnecessary code highlights

* fix: removes USER var, adds IS_COLAB var

* chore: addresses the review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-10 21:36:46 +00:00
8f9c783f97 refactor,chore(egen) : refactored code as per template guidelines , performed linter test (#3220)
* refactor,chore(egen) : refactored code as per template guidelines and performed linter test

* refcator(egen) : refcatored code according to template guidelines

* refcator(egen) : refcatored code according to template guidelines

* refcator(egen) : refcatored code according to template guidelines

* refactor(egen) : refactored code according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-10 21:27:54 +00:00
ed721006b7 refactor(egen): Automl video classification model evalution (#3217)
* refactor,chore(egen) : refactored according to template guidelines , performed linter test

* refactor,chore(egen) : removed hardcoded values , performed linter test

* refcatored according to template guidelines

* refactor(egen) : refactored code according to template guidelines

* refactor(egen) : refactored code according to template guidelines

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-10 21:18:59 +00:00
f4b17078af chore,refactor(egen): Changed REGION variable name to LOCATION, replaced np.NaN with np.nan, refactored code according to the template and performed linter test (#3242)
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 21:11:17 +00:00
8429bba776 chore,refactor(egen):changed the versions of tensorflow, tensorflow-hub, apache_beam[gcp] and bs4 in requirements.txt and setup.py files, refactored code according to template guidelines (#3233)
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 21:05:47 +00:00
9e42108fd0 chore,refactor(egen): minor updates to Automl Tabular Classification Model Evaluation Notebook (#3218)
* chore,refactor(Egen): Removed the google-cloud-pipeline-components package version, IS_TESTING Variable and import statement of os module from the cleaning up section, Replaced REGION variable with LOCATION, refactored code according to template guidelines and performed linter test.

* chore(egen):renamed location variable to LOCATION

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 18:09:16 +00:00
1593c06811 chore(egen):Added the note for deprecation of notebook and performed linter test (#3182)
* chore(egen):Added the note for deprecation of notebook and performed linter test

* chore(egen):changed the title of the link in the deprecated note

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-10 14:11:14 +00:00
7ccb27b044 chore(egen) : added note to deprecated notebook and performed linter test (#3209)
* chore(egen) : added note to deprecated notebook

* chore(egen) : performed linter test

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-10 14:10:38 +00:00
1a4db478de chore(egen) : added note to deprecated notebook and performed linter test (#3210)
* chore(egen) : added notes to deprecated notebook

* chore(egen) : performed linter test

* chore(egen) : added notes to deperecated notebook and performed linter test

* linter test

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-09 21:03:53 +00:00
Kaushik KoiladaandGitHub 8e5fd0545d refactor, chore (Egen) : Fixes headings, removes boilerplate and other corrections from template (#3044)
* refactor: removes boilerplate code, and fixes heading

* refactor: change region to location

* Removes IS_TESTING variable

* cleanup of changes

* chore: lint test done

* chore: aligns the icons to the center

* chore:verbiage changes and end to end code execution

* chore: reformatted by lint test

* chore: edits future tenses and reformatted by lint test

* chorE: address review comments and change import statement based on lint test

* fix: error rectification, remove vague testing variables

* fix: rectifies testing induced error in notebook

* chore: lint
2024-07-09 20:47:48 +00:00
Liang WuandGitHub c74a714a51 Support Mistral-7B-v0.3 and Mistral-7B-Instruct-v0.3 in deployment notebook. (#3226) 2024-07-09 19:16:21 +00:00
Aaron DietzandGitHub 2104f4c478 Fix typo in sdk_pytorch_torchrun_custom_container_training_imagenet.ipynb (#3238)
Fixed typo: Github --> GitHub
2024-07-09 18:31:37 +00:00
2e330ab7ab fix,chore,refactor(Egen): replaced aip with aiplatform and k80 GPU with T4 GPU, changed the versions of images,.keras extension added when saving and uploading the model, removed import statement of os module, refactored code according to template guidelines and performed linter test. (#3213)
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-09 03:34:01 +00:00
141e77caec refactor, chore, fix(egen): Pipeline documentation link update, removes GPU from machineSpec in the pipeline, package version updates, fixes import errors (#3206)
* <refactor, chore, fix> package version updates, pipeline components documentation link update, importer_node import fix, machineSpec update

* <refactor, chore, fix> package version updates, pipeline components documentation link update, importer_node import fix, machineSpec update

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-09 03:04:57 +00:00
Kaushik KoiladaandGitHub 70a65386d2 refactor, chore(egen): edits build_model_experimentation_lineage_with_prebuild_code notebook (#3203)
* chore,refactor: removes boiler plate, removes version of aiplatform package, adds colab enterprise and formats according to the template

* chore: run end to end

* chore: lint run
2024-07-09 02:42:42 +00:00
00729da920 refactor, chore(egen): Refactored code according to template guidelines (#3136)
* refactor, chore(egen): Refactored code according to template guidelines, performed linter test

* refactor, chore(egen): Removed vertexai SDK initiation in the beginning, performed linter test

* refactor, chore(egen): Made some grammatical changes in markdown script, performed linter test

* refactor(egen): modified code to delete locally created file, code to delete custom job

* comment change

---------

Co-authored-by: sumanvita-springml <sumanvita.kandregula@egen.ai>
2024-07-09 02:34:34 +00:00
Eric DongandGitHub 3e33b7e0c6 Update README.md (7) (#3223) 2024-07-09 02:09:34 +00:00
d57617c726 remove: remove model_garden_pytorch_mistral notebook (#3225)
Co-authored-by: Rayan Dasoriya <dasoriya@google.com>
2024-07-09 01:10:57 +00:00
Kaushik KoiladaandGitHub 24ff289855 chore, refactor(egen): format and refactor for get_started_with_model_monitoring_custom_tf_serving notebook (#3162)
* chore, refactor: adds colab enterprise, removes boilerplate, formats based on template, changes region to location

* chore,refactor: run end to end and format according to template

* chore: Lint test

* chore: comments on lower case addressed and lint run

* chore: comments on lower case addressed and lint run

* chore: address comment on lowercase of resource names
2024-07-05 17:41:44 +00:00
6183a71af4 refactor, chore, fix(egen): Documentation link update, package version updates, fixes import errors (#3208)
* <Refactor> Refactored the notebook according to the template.

* <refactor, chore, fix> Refactored the notebook according to the template, updated the documentation link and package version, fixed the import errors.

---------

Co-authored-by: UBhavani <bhavani.ummadi@egen.ai>
2024-07-04 18:53:37 +00:00
8eb8db2ef8 chore , refactor : removed ! rm lightweight_pipeline.json , Added cleanup code for deletion of pipeline and refactored code according to template guidelines , performed linter test (#3149)
* refactor : removed ! rm lightweight_pipeline.json

* chore,refactor : Added cleanup code for deletion of pipeline and refactored code according to template guidelines , performed linter test

* chore,refactor : Added cleanup code for deletion of pipeline and refactored code according to template guidelines , performed linter test

* refactor,chore : Added code for deletion of pipeline and refactored code according to template guidelines , performed linter test

* refactor,chore : refactored code according to template guidelines and downgraded numpy version

* refactor : removed project name and bucket name used for testing in local

* refactor : refactored code according to template guidelines

* performed linter test

---------

Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
2024-07-03 23:05:12 +00:00
a749fa3377 chore, refactor(egen): replace dsl.Condition with dsl.If, sentence corrections (#3199)
* refactor(egen): refacted markdown as per notebook template

* chore, refactor: removes future tense, minor markdown fixes, removes UUID and uses -unique

* chore, fix: replaces dsl.Condition with dsl.If, fixes some sentences and explanation

---------

Co-authored-by: sumanvita-springml <sumanvita.kandregula@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-03 13:45:04 +00:00
b2e9dbdb54 chore(egen):Added the note to the deprecation of the notebook and performed linter test (#3191)
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-03 00:36:47 +00:00
f537d8ef4b chore(egen):Added the note to the deprecation of notebook and performed linter test (#3190)
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-03 00:36:02 +00:00
4a3260d92b chore(egen) : Adds the note to the deprecation of notebook and performs linter test (#3189)
* chore(egen):Added the details of the deprecation of the notebook and performed linter test

* chore(egen):changed the title of the link in the deprecated note

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-03 00:35:21 +00:00
sumanvitaandGitHub 952f2d0aa6 chore(egen): Adds note to the deprecated notebook (#3188)
* chore(egen): Adds note to the deprecated notebook

* removes space
2024-07-03 00:34:38 +00:00
sumanvitaandGitHub 7f920f173f chore(egen): Adds note to the deprecated notebook (#3187)
* chore(egen): Adds note to the deprecated notebook, performs linter test

* removes extra space from the note
2024-07-03 00:33:51 +00:00
sumanvitaandGitHub 656f8d27d1 chore(egen): Adds note to the deprecated notebook (#3186)
* chore(egen): Adds note to the deprecated notebook, performs linter test

* removes extra space from note
2024-07-03 00:32:34 +00:00
sumanvitaandGitHub 03153ca48b chore(egen): Adds note to the deprecated notebook (#3185)
* chore(egen): Adds note to the deprecateed notebook and performs linter test

* Removes extra space in note
2024-07-03 00:30:39 +00:00
cecef79ae5 refactor(egen): template fixes, adds clean up steps (#3160)
* <Refactor> Refactored the notebook according to the template.

* <Refactor> Refactored the notebook according to the template.

* applied suggested edits.

* Changed region to location.

---------

Co-authored-by: UBhavani <bhavani.ummadi@egen.ai>
2024-07-03 00:01:32 +00:00
Eric DongandGitHub 13acdda204 fix: remove --user from package install (#3196) 2024-07-02 23:36:53 +00:00
Gary WeiandGitHub 23ac65b212 Add a Colab notebook for local dreambooth finetune user experience. (#3183)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates

* Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards.

* Sync Colab notebooks between g3 and github.

* format changes

* format update.

* Improve the SDXL-dreambooth-lora finetune notebook CUJ.

* Update the diffusers serving docker image version to `20240605_1400_RC00` to resolve vulnerabilities.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.

* Add a new notebook for local dreambooth finetune user experience.
2024-07-02 12:55:29 +00:00
df0e5a09cc chore,refactor(Egen): replaced aip with aiplatform and kfp.v2 with kfp, removed import statement of os module, refactored code according to template guidelines and performed linter test. (#3170)
* refractor,chore(egen): replaced kfp.v2 with kfp in compile step, refracted code according to template guidelines, performed linter test

* chore,refactor(Egen): replaced aip with aiplatform, removed import statement of os module, refactored code according to template guidelines and performed linter test.

* refactor(egen):refactored code by renaming REGION variable to LOCATION and performed linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-07-02 01:49:49 +00:00
bb3d3bde21 fix, chore, refactor(egen): REST api fixes, KFP v2 refactor, new template (#3180)
* fix, chore, refactor: fixes the issue with job creation request, refactors to use the latest SDKs, follows the new template, sentence corrections

* chore: removes future tense, minor sentence corrections

* chore: addresses the review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-07-01 20:40:05 +00:00
Kaushik KoiladaandGitHub 30f2a2ba03 Egen fix/delete outdated tensorboard experiments (#3178)
* chore: removes boiler plate and changes region to location

* chore: end to end run and lint
2024-07-01 20:32:44 +00:00
Kaushik KoiladaandGitHub f628caeb6d chore, fix, refactor(egen): fixes get_started_with_vertex_experiments_autologging notebook (#3177)
* chore, refactor: adds colab enterprise and refactors according to template

* fix, refactor: fixes issue with loading input and output with the types expected

* chore: lint
2024-07-01 20:31:02 +00:00
7e35553dbf refactor(egen): Corrections from template. (#3172)
* <refactor> refactored notebook according to new template

* Apply suggested edits

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-01 20:25:43 +00:00
sumanvitaandGitHub baa167a8d5 chore, refactor(egen): hardcodes TF version to 2.15.1, refactors code as per template, changes future to present tense (#3171)
* chore, refactor(egen): hardcodes TF version to 2.15.1, refactors code as per template,changes future to present tense

* refactor(egen): removes hypen between words

* refactor(egen): wording change

* contracts words like it is to it's
2024-07-01 20:21:41 +00:00
sumanvitaandGitHub ee4e4bb2ce Fix, chore, refactor(Egen) : hardcodes tensorflow dependency to 2.15.1, K80 to T4, refactors code as per notebook template guidelines (#3161)
* refactor, chore(egen): refactored code as per new notebook template, changes REGION to LOCATION

* chore, refactor(egen): adds code for deletion of locally generated files and other resources, rephrases sentences

* refactor(egen): changes lower to uppercase according to PR comments
2024-07-01 20:13:28 +00:00
ed8a842525 refactor, chore(egen): Replaces K80 with T4 GPU, Documentation link update, corrections from template. (#3163)
* <refactor, chore> refactored notebook according to new template

* Applied suggested edits

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-07-01 20:07:33 +00:00
56faf31221 Egen reviewed explainable ai (#3173)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* fix: remove new changes

* Update vertex_ai_feature_store_based_llm_grounding_tutorial.ipynb

remove back ticks from product/feature names

* Update xai_image_classification_feature_attributions.ipynb

removed back ticks from product names.

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-07-01 20:01:51 +00:00
7a15b88071 feat: Add notebook/colab example for prediction PSC based private (#3080)
endpoint.

Co-authored-by: TJ(Tianjiao) Liu <tianjiaoliu@google.com>
2024-06-29 00:35:54 +00:00
Gary WeiandGitHub 7ceda5e4e6 Add the TGI serving section to the Gemma2 deloyment notebook. (#3175)
* Add the TGI serving section to the Gemma2 deloyment notebook.

* Update the TGI serving container URI.
2024-06-29 00:34:32 +00:00
2a649e0a2e Egen reviewed model monitoring (#3176)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* fix: remove new changes

* Update vertex_ai_feature_store_based_llm_grounding_tutorial.ipynb

remove back ticks from product/feature names

* Update get_started_with_model_monitoring_custom.ipynb

small edits

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-29 00:14:36 +00:00
kittyabsandGitHub b2b97dddb0 Update get_started_with_model_registry.ipynb (#3174)
made numerous edits
2024-06-28 19:15:42 +00:00
800e92597c Add a notebook for MaMMUT (#3169)
* feat: Add a notebook for MaMMUT

* feat: Update CODEOWNERS

* fix: Remove unused import

---------

Co-authored-by: Ivy Wang <jiananwang@google.com>
2024-06-28 18:17:16 +00:00
skarukasandGitHub b895a348cc Add learning_rate_multiplier and output_dimensionality parameters to the text embedding tuning notebook. (#3165)
* Add learning_rate_multiplier and output_dimensionality to embedding tuning notebook.

* Reformat
2024-06-28 13:58:03 +00:00
Ivan NardiniandGitHub 4e2c698029 fix: update the torch sample on Ray on Vertex AI (#3131)
* review the torch rov notebook

* linter passed

* fix typos

* linter passed

* fix issue

* linter passed

* fix typos

* fix typos
2024-06-28 13:56:01 +00:00
cddfb9cb09 Featurestore notebook egen edited (#3167)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* fix: remove new changes

* Update vertex_ai_feature_store_based_llm_grounding_tutorial.ipynb

remove back ticks from product/feature names

* Update vertex_ai_feature_store_feature_view_service_agents.ipynb

remove back ticks

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-27 23:50:58 +00:00
Kathy YuandGitHub 510eb3855c Add Hex-LLM TPU deployment to Gemma, Code Gemma and Gemma 2 notebooks. (#3168)
* Add Hex-LLM TPU deployment to Gemma, Code Gemma and Gemma 2 notebooks.

* Fix linter issues.
2024-06-27 23:31:56 +00:00
ethan-gordonandGitHub 7a96949b68 Add vertex_ai_feature_store_iam_policy notebook. (#2913)
* Add vertex_ai_feature_store_iam_policy notebook.

* update CODEOWNERS

* Fix formatting of vertex_ai_feature_store_iam_policy.ipynb
2024-06-27 20:36:48 +00:00
KCFindstrandGitHub 2b0dd757d5 Switch movinet serving notebooks to use port 8080 (#3157) 2024-06-27 20:34:51 +00:00
Huguens JeanandGitHub 90c82b7b7b [MG Model Team] Cleanup cloudnerf gradio notebook outputs. (#3151) 2024-06-27 20:27:02 +00:00
praccu-googleandGitHub 8607144ed4 Add hugging face token to mixtral example colab. (#3158) 2024-06-27 20:24:50 +00:00
a8f9cbbaa6 fix, refactor(egen): fixes data import issue, includes pipeline job deletion, corrections from template. (#3150)
* <fix, refactor> fixed and refactored notebook according to the template

* Apply suggested edits from @kittyabs

* Apply suggested edits from @kittyabs

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-27 20:15:29 +00:00
b96dd105d9 chore,refactor(egen) : Added clean up code for deletion of model endpoint and local files, refactored code according to template guidelines, performed linter test (#3147)
* refractor(egen): refracted code according to template guidelines, performed linter test

* refractor(egen):  refracted code by removing os.getenv(IS_TESTING) in clean up code of bucket

* chore,refactor(egen):grammar check according to template guidelines, refactored the code by adding clean up code for deletion of local files created and model  endpoint and performed linter test.

* refactor(egen):refactored code by modifying clean up code and performed linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
2024-06-27 20:07:57 +00:00
6bd828833f refactor, chore(egen): Refactored code according to template guidelines (#3135)
* refactor, chore(egen): Refactored code according to template guidelines, performed linter test

* refactor, chore(egen): Removed vertexai SDK initiation at the beginning, performed linter test

* chore, fix: removes future tense(will), fixes workbench-specific dependency compatibility issue by fixing versions, removes Only at bucket creation, fixes categorical fields while encoding, adds comments in cleanup, adds project-id in gsutil command

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-27 20:03:44 +00:00
sumanvitaandGitHub 4d19f36d39 chore, refactor(egen) : changes file extension from .json to .yaml, refactored code as per template guidelines (#3146)
* fix, refactor, chore(egen): replaced .json to .yaml, refacted the code as per notebook template, performed linter test.

* refactor, chore(egen): Rephrases sentences, changes from google.cloud import aiplatform instead to import google.cloud.aiplatform as aip

* refactor(egen(egen): cleared cell output

* refactor, chore(egen): changes made as per PR comments, perfomed linter test
2024-06-27 20:02:21 +00:00
a877ca3501 fix,refactor,chore(egen): replaced np.float with np and K80 GPU with T4 GPU, refacted code as per template guidelines (#3138)
* fix,refractor,chore(egen): replaced np.float with np, refracted code according to template guidelines, performed linter test

* refractor(egen): refracted code according to template guidelines, performed linter test

* chore, fix: corrects/rewords some sentences, replaces K80 with T4

* chore(egen): spell check

* refactor, chore(egen): wording changes, contracts words like is not to is'nt, ran linter test

* refactor, chore(egen): rewording ,reintroduces import numpy as np in task.py

* fix(egen): removes delete_custom_folder variable in cleanup section

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-27 19:57:59 +00:00
fd1b0f8383 Featurestore notebook#3 (#3155)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* fix: remove new changes

* Update online_feature_serving_and_fetching_bigquery_data_with_feature_store_optimized.ipynb

made edits and also corrected the URL involving "pantheon", changing it to: https://console.cloud.google.com

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-27 18:27:55 +00:00
kittyabsandGitHub 4fe89b9849 Update online_feature_serving_and_fetching_bigquery_data_with_feature_store_bigtable.ipynb (#3164)
removed back ticks from product names
2024-06-27 18:20:31 +00:00
d973169c0c Featurestore notebook non egen (#3156)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* fix: remove new changes

* Update online_feature_serving_and_fetching_bigquery_data_with_feature_store_bigtable.ipynb

Some small edits, but mainly, I changed the URL that used "pantheon" to https://console.cloud.google.com,
Note: egen has not reviewed this notebook yet, so I didn't do a more detailed edit. Will do that once they've updated the notebook.

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-27 17:34:00 +00:00
47ef3e3f6c Featurestore notebook#2 (#3154)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* Update online_feature_serving_and_vector_retrieval_bigquery_data_with_feature_store.ipynb

some small edits

* fix: remove new changes

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-26 22:42:29 +00:00
d43c5fee3d chore, refactor(egen): follows new template, removes IS_TESTING, spell corrections (#3148)
* chore, refactor: follows new template, removes IS_TESTING in clean up, contracts words and some steps, spell correct, K80 to T4

* chore: addresses review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-26 22:34:35 +00:00
01317fda2a fix, chore, refactor(egen): Fix TF version, replace K80 with T4 etc. (#3143)
* chore, fix, refactor: template fixes, replace K80 with T4, remove IS_TESTING, reword some sentences and headings

* fix, refactor, feat, chore: replace K80 with T4, fix the TF version, template based fixes, remove local files in the clean up step

* chore: addresses review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-26 22:08:55 +00:00
sumanvitaandGitHub 7c91b6f354 refactor, chore(egen): Refactored code according to template guidelines, added code to delete job in cleanup section (#3139)
* refactor,chore(egen): refacted the code as per template guidelines, correct/reword some sentences, future tense removal

* refactor(egen): adds -p {PROJECT_ID} while creating bucket

* clears cell outputs

* refactor, chore(egen): removes extra spaces, changes does not to does'nt, performed linter test
2024-06-26 21:55:04 +00:00
3cff78caf0 refactor, chore, fix(egen): replace K80 with T4, template fixes (#3137)
* fix,refractor,chore(egen): refracted code according to template guidelines, performed linter testfixed and refactored notebook according to template

* refactor(egen): replaced the project_id with [you-project-id] according to template guidelines

* chore: template guideline fixes

* chore: corrects/rewords some sentences

* chore: minor markdown fixes

* chore(Egen):Done changes according to @kittyabs review and performed linter test.

* performed linter test

---------

Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-26 21:39:13 +00:00
a1bbe56d90 Featurestore notebook (#3152)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* Update online_feature_serving_and_vector_retrieval_bigquery_data_with_feature_store.ipynb

Made numerous edit and fixed "pantheon" link.

* fix: remove new changes

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-26 21:24:17 +00:00
39b48e8ef5 refactor(egen): Removes boilerplate, heading fixes, corrections from template. (#3126)
* <refactor> refactored notebook according to template

* Apply edits suggested by @kittyabs

* Apply suggested edits from @kittyabs review

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-26 21:22:34 +00:00
Eric DongandGitHub a992a7b185 Update README.md 6 (#3153)
Add more examples
2024-06-26 20:49:11 +00:00
Huguens JeanandGitHub 65baa52c6c [MG Model Team] Add checks to train and rendering job buttons in ZipNeRF gradio app. (#3133)
* [MG Model Team] Add checks to train and rendering job buttons in ZipNeRF gradio notebook.

* Clear output of all cells.

* Validate scene name in colmap workshop.
2024-06-26 12:54:36 +00:00
4615216bc2 Update training docker tag (#3145)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-06-26 12:42:24 +00:00
Kaushik KoiladaandGitHub 5b3510a634 refactor,fix,chore: rectifies the egen_fix/sdk_pytorch_torchrun_custom_container_training_imagenet notebook (#3142)
* chore: adds colab enterprise and updates styling for all the open in tabs

* chore: removes boilerplate and updates according to template

* refactor: changes Region to Location

* test: end to end notebook testing

* chore: removes wil

* end to end run successful. clearing outputs

* chore: lint test done

* chore: rearrage cell
2024-06-26 00:17:52 +00:00
nileshspringmlandGitHub 550c4208f3 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3124)
* Adapted code with updated template

* Tested end to end code and added required code

* Worked on the feedback given on PR

* Did required changes based on feedback given on PR
2024-06-26 00:15:55 +00:00
Kaushik KoiladaandGitHub cb149b0afd refactor,fix,chore: fixes error and refactors sdk_vector_search_create_stack_overflow_embeddings_vertex notebook according to template (#3108)
* chore: lint test

* chore, fix: lint run and fixes REGION issue
2024-06-26 00:13:42 +00:00
Rohith AllaandGitHub 5bced71ba5 refactore, chore (egen): Refactored code according to the notebook template (#3081)
* refactore, chore (egen): Refactored code according to the notebook template, performed linter test

* refactor, chore(egen): Reverted changes regarding IS_TESTING, performed linter test

* refactor, chore (egen): Removed reference to Tensorboard billing since it is not true anymore, performed linter test

* refactor, chore (egen): Rectified project ID, performed linter test

* refactor: Rectified service account variable

* chore: Performed linter test

* refactor, chore(egen): Updated comments in cleaning up section, performed linter test
2024-06-26 00:12:01 +00:00
Rohith AllaandGitHub 8410630e94 refactor, chore(egen): Refactored code according to template guidelines, performed linter test (#3134) 2024-06-25 17:24:03 +00:00
Eric DongandGitHub 1980ec9007 Update README.md 5 (#3118)
Add examples section
2024-06-24 23:00:24 +00:00
Kelsi LakeyandGitHub d8c8049d7e Remove incorrect pricing information about Vertex AI Tensorboard (#3057)
* Update comparing_local_trained_models.ipynb

Remove note stating Vertex TensorBoard is $300/month.
Update Create Tensorboard section to use default Tensorboard and init() method.

* Update comparing_local_trained_models.ipynb

* Update comparing_local_trained_models.ipynb

Update delete tensorboard section

* Update comparing_local_trained_models.ipynb
2024-06-24 13:13:51 +00:00
Aiden010200andGitHub 9c2cc6d39f Upload asynchronous prediction sample. (#3122)
* Upload examples of kfp v2

* Upload run experiment example.

* Upload batch prediction job sample.

* Update recycling of computing resources

Recycling computing resources after predictions.

* Upload missing file

Add delete endpoint func to recycle resources.

* Upload asynchronous prediction sample.

Upload asynchronous prediction sample of kfp v2.
2024-06-24 13:12:54 +00:00
41d482d65d Support A100-80GB for checking quota (#3119)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-06-24 13:11:19 +00:00
7132270fb2 chore, feat(egen): template fixes, adds clean up steps (#3117)
* chore, feat: template fixes, adds steps to remove training job, local files, and remove future tense and contract long words

* fix: replaces REGION with LOCATION while creating the bucket

* refactor: reduces the budget_milli_node_hours to 1000 from 8000

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-24 13:10:40 +00:00
64aa5a5c69 refactor, chore(egen): Replaces K80 with T4 GPUs, corrections from template. (#3115)
* <refactor, chore> refactored notebook according to template

* indentation fix

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-24 13:09:38 +00:00
nileshspringmlandGitHub 787e43df1b refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3114)
* Adapted notebook with new notebook template and removed unwated code.

* Did major changes in dockerfile

* Did minor changes in cleanup section
2024-06-24 13:08:42 +00:00
02bdc8e3cb fix, chore, refactor, feat(egen): Replaces K80 to T4, gcr with Artifact Registry etc. (#3111)
* fix, chore, refactor, feat: replaces K80 to T4, replaces gcr pushes to artifact registry pushes, template based fixes, clean up for local files, remove IS_TESTING

* fix: defines the IS_COLAB step before the condition

* fix: REGION is replaced by LOCATION while creating the artifact registry

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-24 13:07:48 +00:00
f4a703ea23 refactor, chore(egen): Fix broken links in Markdown cells, corrections from template. (#3110)
* <refactor, chore> refactored notebook according to template

* Apply suggested edits from @kittyabs review

* lint fix

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-24 13:05:29 +00:00
Rohith AllaandGitHub 30b02b94f5 refactor, chore(egen): Replaced TESLA_V100 with TESLA_T4 and refactored the notebook with template notebook (#3107)
* refactor, chore(egen): Replaced TESLA_V100 with TESLA_T4 and refactored the notebook with updated template, performed linter test

* Refactor, chore(egen): Made few markdown changes,REGION > LOCATION, performed linter test
2024-06-24 13:04:16 +00:00
nileshspringmlandGitHub e87e3c39be refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3094)
* Updated notebook template

* Code fix related to variable TIMESTAMP, added project set for colab

* Updated tensorflow library and exuection of prediction code in VPC network

* Perfomred lint test of code

* Did minro changes regarding os.getenv

* Fixed issue based on feedback on PR
2024-06-24 13:03:03 +00:00
220382d41f fix, refactor, chore(egen): Fix model deployment to endpoint using Deployment Resource Pool, Replaces K80 with T4 GPUs, Documentation link update, corrections from template. (#3093)
* <fix, chore, refactor> refactored notebook according to template

* lint fix

* Apply suggested edits from @kittyabs review

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-24 13:01:47 +00:00
nileshspringmlandGitHub 2347cc4b7d refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3101)
* Did required changes in prediction/llm_streaming_prediction.ipynb. Additionally, note that code is not executed as it may requried huge resources.

* Removed hardcoded project name

* Updated REGION to LOCATION

* Updated notebook template

* Removed unwated library and addded required variable to delete resources

* Removed unwated comment as it was creating issue with linter test
2024-06-24 12:59:38 +00:00
dc07492d8d Support A100 80GB (#3129)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-06-24 12:58:45 +00:00
ebd738e863 fix, refactor, chore(egen): Fix TF version support, template format (#3120)
* refactor(egen): Refactored code according to the template guidelines

* fix, refactor: fixes the compatible tf version and removes unnecessary import in the clean up step

* fix: adds matplotlib in the installation step

---------

Co-authored-by: rohith-egen <rohith.alla@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-21 21:11:43 +00:00
Huguens JeanandGitHub 19973ced06 [MG Model Team] Add CamP ZipNeRF Gradio application notebook to model garden. (#3121)
* [MG Model Team] Add CamP ZipNeRF Gradio application notebook to model garden.

* [MG Model Team] Add CamP ZipNeRF Gradio application notebook to model garden.

* [MG Model Team] Add CamP ZipNeRF Gradio application notebook to model garden.

* [MG Model Team] Add CamP ZipNeRF Gradio application notebook to model garden.
2024-06-21 21:10:41 +00:00
KCFindstrandGitHub bc2960fcce Update the server port in model_garden_keras_stable_diffusion.ipynb (#3128) 2024-06-21 21:08:23 +00:00
lee1premiumandGitHub 421ec0dc26 feat: Use pipeline_job_name from a tuning result. (#3127)
* feat: Use pipeline_job_name.

* feat: Use pipeline_job_name.
2024-06-21 21:07:58 +00:00
8eb2aa93d5 Add new model Claude 3.5 Sonnet and update regions for other models (#3112)
* add new model and update region for others

* fix minor error

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-06-20 18:22:34 +00:00
sefgsefgandGitHub 3947a8bc24 Upload torch transformers predictor sample (#3087)
This sample uses the aiplatform SDK and torch library to implement transformers predictor.
2024-06-20 12:39:50 +00:00
Eric DongandGitHub 022e1c8ee7 Update README.md 4 (#3104)
Add Get started section
2024-06-18 21:47:37 +00:00
cec3f9dd55 refactor: refactor llama3 deployment nb (#3100)
Co-authored-by: Rayan Dasoriya <dasoriya@google.com>
2024-06-18 12:36:46 +00:00
70ebb04f06 Update llama3 finetuning notebook to use 4 A100s instead of 8 (#3105)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-06-18 12:31:42 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fd21267d70 chore(deps): bump scikit-learn (#3106)
Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 1.3.2 to 1.5.0.
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/1.3.2...1.5.0)

---
updated-dependencies:
- dependency-name: scikit-learn
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 12:31:00 +00:00
Eric DongandGitHub 77e0230eb8 Update README.md 3 (#3103)
Add usage section
2024-06-17 14:51:12 +00:00
8895075d28 chore: renames 'matching_engine' to 'vector_search' and 'Matching Engine' to 'Vector Search' (#3096)
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-17 12:40:24 +00:00
Katie NguyenandGitHub f381ae9817 feat: add colab enterprise link format to script (#3097) 2024-06-17 12:37:28 +00:00
Mend RenovateandGitHub 0b623038fa chore(deps): update dependency flake8 to v7.1.0 (#3099) 2024-06-17 12:36:41 +00:00
7cd354436e chore, refactor, fix, feat(egen): template structure+K80GPU+contract words+clean up (#3085)
* chore, refactor, fix, feat: template structure, removes redundant code, contracts content, replaces K80 with T4, cleans up local files

* chore,chore, fix: addresses review comments+ sets replica=1,accelerator_count=4

* fix, chore: reduces the GPU count to 1, rewords the title

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-14 21:12:17 +00:00
Eric DongandGitHub d7c334353c Update README.md 2 (#3091)
Continued to update README.
2024-06-14 17:10:37 +00:00
kittyabsandGitHub ba80e59b1e Update tensorboard_vertex_ai_pipelines_integration.ipynb (#3036)
* Update tensorboard_vertex_ai_pipelines_integration.ipynb

added colab enterprise link and icon. Deleted <br> line, too

* Update tensorboard_vertex_ai_pipelines_integration.ipynb

fixed - added missing .ipynb
2024-06-14 14:23:43 +00:00
62b3f0af1b Update llama3 finetuning notebook (#3090)
* Update llama3 finetuning notebook

* Update model_garden_pytorch_llama3_finetuning.ipynb

fix linter issue

* Update model_garden_pytorch_llama3_finetuning.ipynb

Remove unnecessary metadata

---------

Co-authored-by: minwoopark <minwoopark@google.com>
2024-06-13 23:54:58 +00:00
bd10dede25 refactor(egen): follows new template+sentence and other minor corrections (#3073)
* chore: restructures according to template, contracts text and cells, organizes headings

* refactor: removes the IS_TESTING conditions for steps involving redis instance

* chore: addresses review comments

* fix: adds back the IS_TESTING conditions for redis commands to skip in the test environment

* chore: removes duplicate comment

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-13 20:52:43 +00:00
7e8bf8a126 fix, refactor, chore(egen): follows new template, adds dataflow enable step, refactor (#3089)
* Updated template of notebook

* fix, refactor, chore: follows new template, adds dataflow enable step, cleanup steps for files, removes IS_TESTING in cleanup, REGION==>LOCATION

* chore: addresses the review comments

---------

Co-authored-by: nileshspringml <nilesh.mahajan@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-13 20:36:50 +00:00
nileshspringmlandGitHub 847d38642c refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3086)
* Did required changes in notebook template

* Service account permission changed as we don't need admin level access for this notebook

* Fixed issue based on PR feedback
2024-06-13 20:31:07 +00:00
Gary WeiandGitHub 697a4c6e88 Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook. (#3082)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.

* Update Gradio notebook to use the latest Gradio version and fix some bugs.

1. Update Gradio version to 4.29.0, as it complains 3.50.0 is too old.
2. Uninstall nest-asyncio and uvloop as a workaround to b/339301920 and https://github.com/gradio-app/gradio/issues/8238#issuecomment-2101066984.

* Resolve merge conflict.

* minor updates.

* minor updates.

* Merge some SD notebook in g3 and github.

* Remove the unused variable in the controlnet notebook.

* minor updates.

* include the SD1.5 dreambooth notebook.

* Include the sd1.5 dreambooth notebook.

* Improve the stable diffusion dreambooth tuning CUJ in the Gradio notebook.

* minor update.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.
2024-06-13 14:01:39 +00:00
f5c17c0700 refactor, chore, feat(egen): contracts content, steps & template based fixes (#3075)
* refactor, chore, feat: removes/contracts long explanations, template based fixes, adds step to remove locally generated files

* fix: adds the missing import, replaces code markdown with bold style at some places

* fix: replaces REGION with LOCATION

* chore: addresses review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-12 22:37:30 +00:00
0e662eca2b refactor, chore(egen): Uses gcloud builds for building and pushing image to artifact registry, Removes boilerplate, heading fixes, and other corrections from template (#3074)
* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor,chore> refactored notebook according to template

* <refactor,chore> refactored notebook according to template

* fix for  docker repository creation in PR test environment

* <included IS_TESTING condition for docker repository

* lint fix

* Apply suggested edits from @kittyabs review

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-12 17:28:01 +00:00
Eric DongandGitHub d339690a4b Update README.md (#3088)
Update the overview with link to generative-ai repo
2024-06-12 17:08:54 +00:00
Mend RenovateandGitHub 134a6221e6 chore(deps): update dependency pyupgrade to v3.16.0 (#3066) 2024-06-11 19:14:25 +00:00
kittyabsandGitHub e79c4b5caa Update get_started_with_pytorch_rov.ipynb (#3034)
Update colab enterprise logo
2024-06-11 19:13:18 +00:00
Kathy YuandGitHub 535a6232d3 Remove legacy Llama 2 notebook. (#3083) 2024-06-11 19:11:11 +00:00
KCFindstrandGitHub f49e09698e Fix broken links in model garden notebooks (#3077)
* Fix broken links in notebooks

PiperOrigin-RevId: 641077957

* Revert llama3 deployment notebook change
2024-06-11 19:10:16 +00:00
Gary WeiandGitHub 792e3b16a5 Update the diffusers serving docker image to 20240605_1400_RC00 to resolve vulnerabilities. (#3079)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates

* Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards.

* Sync Colab notebooks between g3 and github.

* format changes

* format update.

* Improve the SDXL-dreambooth-lora finetune notebook CUJ.

* Update the diffusers serving docker image version to `20240605_1400_RC00` to resolve vulnerabilities.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.

* Add dreambooth-lora-sdxl task for SDXL base model in the dreambooth finetune Gradio notebook.
2024-06-11 19:09:30 +00:00
Kaushik KoiladaandGitHub fbcf3b4cc8 chore, refactor(Egen): restructure from template, remove boilerplate, and fix notebook (#3068)
* chore: updates copyright text, adds colab enterprise and for

* chore: removes boilerplate and changes colab authentication and get started section

* refactor: removes IS_TESTING and other test code

* refactor: removes IS_TESTING and other test code

* chore: clear all outputs and linter reformatting

* chore: removes code added for testing and other fixes

* chore: runs lint

* fix: fixes testing induced bug

* chore: review comments with header and copyright changes addressed
2024-06-11 18:27:36 +00:00
ac8f7ad196 chore, fix, feat(egen): follows template + fix docker run + adds clean up (#3072)
* chore, fix: restructures as per template, rewords some sentences, removes sudo in the option docker run

* feat: adds clean up step for local files

* chore: reverts lowercase to camelcase for artifact registry and other review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-11 18:06:50 +00:00
Kaushik KoiladaandGitHub 4e21510eeb refactor, chore, fix (Egen) : removes boilerplate and fixes notebook pytorch_train_deploy_models_with_prebuilt_containers.ipynotebook (#3070)
* chore: updates the license

* chore: formats run in buttons and adds colab enterprise link

* chore: removes code font for names of products

* refactor: removes boilerplate and edits aiplatform initialization cell order

* fix: changes naming of app to deal with setup changing tar.gz file to canonical name and gsutil command not able to find it

* chore: linter run

* chore: edit all the future tense sentences

* chore: updates review comments
2024-06-11 18:01:11 +00:00
Rohith AllaandGitHub 04059ebadb refactor(egen): Refactored the Custom tabular bq managed dataset code as per template guidelines (#3053)
* refactor: Refactored custom-tabular-bq-managed-dataset code according to the template notebook

* refactor: Included markdown code in the beginning of the license cell to make it collapsible

* chore: linter test

* refactor, chore: Updated markdown according to the updated notebook template and performed linter test

* chore: Grouped all the imports present in the notebook

* chore: linter test

* refactor, chore(egen): REGION is replaced with LOCATION, linter test
2024-06-11 17:53:12 +00:00
Kaushik KoiladaandGitHub acb4fbb684 refactor, fix, chore(Egen): changes and refactors the get_started_vertex_training_xgboost.ipynb notebook (#3069)
* chore: updates license information, adds colab enterprise, and reformats run buttons

* chore: 'will' replaced appropriately

* chore: updates region and removes boilerplate

* fix: corrects the argument at pip install

* refactor: refactoring the cells for end to end functionality

* chore: changes verbiage in bucket creation

* chore: linter test done

* refactor: rearrage cell order for aiplatform initialization

* chore: review comments addressed

* chore: review comments addressed
2024-06-11 17:48:44 +00:00
Rohith AllaandGitHub 32934925f6 refactor(egen): Refactored custom batch prediction feature filter code according to template guidelines (#3052)
* refactor: Refactored custom_batch_prediction_feature_filter code according to the template notebook

* refactor: Updated markdown according to the updated notebook template and did linter test

* chore: Modified code according to updated template

* chore: linter test

* refactor, chore(egen): REGION is replaced with LOCATION, linter test
2024-06-11 17:40:16 +00:00
Rohith AllaandGitHub daab623cac refactor, chore: Updated markdown according to the updated notebook template and performed linter test (#3063) 2024-06-07 23:12:01 +00:00
Rohith AllaandGitHub dad35742de fix, refactor(egen): Replaced tf2-gpu.2-5 with tf2-gpu.2-6, Refactored the code as per template guidelines (#3064)
* refactor: Updated markdown according to the updated notebook template

* refactor, chore: Added colab enterprise logo url and performed  linter test

* refactor, chore: Reverted back the max trail count and parallel trail count values, performed linter test
2024-06-07 21:30:06 +00:00
Rohith AllaandGitHub f7b49ebb40 refactor(egen): Refactored the Autosxs check alignment against human preference data code as per template guidelines (#3062)
* refactor, chore: Updated markdown according to the updated notebook template and performed linter test

* Revert "refactor, chore: Updated markdown according to the updated notebook template and performed linter test"

This reverts commit c91fa09431.

* refactor, chore: Updated markdown according to the updated notebook template and performed linter test
2024-06-07 21:24:53 +00:00
nileshspringmlandGitHub 95ffea1915 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3058)
* Did all the required changes in notebook

* Added below comments:
# @title Copyright & License (click to expand)

* Upadated the template of notebook

* Fixed issue based on the feedback given on PR
2024-06-07 21:20:07 +00:00
nileshspringmlandGitHub 7e6122a50d refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3046)
* refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template

* Added Below line in comments:
# @title Copyright & License (click to expand)

* Fixed issue in notebook based on feedback given by reviewer in PR

* Fixed issue based on feedback given on PR
2024-06-07 21:15:20 +00:00
7afdeb05f5 chore, fix(egen): corrections from template, guidelines, & fixes docker tag command (#3031)
* chore: replaces K80 with T4, Cloud ML with Vertex AI, REGION with LOCATION, restructures from template, & removes future tense

* fix: fixes the docker tag command for colab

* chore, fix: addresses the review comments, tf is pinned to 2.15.1 as the latest tf causes issues

* chore: replaces of with or

* chore: removes the collapsed license comment

* fix: removes the test env specific package update step and contracts the installations into one step to keep tf as 2.15

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-07 21:10:09 +00:00
2df29ec118 chore, fix(egen): restructuring from template, markdown corrections & dataset object fix (#3028)
* chore: restructures according to the template, removes future tense, removes IS_TESTING, unused imports

* chore, fix: addresses the review comments, converts npy array to list for running in py-3.9

* chore: adds --it's-- in the sentence

* chore: Getting started -->  Get started

* chore: removes the collapsed license comment

* fix: extracts list from numpy objects instead of Dataset object

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-07 20:58:54 +00:00
nileshspringmlandGitHub c2cd389201 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3020)
* Completed code fixing for file prediction/pytorch_image_classification_with_prebuilt_serving_containers.ipynb. Please note that we need to execute file end to end.

* Added Colab Enterprice link and testead once again with different environment as previously it was throwing an expecption of  libraries

* Added below comment:
# @title Copyright & License (click to expand)

* Fixed issue in notebook based on feedback given by reviewer in PR

* Fixed issue based on feedback give on PR
2024-06-07 20:54:10 +00:00
nileshspringmlandGitHub b30a230d1d refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3019)
* Fix code of file prediction/get_started_with_raw_predict.ipynb

* Added link of Colab Enterprise

* Updated create bucket command because it requried those changes to execute in google colab notebook

* Removed IS_TESTING environment variable

* Added below comment in notebook:
# @title Copyright & License (click to expand)

* Fixed issue in notebook based on feedback given by reviewer in PR

* Fixed issue based on the feedback given on PR
2024-06-07 20:51:24 +00:00
Aiden010200andGitHub c5be708d45 Update func of computing resources recycling (#3043)
* Upload examples of kfp v2

* Upload run experiment example.

* Upload batch prediction job sample.

* Update recycling of computing resources

Recycling computing resources after predictions.

* Upload missing file

Add delete endpoint func to recycle resources.
2024-06-07 12:39:33 +00:00
Gary WeiandGitHub bc577d9f79 Improve the SDXL-dreambooth-lora finetune notebook CUJ. (#3055)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates

* Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards.

* Sync Colab notebooks between g3 and github.

* format changes

* format update.

* Improve the SDXL-dreambooth-lora finetune notebook CUJ.
2024-06-07 12:36:14 +00:00
KCFindstrandGitHub 1fcafd3364 Fix accelerator_type variable name case in quota checks (#3061)
PiperOrigin-RevId: 640634353
2024-06-07 12:34:21 +00:00
be31756dac refactor, chore(egen): Claude documentation link update, Text explanations for required cells and other corrections from template (#3027)
* <refactor> refactored notebook according to template

* <refactor> refactored notebook according to template

* <refactor> refactored notebook according to template

* <refactor>: refactored notebook according to new notebook template

* <refactor>: refactored notebook according to new notebook template

* <refactor>: refactored notebook according to new notebook template

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-06 23:03:34 +00:00
868e49224b refactor(egen): Removes boilerplate, heading fixes, and other corrections from template (#3026)
* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored code according to new notebook template

* <refactor>: refactored notebook according to new notebook template

* <refactor>: refactored notebook according to new notebook template

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-06 23:01:07 +00:00
nileshspringmlandGitHub 32caaaa7d9 Updated notebook template (#3059)
* Updated notebook template based on google team comment on PR

* Removed unwated comment line from notebook
2024-06-06 13:12:57 +00:00
Rohith AllaandGitHub 521f58b7e6 refactor(egen): Refactored Text embedding api semantic search with scann code according to template guidelines (#3024)
* <refactor>: Refactored text_embedding_api_semantic_search_with_scann code according to the notebook template

* chore: linter test

* refactor: Modified colab enterprise logo url and made necessary changes according to the updated notebook template

* chore: linter test
2024-06-05 20:59:54 +00:00
030024cc51 refactor, chore, fix(egen): GPU usage fixes, template & markdown fixes (#3050)
* refactor, chore, fix: replaces K80 with T4, fixes to follow the template, fixes to utilize the defined accelerators while training

* chore: addresses the review comments

---------

Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-05 20:51:27 +00:00
Rohith AllaandGitHub dc38b9e0f9 refactor(egen): Refactored text embedding new api code according to the template guidelines (#3051)
* refactor: Refactored text_embedding_new_api code according to the template notebook

* refactor: Modified colab enterprise logo url and made necessary changes according to the updated notebook template
2024-06-05 20:12:57 +00:00
Amy WuandGitHub cd95c35cc2 remove data science package samples since they are deprecated (#3056) 2024-06-04 23:49:20 +00:00
4e04f7d166 Template vertex ai (#3054)
* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

added colab enterprise logo and link

* Update build_model_experimentation_lineage_with_prebuild_code.ipynb

hope I fixed the JSON issue

* Update notebook_template.ipynb

- changed "Getting Started" to "Get started" to be in compliance with style guide
- added "for Python" to "Vertex AI SDK" to be in compliance with product guidelines

* fix: reset changes

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-04 18:02:17 +00:00
bc14b3fa05 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3045)
* <refactor>: refactored code according to notebook template

* <refactor> refactored notebook according to template

---------

Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
2024-06-04 08:20:36 +00:00
db9c182716 refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template (#3021)
* refactor: removes boilerplate code, future tenses, and fixes heading styles

* chore: replaces REGION with LOCATION to match the notebook template

* chore: markdown heading fixes according to guidelines

---------

Co-authored-by: rohith-egen <rohith.alla@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-03 23:48:13 +00:00
Rohith AllaandGitHub c240cf6a34 refactor(egen): Refactored the code as per template guidelines (#3015)
* refactored code according to template notebook

* refactored code according to template notebook
2024-06-03 23:46:29 +00:00
lee1premiumandGitHub 78d2d46f80 fix: Comment on Vertex AI workbench. (#3049)
* fix: Comment on Vertex AI workbench.

* fix: Comment on Vertex AI workbench.
2024-06-03 20:04:53 +00:00
54ae9a17b2 chore(egen): removes future tense, adds colab enterprise link, and colab only steps (#3025)
* chore: updates the notebook according to the latest template

* chore: linter test

* refactor: removes IS_TESTING, and os import

* ran linter test using linter.sh

---------

Co-authored-by: rohith-egen <rohith.alla@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-03 18:24:18 +00:00
kittyabsandGitHub 9251100d25 Update get_started_with_model_registry.ipynb (#3047)
updated icon url: https://cloud.google.com/ml-engine/images/colab-enterprise-logo-32px.png
2024-06-03 18:05:06 +00:00
eccecc8e2b Update ray_cluster_management.ipynb (#3033)
* Update ray_cluster_management.ipynb

Updated logo for Colab Enterprise

* fix: change accelerator type

* fix: alter accelerator type

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-06-01 20:48:18 +00:00
263dba54bc fix, refactor(egen): Replaces K80 with T4 GPUs, corrections from template (#3013)
* fix: n1-standard-8 changed to n1-standard-16 and Tesla K80 changed to Tesla T4 + refactored code according to the template

* refactor: keeping the machine types same. Original issue with the K80 accelerators as they're no longer supported

---------

Co-authored-by: rohith-egen <rohith.alla@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
2024-06-01 00:15:24 +00:00
86243a1cb7 chore: Refactor the instructions in model_monitoring_v2 notebooks (#3023)
Co-authored-by: SereniCode <binbinf@google.com>
2024-05-31 23:40:23 +00:00
kittyabsandGitHub dd7c60acff Update tensorboard_hyperparameter_tuning_with_hparams.ipynb (#3037)
Add colab enterprise link and logo
2024-05-31 23:24:01 +00:00
kittyabsandGitHub 6901cd24e5 Update tensorboard_profiler_custom_training_with_prebuilt_container.ipynb (#3038)
added colab enterprise link and logo
2024-05-31 23:21:50 +00:00
kittyabsandGitHub 3dae9238f5 Update notebook_template.ipynb (#3029)
update enterprise logo
2024-05-31 23:15:54 +00:00
kittyabsandGitHub 4e8bfb88b3 Update model_garden_gemma_fine_tuning_batch_deployment_on_rov.ipynb (#3032)
update colab enterprise icon
2024-05-31 23:14:54 +00:00
kittyabsandGitHub b6b921ef68 Experiments delete outdated experiments (#3041)
* Update tensorboard_custom_training_with_custom_container.ipynb

added colab enterprise link and logo

* Update comparing_local_trained_models.ipynb

Added colab enterprise logo and link. Also made some edits.

* Update delete_outdated_tensorboard_experiments.ipynb

Updated Colab Enterprise logo
2024-05-31 23:01:12 +00:00
kittyabsandGitHub faf68b59bb Update delete_outdated_tensorboard_experiments.ipynb (#3042)
updated colab enterprise logo
2024-05-31 22:57:11 +00:00
f9351c0e0b Update get_started_with_model_registry.ipynb (#3030)
* Update get_started_with_model_registry.ipynb

add colabe enterprise link

* fix: remove extra line break elements

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-05-31 22:51:24 +00:00
kittyabsandGitHub 921b1be406 Update get_started_with_model_registry.ipynb (#3022)
small edits.
2024-05-30 20:01:30 +00:00
Yichen ZhouandGitHub a0ed217801 Create TimesFM notebook for Vertex Model Garden (#3017)
* feat: Create TimesFM notebook.

* fix: updated CODEOWNER of TimesFM notebook

* fix: remove empty line in CODEOWNERS

* Removed unused import inside TimesFM notebook.

* fix: remove unused import and re-format
2024-05-30 18:50:16 +00:00
Tianrui YangandGitHub 8bed394caf fea: upgrade to v1 API in feature store llm grounding tutorial. (#3009)
* Upgrade to v1 API in feature store llm grounding tutorial.

* Sleep for 5min before starting serving to wait for DNS to be ready.

* use data_key in fetch request
2024-05-30 12:44:30 +00:00
c306cfaae1 Add common util functions for notebooks. (#3014)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-05-29 15:23:59 +00:00
fe97c65ea4 Update Gemma and PaliGemma notebooks (#3007)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-05-28 19:35:32 +00:00
Katie NguyenandGitHub 9d0ec7cc62 fix: update colab enterprise link (#3012) 2024-05-28 19:33:43 +00:00
de5146905c fix declare -x AUTO_PROXY="https://proxyconfig.corp.google.com/proxy.pac" (#3011)
declare -x CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES="1600x1200,3840x2160,3840x2560,5120x1440,2160x3840"
declare -x COLORTERM="truecolor"
declare -x CVS_RSH="ssh"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/809963/bus"
declare -x GOOGLE_CLOUD_DISABLE_DIRECT_PATH="truen"
declare -x HISTCONTROL="ignoredups"
declare -x HOME="/usr/local/google/home/minwoopark"
declare -x LANG="en_US.UTF-8"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LOGNAME="minwoopark"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:"
declare -x MOTD_SHOWN="pam"
declare -x OLDPWD="/tmp/vertex-ai-samples"
declare -x P4CONFIG=".p4config"
declare -x P4MERGE="/google/src/files/head/depot/eng/perforce/mergep4.tcl"
declare -x PARINIT="rTbgqR B=.?_A_a Q=_s>|:"
declare -x PATH="/usr/local/google/home/minwoopark/.local/bin:/usr/lib/google-golang/bin:/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/tmp/vertex-ai-samples/notebooks/community/model_garden"
declare -x PYTHONPATH="/usr/local/buildtools/current/sitecustomize"
declare -x RSYNC_RSH="ssh"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SK_SIGNING_PLUGIN="gnubbyagent"
declare -x SSH_AUTH_KEY=$'ecdsa-sha2-nistp256-cert-v01@openssh.com AAAAKGVjZHNhLXNoYTItbmlzdHAyNTYtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgazEAFZ2eo797Q/VO6uG2HkkShArEPHLKfyjKs/qYq0cAAAAIbmlzdHAyNTYAAABBBJQ0tXAyF9ZYMb4PE8Ev0Qsmg94oZ0skXvnuEHewktkb5R0Iq/01UbI5EC+g4ivkVsT1BEWkfEvK5mkVBYQkKpcZAAAADCmtRAAAAAEAAAAabWlud29vcGFya0Bjb3JwLmdvb2dsZS5jb20AAAAjAAAACm1pbndvb3BhcmsAAAARZ29vZ2xlXG1pbndvb3BhcmsAAAAAZlX9cQAAAABmVxfdAAAAAAAAAMwAAAAYY2VydC1tZXRhZGF0YUBnb29nbGUuY29tAAAAKgAAACYIARIgB1wlRexvZHwhV2JNrjQ1fgtUHfbXqyGq0FjDNs8V9lUgBgAAABVwZXJtaXQtWDExLWZvcndhcmRpbmcAAAAAAAAAF3Blcm1pdC1hZ2VudC1mb3J3YXJkaW5nAAAAAAAAABZwZXJtaXQtcG9ydC1mb3J3YXJkaW5nAAAAAAAAAApwZXJtaXQtcHR5AAAAAAAAAA5wZXJtaXQtdXNlci1yYwAAAAAAAAAAAAABFwAAAAdzc2gtcnNhAAAAAwEAAQAAAQEAvN0ZS5b1OZYtoJ1PSKY4GIwjis1i4zZZ2MBdN/TEYqJIOVsfAtkDrhC9YGSVuyai/kOXwLLnFc5dVDRWHLDSBzoXEgl4QKCmNu9nneV/cMLEq4d03o1DPOSPQGJDq+wep4K9HuRwvzog6wTDA5Kp0loCnWY8MHTbt4S/O2Ro5mvF0x0ec9vccwW1KOtc/CydQiGmevBZOQOyXt8ZCZKEtSOTIPhAE55WK8agtMEsJlHRtcswSg2BJNJMSeUKgL1An/oCE9bKAME/zXVYVK5Fuv4epqccnd3sQW2T8qniOIcEDI4oybDejm6G8VPw/pxieSPbaFGftuLyR/rHS52OhwAAARQAAAAMcnNhLXNoYTItMjU2AAABAB6848edrFMkVv7srR+12gWCcYsAXadttaF9VBNSK7AojCKPQC5axHjdfmGQHkc6FDj5x76wFhW2QoBWF6EEullMA/BBYtUeOYYrRwIQxvG2EshSl6Qyx1JW9RmClgEQa13JDNS+sHaGih0TK/+h1Cll3WcGYL5bSlTjyI4QX9gcoTA12Ctd01xKiMuXTscx+IMw8nyl9hQQ4eucc4FW130gRglHBdqH9VNjPgFXnoffXfC8P7kBKhPfVk9CjNWl3VN7LwEvFXAT40EBqFeK/b+2pKTL9lDEeUkXxDCz39GHWBu8BYd186GVjjjF8hgK01I90/xGldt/cORgorzziko=\n'
declare -x SSH_AUTH_SOCK="/tmp/ssh-XXXXFPQFEs/agent.634059"
declare -x SSH_CLIENT="172.253.30.128 55315 22"
declare -x SSH_CONNECTION="172.253.30.128 55315 192.168.3.61 22"
declare -x SSH_TTY="/dev/pts/1"
declare -x TERM="xterm-256color"
declare -x USER="minwoopark"
declare -x X20_HOME="/google/data/rw/users/mi/minwoopark"
declare -x XDG_DATA_DIRS="/usr/share/gnome:/usr/local/share/:/usr/share/"
declare -x XDG_RUNTIME_DIR="/run/user/809963"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_ID="c45"
declare -x XDG_SESSION_TYPE="tty"
declare -x service_endpoint="aiplatform.googleapis.com" error

Co-authored-by: minwoopark <minwoopark@google.com>
2024-05-28 16:41:55 +00:00
kittyabsandGitHub dd8d7946c4 Tensorboard-intro-4 (#2999)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* update url to /tensorboard-introduction
2024-05-24 14:14:45 +00:00
kittyabsandGitHub 37c0c2c373 Tensorboard-intro-3 (#2997)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* Update URL to point to /tensorboard-introduction
2024-05-24 14:14:13 +00:00
Tianrui YangandGitHub 974c3e866c Update embedding column type to float (#3006) 2024-05-24 14:13:20 +00:00
Kathy YuandGitHub d5b6b42615 Fix GCS bucket handling code in Mixtral deployment notebook. (#3008) 2024-05-24 14:12:49 +00:00
186e886edf feat: add model_monitoring_v2 notebooks (#2988)
Co-authored-by: SereniCode <binbinf@google.com>
2024-05-23 17:28:19 +00:00
Gary WeiandGitHub f597680d44 Improve the stable diffusion dreambooth tuning CUJ in the Gradio notebook: (#3004)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.

* Update Gradio notebook to use the latest Gradio version and fix some bugs.

1. Update Gradio version to 4.29.0, as it complains 3.50.0 is too old.
2. Uninstall nest-asyncio and uvloop as a workaround to b/339301920 and https://github.com/gradio-app/gradio/issues/8238#issuecomment-2101066984.

* Resolve merge conflict.

* minor updates.

* minor updates.

* Merge some SD notebook in g3 and github.

* Remove the unused variable in the controlnet notebook.

* minor updates.

* include the SD1.5 dreambooth notebook.

* Include the sd1.5 dreambooth notebook.

* Improve the stable diffusion dreambooth tuning CUJ in the Gradio notebook.

* minor update.
2024-05-23 17:10:40 +00:00
Gary WeiandGitHub 51315ecb2f sync the colab notebooks between g3 and github. (#3003)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates

* Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards.

* Sync Colab notebooks between g3 and github.

* format changes

* format update.
2024-05-23 17:08:23 +00:00
KCFindstrandGitHub 4a16d19cec Reformat llama3 deployment notebook and add quota check (#3001) 2024-05-23 17:07:50 +00:00
kittyabsandGitHub 452c77adb8 Ray-on-vertex-ai-public-access (#3002)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* Addresses a feature request regarding the "warning" when using public access
2024-05-22 22:40:37 +00:00
lee1premiumandGitHub 558e6eed88 feat: Getting Tuned Text-Embeddings tutorial. (#3000)
* feat: Getting Tuned Text-Embeddings tutorial.

* feat: Getting Tuned Text-Embeddings tutorial.

* feat: Getting Tuned Text-Embeddings tutorial.
2024-05-22 21:03:44 +00:00
kittyabsandGitHub 82f32efc30 Tensorboard-intro-2 (#2996)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* updated URL to point to tensorboard-introduction (and not "overview")

* change URL to /tensorboard-introduction
2024-05-21 23:38:53 +00:00
kittyabsandGitHub 4d2ea0d50f Tensorboard-introduction (#2994)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* updated URL to point to tensorboard-introduction (and not "overview")
2024-05-21 20:45:18 +00:00
Manu KumarandGitHub c81c195d46 fix: use renamed create_feature_view() function in embedding notebook (#2993)
Increase sleep for DNS propagation to pass CI.
2024-05-21 20:43:19 +00:00
11d7c6dd7e Add checks to ensure the artifacts are copied to user bucket. (#2992)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-05-21 12:30:21 +00:00
Gary WeiandGitHub 8bb6aa592a Merge a few SD notebooks in g3 and github (#2989)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.

* Update Gradio notebook to use the latest Gradio version and fix some bugs.

1. Update Gradio version to 4.29.0, as it complains 3.50.0 is too old.
2. Uninstall nest-asyncio and uvloop as a workaround to b/339301920 and https://github.com/gradio-app/gradio/issues/8238#issuecomment-2101066984.

* Resolve merge conflict.

* minor updates.

* minor updates.

* Merge some SD notebook in g3 and github.

* Remove the unused variable in the controlnet notebook.

* minor updates.

* include the SD1.5 dreambooth notebook.

* Include the sd1.5 dreambooth notebook.
2024-05-21 12:29:32 +00:00
Gary WeiandGitHub f5409efb30 Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards. (#2986)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates

* Delete the two deprecated SD1.5 and 2.1 notebooks, as they were no longer referenced on any model cards.
2024-05-21 12:27:59 +00:00
Manu KumarandGitHub 9fed51d88a fix: use renamed create_feature_view() function in optimized notebook (#2944)
Fx colab parameter usage - the linting/auto-format placed some variables
across multiple lines which doesn't work in colab. Make the FOS ID names
shorter to avoid this issue.

Also fix some usage for getting FOS - this can be done directly using
SDK constructor.

Set PSC allow list project to current project.

Increase sleep for DNS propagation to pass CI.
2024-05-16 19:41:07 +00:00
Huguens JeanandGitHub 5005b580d6 [Model Garden Team] Fix Gemma linter issue. (#2983)
* [Model Garden Team] Fix Gemma linter issue.

* [Model Garden Team] Fix Gemma linter issue.

* Update model_garden_gemma_evaluation.ipynb

* Update model_garden_gemma_evaluation.ipynb
2024-05-15 22:25:54 +00:00
dstnluong-googleandGitHub 80707d319d Fix Gemma finetuning notebook typo again. (#2984)
PiperOrigin-RevId: 634030805
2024-05-15 19:34:01 +00:00
Gary WeiandGitHub b630f8d5f0 Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks. (#2975)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.

* Parameterize the "show_debug_logs" to facilitate automatic test of the Gradio notebooks.

* Lint format.

* minor updates
2024-05-15 16:34:58 +00:00
Michael HuandGitHub 4fc807c570 Import AutoSxS pipeline from v1 directory (#2973) 2024-05-15 16:33:19 +00:00
chrisheechoandGitHub e1aef2f241 Update model_garden_gemma_fine_tuning_batch_deployment_on_rov.ipynb (#2982)
Need to update this headnode size per product requirement to not cause errors
2024-05-15 16:30:31 +00:00
dstnluong-googleandGitHub d5312bec5d Fix typo in Gemma finetuning notebook. (#2980)
PiperOrigin-RevId: 633712168
2024-05-15 00:32:24 +00:00
Louis LinandGitHub 5f86e65e6d fix: Broken 'processor' param due to linter (#2972)
* feat: Add notebook for E5 text embedding models

* feat: Add notebook for E5 text embedding models

* fix: Broken 'processor' param due to linter

* fix: Update the dev TEI docker images to the public ones
2024-05-14 22:08:53 +00:00
chrisheechoandGitHub f51d6c8e06 Update ray_cluster_management.ipynb (#2974)
Need to change the head node default to 16 to avoid error - i'm the PM for this product
2024-05-14 19:07:15 +00:00
84012f0e22 Add PaliGemma notebooks (#2971)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-05-13 23:34:41 +00:00
dstnluong-googleandGitHub bec5a1f61a Sync GitHub repo (#2966)
PiperOrigin-RevId: 629577775
2024-05-13 21:33:53 +00:00
Louis LinandGitHub 67d14b1e91 feat: Add notebook for E5 text embedding models (#2961)
* feat: Add notebook for E5 text embedding models

* feat: Add notebook for E5 text embedding models
2024-05-11 13:01:26 +00:00
Gary WeiandGitHub 1d720eba33 Switch from pytorch-peft-serve to pytorch-diffusers-serve-opt container for diffusion model serving with lora. (#2950)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.

* Switch to `pytorch-diffusers-serve-opt` container to for diffusion lora serving.

* add the dreambooth_lora notebook.

* minor update.
2024-05-09 23:56:08 +00:00
Gary WeiandGitHub 246dc04784 Update the instant-id Gradio notebook to use the latest Gradio version and fix some bugs. (#2959)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.

* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Update Gradio notebook to use the latest Gradio version and fix some bugs.

1. Update Gradio version to 4.29.0, as it complains 3.50.0 is too old.
2. Uninstall nest-asyncio and uvloop as a workaround to b/339301920 and https://github.com/gradio-app/gradio/issues/8238#issuecomment-2101066984.

* Resolve merge conflict.

* minor updates.

* minor updates.

* Update the instant-id Gradio notebook to use the latest Gradio version and fix some bugs.
2024-05-09 23:54:56 +00:00
Gary WeiandGitHub e08d445e17 Update Gradio notebook to use the latest Gradio version and fix some bugs. (#2958)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.

* Update Gradio notebook to use the latest Gradio version and fix some bugs.

1. Update Gradio version to 4.29.0, as it complains 3.50.0 is too old.
2. Uninstall nest-asyncio and uvloop as a workaround to b/339301920 and https://github.com/gradio-app/gradio/issues/8238#issuecomment-2101066984.

* Resolve merge conflict.

* minor updates.

* minor updates.
2024-05-09 23:54:11 +00:00
kewentandGitHub 859ed6a55d remove preview models in description (#2948) 2024-05-08 19:16:13 +00:00
dstnluong-googleandGitHub 44d11bee00 Set DEPLOY_SOURCE to MG notebooks. (#2947) 2024-05-08 18:53:13 +00:00
Gary WeiandGitHub 7c0213dfff Split the 'instant-id' deployment notebook prediction into two sections: (#2946)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.

* Split the 'instant-id' deployment notebook prediction into two sections.

* add `deployment_source` to the notebook.
2024-05-08 13:29:29 +00:00
JennieandGitHub 2cdc45b7b0 Information is outdated. Feature Store API is now available in more regions. (#2923) 2024-05-04 01:22:33 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
413bd6e7c1 Bump tqdm in /community-content/vertex_model_garden/model_oss/cloudnerf (#2927)
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.1 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.1...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04 01:03:53 +00:00
Gary WeiandGitHub 34a68990b2 Some minor updates to the stable-diffusion-gradio notebook. (#2926)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.

* Minor fix to the stable diffusion gradio notebook.
2024-05-03 19:04:15 +00:00
Gary WeiandGitHub 08561d91c0 Update the image generation Gradio notebook to support Dreambooth finetuning. (#2921)
* Create a Gradio notebook for the new InstantId model.

* Add dreambooth finetune to the stable diffusion Gradio workshop notebook.

* Update the image generation Gradio notebook to support Dreambooth finetuning.

* linter update

* linter update

* minor fix to the instant-id notebook.
2024-05-03 18:02:52 +00:00
Huguens JeanandGitHub 2d280216ec Revert "[MG Model Team] Add environment var of DEPLOY_SOURCE with value 'note…" (#2925)
This reverts commit 056d909e3e.
2024-05-03 16:46:04 +00:00
Ivan NardiniandGitHub 662f7b1440 feat: tuning and serving Gemma on Ray on Vertex AI in Model Garden (#2920)
* adding gemma on rov in model garden

* linter passed
2024-05-02 19:11:01 +00:00
Huguens JeanandGitHub 056d909e3e [MG Model Team] Add environment var of DEPLOY_SOURCE with value 'notebook' for all mg notebooks. (#2917) 2024-05-02 16:47:39 +00:00
Gary WeiandGitHub f164335054 [InstantID] Update the link of the two reference images. (#2914)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Update the link of the reference images.
2024-05-02 12:54:08 +00:00
xcchen1andGitHub a05724d0d6 Create ByteDance/SDXL-Lightning notebook (#2912)
* Add ByteDance/SDXL-Lightning notebook

* Add ByteDance/SDXL-Lightning to gradio notebook
2024-05-02 12:53:24 +00:00
Gary WeiandGitHub 7f4e3f2afa Create a Gradio notebook for the new InstantId model. (#2911) 2024-05-02 12:52:43 +00:00
Tianrui YangandGitHub cc981bcd2c refactor: update feature store vector search notebook use latest features. (#2909)
* Update feature store vector search notebook to use latest vertex SDK.

* Run lint to fix format issue

* Sleep for a few minutes to wait for DNS to be ready
2024-04-30 21:02:17 +00:00
0fd7db5602 Fix link URL typo (#2910)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-04-30 18:58:56 +00:00
Huguens JeanandGitHub 6f4bb601d9 Update falcon instruct notebook to lowcode/nocode (#2905)
* Update falcon instruct notebook to lowcode/nocode

* Fix imported unused in falcon instruct deployment noteboook.
2024-04-30 18:52:50 +00:00
Kathy YuandGitHub 4b25631e53 Fix GCS path in Llama 3 finetuning notebook. (#2908)
* Fix GCS path in Llama 3 finetuning notebook.

* Fix bucket name for permission granting.
2024-04-30 18:49:50 +00:00
dstnluong-googleandGitHub d212b2fdc9 Fix Mixtral model id naming (#2904) 2024-04-30 18:49:03 +00:00
Gary WeiandGitHub e5cfffd44f Create a notebook for model instantx/instantid. (#2898)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.

* Create a notebook for model `instantx/instantid`.
2024-04-29 15:40:01 +00:00
Mend RenovateandGitHub 85a46165bc chore(deps): update dependency black to v24.4.2 (#2900) 2024-04-26 14:47:23 +00:00
Kathy YuandGitHub dcd26245c7 Add Llama 3 finetuning notebook. (#2897) 2024-04-24 23:07:29 +00:00
Mend RenovateandGitHub 3c10aba391 chore(deps): update dependency black to v24.4.1 (#2895) 2024-04-24 15:46:23 +00:00
dstnluong-googleandGitHub 6c3bd0e042 Add uuid to reduce bucket name crashing (#2894)
* Add uuid to notebooks.

* Lint
2024-04-23 21:22:17 +00:00
dstnluong-googleandGitHub cff2942b20 Load mistral and mixtral models from GCS (#2893)
* Load Mistral and Mixtral models from GCS.

* Lint

* Fix lint

* add -r to mixtral

* Try to automatically set region
2024-04-23 14:31:19 +00:00
xcchen1andGitHub bf3f96caf6 No-code/low-code notebook: fix sd 1.5 dreambooth model deployment section (#2892) 2024-04-23 14:29:23 +00:00
Aaron DietzandGitHub 3dac000915 Update automl_image_classification_batch_prediction.ipynb (#2891)
This notebook was throwing "invalid JSON" errors when users were opening it in Colab, etc.

The problem was introduced in https://github.com/GoogleCloudPlatform/vertex-ai-samples/pull/2866 when I didn't close a text cell line properly.
2024-04-22 17:37:50 +00:00
Kathy YuandGitHub 00d8f83630 Update embedded model card link for Llama 3 deployment notebook. (#2890) 2024-04-20 23:42:24 +00:00
eliasecchigandGitHub 03efaadb87 Update README.md (#2888) 2024-04-19 15:45:07 +00:00
qijing93andGitHub b70be17865 chore: Splitting legacy Feature Store colabs to a separate folder. (#2887) 2024-04-19 12:41:34 +00:00
Huguens JeanandGitHub badf6f4a61 Update codellamma nclc deployment and evaluation notebooks. (#2886) 2024-04-19 12:40:10 +00:00
weigaryandGitHub f5e3bfa727 Switch mediapipe-train docker container from vertex-ai-restricted to vertex-ai, in the mediapipe-train notebooks. (#2885)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.

* Switch `mediapipe-train` docker container from `vertex-ai-restricted` to `vertex-ai`, in the `mediapipe-train` notebooks.
2024-04-18 17:24:01 +00:00
Kathy YuandGitHub 998ca068a7 Add Llama3 deployment notebook. (#2884)
* Add Llama3 deployment notebook.

* Add to codeowners.
2024-04-18 16:35:28 +00:00
weigaryandGitHub 89c040bc24 Add a few community models to the Gradio workshop. (#2883)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.

* Minor update the `sd-xl` deployment notebook, based on the QA feedback.

* Add a few community models to the Gradio workshop.
2024-04-18 12:48:16 +00:00
e072753032 Rov-open-colab-enterprise (#2879)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* Added "Open in Colab Enterprise" link and made other edits

* Update ray_cluster_management.ipynb

---------

Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
2024-04-17 14:53:36 +00:00
dstnluong-googleandGitHub b9147f6dfe Collapse last cell (#2882)
* Collapse last cell

* Lint
2024-04-16 20:42:14 +00:00
Mend RenovateandGitHub 0d8482f17f Update dependency black to v24.4.0 (#2881) 2024-04-15 17:45:11 +00:00
e4abe986b1 Fix region for sdk streaming (#2878)
* add Claude 3 Opus model

* fix lint

* fix vertexai bug

* update region for streaming sdk call

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-11 20:28:18 +00:00
92804a7fac Fix vertexai bug on Claude 3 Opus (#2877)
* add Claude 3 Opus model

* fix lint

* fix vertexai bug

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-11 19:14:54 +00:00
513fef82dc Add Claude 3 Opus model (#2871)
* add Claude 3 Opus model

* fix lint

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-11 18:17:51 +00:00
Tianrui YangandGitHub 3f94a50a7d Update FeatureStore embedding notebook to use vertex SDK preview. (#2854)
* Update FeatureStore embedding notebook to use vertex SDK preview.

* Fix format issue.

* Comment deleting transfer config code

* Add                   Credentialed Accounts
ACTIVE  ACCOUNT
*       141951627079-compute@developer.gserviceaccount.com to debug permission issue

* Fix bigquery transfer run issue.
2024-04-11 03:55:14 +00:00
dstnluong-googleandGitHub db83e3f2d2 Fix typos in quantization notebook (#2875) 2024-04-10 21:28:16 +00:00
xcchen1andGitHub 9f896a2138 Update notebooks to no-code/low-code (#2874) 2024-04-10 03:46:16 +00:00
Aaron DietzandGitHub 15546cc1c0 Remove inaccurate description about length of training time automl_image_classification_batch_prediction.ipynb (#2866) 2024-04-10 03:45:46 +00:00
ee88765444 Tpuv5e llama2 briankang robv (#2853)
* Initial commit of a Llama2 TPUv5e LoRA example

* Addressing issue of job failing at the end by adding sys.exit(0) after all steps complete

* Adding Llama2 LoRA tuning on TPUv5e notebook

* Create /tmp/modelfiles folder for downloading model files during training

* Updated to use gcloud storage instead of gsutil

* Removed step to clear folder in bucket, since that causes failure

* Added serving/deployment section.

* Fixed linting errors

* Default to 8 chip tuning for quota issue on automated tests

* Defaulting back to 16 chip fine-tuning and epochs to 200

* Set Accelerate library to 0.28.0, as newer version break TPU support

* Updated upload of tuned model files to happen for all workers - to avoid timeout errors

* Temp remove active endpoint, then retest

* Updating docker container to python 3.10

* Added wait to prevent job delete step happening too early

* Lint issue and remove temporary endpoint delete

* Lint issue

* Add 15 minute wait while model is setup on the endpoint, and readd temp delete of endpoint

* Make 15 minute wait optional and remove temporary endpoint delete

* Remove GCS path to model garden model for final commit

---------

Co-authored-by: Rob Vogelbacher <robv@google.com>
2024-04-10 03:45:10 +00:00
fbb27557e8 Fix CodeGemma model ID (#2873)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-04-09 15:23:17 +00:00
6980995572 Fix CodeGemma notebook (#2872)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-04-09 12:31:10 +00:00
Aaron DietzandGitHub 217a774182 Fixed formatting of the "open in" table (#2870) 2024-04-09 03:49:05 +00:00
Huy NgoandGitHub de9350d695 Revert "add Claude 3 Opus model (#2855)" (#2869)
This reverts commit 106e34781c.
2024-04-09 02:32:21 +00:00
106e34781c add Claude 3 Opus model (#2855)
* add Claude 3 Opus model

* fix lint

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-09 00:36:17 +00:00
xcchen1andGitHub 692d4adc5d No-code/low-code notebooks: update notebook links (#2867) 2024-04-09 00:20:01 +00:00
2f243ddc54 Add CodeGemma (#2868)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-04-09 00:18:33 +00:00
yexing111andGitHub 9bdeed5c4a Update FS optimized serving GA colab (#2859)
* Update FS optimized serving GA colab

* Fix import order

* Fix import format

* Fix format

* Fix test issue

* Fix format

* Add way to getFOS&FV for FR/FG
2024-04-08 21:04:08 +00:00
Huguens JeanandGitHub ea2f4bbe3a Gemma eval fix (#2865)
* Fix minor typo in accelerator selection.

* Fix minor typo in accelerator selection.

* Update eval dataset to hellaswag.

* Update eval dataset to hellaswag.
2024-04-08 18:50:11 +00:00
geetaarora-googleandGitHub 76b7ef1c5e Added RLHF recommended best practices. (#2863) 2024-04-08 18:49:29 +00:00
dstnluong-googleandGitHub 69f2b0a900 Minor fix for llama2 quantization. (#2864)
* Minor fix for llama2 quantization.

* Lint
2024-04-08 17:09:41 +00:00
kittyabsandGitHub a1035554c7 Fix-table-3 (#2862)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* Still trying to fix table - so sorry about this.
2024-04-08 17:08:54 +00:00
xcchen1andGitHub fc45d4b114 Update notebooks to no-code/low-code (#2860) 2024-04-06 14:05:37 +00:00
kittyabsandGitHub 97bff66011 Fix-table (#2856)
* Update get_started_with_pytorch_rov.ipynb

This is a test

* fix table containing links to notebook samples.
2024-04-05 19:30:29 +00:00
dstnluong-googleandGitHub 4f98b604c3 Rewrite Gemma deployment notebook to be LC/NC (#2850)
* Rewrite Gemma deployment to be LC/NC

* Lint

* Lint
2024-04-05 19:29:24 +00:00
Huy NgoandGitHub 848cecb1b0 Revert "Add Claude 3 Opus model (#2847)" (#2849)
This reverts commit 19e95b90c7.
2024-04-04 20:22:49 +00:00
4b20f9a25b feat: Update supported models table in RLHF notebooks. (#2841)
* feat: Update supported models table in RLHF notebooks.

* feat: Update image that shows how to locate output_model_path.

* feat: Update name of deploy model component.

---------

Co-authored-by: Ryan Latture <latture@google.com>
2024-04-04 19:58:51 +00:00
19e95b90c7 Add Claude 3 Opus model (#2847)
* Add Colab on how to use Claude 3 models on Vertex AI

* Add Colab on how to use Claude 3 models on Vertex AI

* add codeowner

* lint

* update model version

* update stream sdk to have more readable response

* add colab for claude 3

* lint

* update CODEOWNERS and file name

* remove claude 3 colab from model_garden folder

* update CODEOWNERS

* format

* fix intergration test failed

* fix markdown not showing up

* fix markdown not showing up

* update pip command

* update install command

* update restart kernel command

* fix restart kernel command

* clear cell output

* update select region command

* raise error if user doesn't update project_id

* update ordering and add preview image section

* update ordering and add preview image section

* fix httpx package not install

* fix httpx package not install

* fix httpx package not install

* fix lint

* add claude 3 opus model

* fix lint

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-04 19:56:03 +00:00
c565eb9f4b Update colab order and add preview image section (#2789)
* Add Colab on how to use Claude 3 models on Vertex AI

* Add Colab on how to use Claude 3 models on Vertex AI

* add codeowner

* lint

* update model version

* update stream sdk to have more readable response

* add colab for claude 3

* lint

* update CODEOWNERS and file name

* remove claude 3 colab from model_garden folder

* update CODEOWNERS

* format

* fix intergration test failed

* fix markdown not showing up

* fix markdown not showing up

* update pip command

* update install command

* update restart kernel command

* fix restart kernel command

* clear cell output

* update select region command

* raise error if user doesn't update project_id

* update ordering and add preview image section

* update ordering and add preview image section

* fix httpx package not install

* fix httpx package not install

* fix httpx package not install

* fix lint

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-04-04 12:50:18 +00:00
dstnluong-googleandGitHub 2f5eef2c17 Add region check for llama2 deployment notebook. (#2843)
* Add region check for LLaMA2 deployment notebook.

* Lint
2024-04-04 12:48:48 +00:00
dstnluong-googleandGitHub d5b1b83d9a Remove text moderation from llama2 quantization notebook (#2844)
* Remove text moderation for LLaMA2 quantization notebook.

* Lint
2024-04-04 12:48:07 +00:00
weigaryandGitHub 4bcdc034bb Update all the diffusion-serve containder URI to 20240403_0836_RC00 which includes the latest optimizations to the diffusion models. (#2845)
* Some minor updates to the SD-XL model deployment notebook, based on the QA feedback.

* Updates to the `sd-xl-dreambooth-lora-finetune` notebook based on feedback.

* [Stable diffusion gradio] Add a few pre defined styles to the workshop, also some minor UX improvement.

* Update all the diffusion-serve containder URI to 20240403_0836_RC00 which includes the latest optimizations to the diffusion models.
2024-04-04 12:47:24 +00:00
xcchen1andGitHub 03ec89d3d4 Update notebooks to no-code/low-code (#2842) 2024-04-03 20:54:48 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f3d8051df4 Bump pillow (#2839)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 20:53:42 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4292d97dc6 Bump pillow (#2840)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 20:52:57 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e557dcd3df Bump pillow (#2838)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 20:52:12 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
27e5b007be Bump pillow (#2837)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 20:51:21 +00:00
siping-huandGitHub 72ebccd341 Update autosxs_llm_evaluation_for_summarization_task.ipynb (#2836)
* Update autosxs_llm_evaluation_for_summarization_task.ipynb

Quick fix for the xsum dataset description and citation.

* fix lint error
2024-04-03 13:46:56 +00:00
kittyabsandGitHub 09e44f8661 Ray on vertex ai (#2827)
* Made numerous edits. Code not impacted

* removed empty cell

* delete empty cell
2024-04-03 02:28:07 +00:00
weigaryandGitHub 1c12789805 [Stable diffusion gradio] Add a few pre defined styles to the workshop, also some minor UX improvement. (#2835)
* Some minor updates to the SD-XL model deployment notebook, based on the QA feedback.

* Updates to the `sd-xl-dreambooth-lora-finetune` notebook based on feedback.

* [Stable diffusion gradio] Add a few pre defined styles to the workshop, also some minor UX improvement.
2024-04-03 02:27:00 +00:00
Michael HuandGitHub 55323b74da Update AutoSxS notebooks to use latest package release (#2832)
* Update AutoSxS notebooks to use latest package release

* apply elijah's review comments

* remove force reinstall to avoid errors
2024-04-03 02:24:17 +00:00
14c927400a feat: Tune llama-2-7b with RLHF. (#2834)
Co-authored-by: Ryan Latture <latture@google.com>
2024-04-03 02:23:26 +00:00
lee1premiumandGitHub fff3ac1838 feat: Elastic Text-Embedding Model demo. (#2829)
* feat: Elastic Text-Embedding Model demo.

* feat: Elastic Text-Embedding Model demo.
2024-04-03 02:22:24 +00:00
xcchen1andGitHub f5eab96c13 Update notebooks to no-code/low-code (#2831) 2024-04-02 20:01:32 +00:00
KCFindstrandGitHub fde0abd9f6 Fix malformed Colab URLs in model garden notebooks (#2830)
* Fix malformed Colab URL in llama2 peft finetuning and HPT notebooks

* Fix Gemma PEFT finetuning notebook URL
2024-04-02 19:59:03 +00:00
32a75b15fe feat: Update RLHF parameter documentation. Document how to access real-time TB metrics. (#2819)
Co-authored-by: Ryan Latture <latture@google.com>
2024-04-01 20:14:44 +00:00
lee1premiumandGitHub eb8ae3d01b feat: Elastic Text-Embedding Model demo. (#2824)
* feat: Elastic Text-Embedding Model demo.

* feat: Elastic Text-Embedding Model demo.
2024-04-01 13:12:34 +00:00
KCFindstrandGitHub 6110aa2b13 Update Llama2 PEFT finetuning notebook to low-code version and minor fixes to HPT notebook (#2825) 2024-03-29 23:28:32 +00:00
Eric DongandGitHub 22435976d9 chore: Update template (#2821) 2024-03-29 21:41:07 +00:00
xcchen1andGitHub f279973cb7 Update notebooks to no-code/low-code (#2823) 2024-03-29 19:50:01 +00:00
weigaryandGitHub eace0e9884 Some minor updates to the SD-XL model deployment notebook, based on the QA feedback. (#2820)
* Some minor updates to the SD-XL model deployment notebook, based on the QA feedback.

* Updates to the `sd-xl-dreambooth-lora-finetune` notebook based on feedback.
2024-03-29 19:48:44 +00:00
Lav RaiandGitHub ed16b60537 Add low-code notebooks. (#2818) 2024-03-28 17:00:25 +00:00
KCFindstrandGitHub 5d5bbd072e Update Model Garden Llama2 HPT notebook to low-code version (#2817)
* Update Model Garden Llama2 HPT notebook to low-code version.

* Update resource clean up section
2024-03-28 12:43:44 +00:00
weigaryandGitHub 5587d41f08 Some minor updates to the SD2.1 deployment notebook. (#2816)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.

* Some minor updates to the SD2.1 deployment notebook.
2024-03-28 12:42:06 +00:00
weigaryandGitHub 54114468fd some minor updates to the sd-gradio notebook. (#2815)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Create a notebook to demonstrate dreambooth LoRA finetune for SD-XL model.

* minor updates

* add to the codeowner list.

* merge conflict.

* minor fix to the Gradio UI workshop notebook.
2024-03-27 20:49:14 +00:00
Eric DongandGitHub 8a38619827 feat: update notebook template (#2801)
* feat: update notebook template

* address linter errors

* Change a few TODOs

* Add Colab link

* Update the open links

* Address review comments

* Address review comments
2024-03-27 14:02:54 +00:00
kittyabsandGitHub 9b3f4f07db added link to Colab Enteriprise. (#2812) 2024-03-27 00:50:11 +00:00
lee1premiumandGitHub beb53f6ce8 feat: Elastic Text-Embedding demo. (#2811)
* feat: Elastic Text-Embedding demo.

* feat: Elastic Text-Embedding demo.
2024-03-27 00:49:42 +00:00
Huguens JeanandGitHub 0ef5bee2ce Add Falcon Instruct evaluation notebook. (#2808) 2024-03-26 18:46:35 +00:00
Huguens JeanandGitHub 3d21fc16e1 Add Falcon Instruct finetuning notebook. (#2807) 2024-03-26 18:46:11 +00:00
Huguens JeanandGitHub 84ee7fd53c Add Gemma evaluation notebook. (#2806) 2024-03-26 18:45:24 +00:00
Huguens JeanandGitHub 15ddb011d2 Add Falcon Instruct quantization notebook. (#2805) 2024-03-26 18:44:32 +00:00
Huguens JeanandGitHub 4a8e69f8c8 Add Falcon Instruct deployment notebook. (#2804) 2024-03-26 18:43:36 +00:00
Mend RenovateandGitHub 5590037281 chore(deps): update dependency nbqa to v1.8.5 (#2810) 2024-03-26 14:54:10 +00:00
Huguens JeanandGitHub e911c8e098 Add CodeLLama evaluation notebook. (#2803) 2024-03-26 14:53:49 +00:00
Huguens JeanandGitHub ab5d97607d Update CodeLLama notebook to low-code/no-code without evaluation section. (#2802) 2024-03-26 14:52:49 +00:00
Mend RenovateandGitHub 5124590d5f chore(deps): update dependency pyupgrade to v3.15.2 (#2798) 2024-03-25 20:25:09 +00:00
Kathy YuandGitHub b37ed6e53c Update docker link for pic2word serving. (#2797) 2024-03-22 20:42:55 +00:00
AmyandGitHub 2bb39a0e10 moving some data from personal bucket to 'cloud-samples-data' bucket (#2794) 2024-03-22 20:42:25 +00:00
weigaryandGitHub 17369c223f Some minor changes to the sd2.1 and sdxl notebooks. (#2795)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.

* Some minor changes to the stable diffusion 2.1 and sd-xl notebooks.

* some additional minor fixes.

* additional fixes.

* Fix the minor bug associated with "bucket_name".

* Minor fixes for "BUCKET_NAME" for sd2_1 and sdxl deployment notebooks.
2024-03-22 20:41:50 +00:00
zhangxiaotianandGitHub d76246d39b feat: add curl colab for video warehouse (#2793) 2024-03-21 20:58:46 +00:00
weigaryandGitHub 0a48635251 Rewrite the SD2.1 dreambooth finetune notebook. (#2792)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.

* Rewrite the SD2.1 dreambooth finetune notebook.

* Add code owners.
2024-03-21 17:07:00 +00:00
weigaryandGitHub 5976895d8d Update the serving docker image to include the latest changes. (#2791)
* Update the serving docker image to include the latest changes.

* Update the image version to 20240320_0836_RC00
2024-03-21 17:05:12 +00:00
Huguens JeanandGitHub cb75558e68 Update CamP ZipNeRF notebook with low-code/no-code version. (#2790)
* Update CamP ZipNeRF notebook with low-code/no-code version.

* Update CamP ZipNeRF notebook with low-code/no-code version.

* Update CamP ZipNeRF notebook with low-code/no-code version.
2024-03-21 15:17:09 +00:00
weigaryandGitHub 7b06a04e19 Rewrite the stable diffusion 2.1 notebook: step #1 deployment. (#2788)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Rewrite the stable diffusion 2.1 notebook: step #1 deployment.
2024-03-21 15:15:38 +00:00
weigaryandGitHub e2e78c9613 Add additional document regarding the list of supported models, and some UI enhancement. (#2787)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes

* Add additional document regarding the list of supported models, and some UI enhancement.

* Minor update to the hyperlink.
2024-03-21 15:13:49 +00:00
Kathy YuandGitHub 3574f8877a Update config and add Mistral v0.2 in Mistral/Mixtral notebook. (#2786) 2024-03-19 18:39:02 +00:00
Durian YogurtandGitHub 63b77e57aa Fix filename bug by appending suffix directly when a video doesn't have an extension (#2785)
* Append suffix directly when video doesn't have an extension

* retrigger checks
2024-03-19 18:38:13 +00:00
cc8aac7220 Add Claude 3 models colab (#2777)
* Add Colab on how to use Claude 3 models on Vertex AI

* Add Colab on how to use Claude 3 models on Vertex AI

* add codeowner

* lint

* update model version

* update stream sdk to have more readable response

* add colab for claude 3

* lint

* update CODEOWNERS and file name

* remove claude 3 colab from model_garden folder

* update CODEOWNERS

* format

* fix intergration test failed

* fix markdown not showing up

* fix markdown not showing up

* update pip command

* update install command

* update restart kernel command

* fix restart kernel command

* clear cell output

* update select region command

---------

Co-authored-by: Huy Ngo <huyngo@google.com>
2024-03-19 16:25:35 +00:00
Brian KangandGitHub c7e2818829 Briankang tpuv5e gemma2b training (#2775)
* Publishing fine-tuning Gemma on TPUv5e notebook

* Update codeowners to add new TPUv5e notebook

* Fixed log link formatting, and added note to require Colab pro for converting to HF format

* Reran local pylint

* Updated python version to 3.10.13

* Pylint reran

* Remove python version note and run linter

* Add gcloud components update for automated tests

* Revert 'Add gcloud components update for automated tests'

This reverts commit a3e79d299b

* Added gcloud components update for automated testing

* Rerun linter

* Updates per nb review

* Changed default region to one where TPUv5e exists

* Update match case to if else for python 3.9
2024-03-18 19:42:51 +00:00
Mend RenovateandGitHub 58bfebfabc chore(deps): update dependency black to v24.3.0 (#2784) 2024-03-15 23:22:33 +00:00
weigaryandGitHub 9130766757 Add controlnet-canny to the Gradio playground, and some additional UX enhancements. (#2783)
* Add controlnet-canny to the Gradio playground, and some additional UX enhancement.

* Minor fixes.

* Minor fixes
2024-03-15 23:21:30 +00:00
Eric DongandGitHub c5d48c80d8 fix: properly handle python versions (#2779) 2024-03-15 17:19:25 +00:00
weigaryandGitHub 39466fe5cb Update the logic of cleaning up the GCS bucket_uri in the sdxl notebook. (#2778)
* Some minor fixed to the `stable-diffusion-gradio` notebook.

* Fix the deployment error of the `SDXL-REFINER` model in the notebook.

* Removed two unnecessary comments.

* Update the logic of cleaning up the `bucket-uri` in the SDXL deployment notebook.
2024-03-15 12:55:07 +00:00
weigaryandGitHub a40675a7ec Fix the deployment error of the SDXL-REFINER model in the notebook. (#2774)
* Some minor fixed to the `stable-diffusion-gradio` notebook.

* Fix the deployment error of the `SDXL-REFINER` model in the notebook.
2024-03-14 18:05:25 +00:00
KCFindstrandGitHub ffb31f9397 Update the CODEOWNER of Gemma GKE deployment notebook (#2770) 2024-03-14 14:10:31 +00:00
xcchen1andGitHub 42d2878c2f Update notebooks to no-code/low-code (#2772)
* Update notebooks to no-code/low-code

* Update notebooks to no-code/low-code
2024-03-14 14:09:43 +00:00
dstnluong-googleandGitHub da46f8aab0 Convert LLaMA2 quantization notebook to low/no code (#2760)
* low/no code llama2 quantization notebook

* Lint

* lint

* Fix link

* Reduce to 1 section

* Lint

* fix

* Fix
2024-03-11 13:40:02 +00:00
weigaryandGitHub dcc2e916af Update the serving docker image to include the latest fixes for image-inpainting. (#2766)
* Add a stable diffusion playground based on Gradio UI.

* Add codeowner.

* Update the serving docker image to include the latest fixes for image-inpainting.
2024-03-11 13:38:57 +00:00
weigaryandGitHub b5f4ddf577 Some minor fixed to the stable-diffusion-gradio notebook. (#2767) 2024-03-11 13:38:19 +00:00
Mend RenovateandGitHub f29b1d785b chore(deps): update dependency nbqa to v1.8.4 (#2764) 2024-03-11 13:36:59 +00:00
ethan-gordonandGitHub ae01b4c85f Vertex AI Feature Store Notebook, Feature View Service Agent (#2752)
* Add files via upload

* Update vertex_ai_feature_store_feature_view_service_agents.ipynb
Update CODEOWNERS
2024-03-09 14:25:41 +00:00
Katie NguyenandGitHub eefda026b1 Fix: edit branding errors in variable names (#2765)
* fix: edit branding errors in variable names

* fix: add model registry variable names
2024-03-08 01:33:54 +00:00
weigaryandGitHub f9608b8ac0 Add a stable diffusion playground based on Gradio UI. (#2763)
* Add a stable diffusion playground based on Gradio UI.

* Add codeowner.
2024-03-07 16:14:42 +00:00
KCFindstrandGitHub 4dd5bfa621 Fix corrupted vllm.patch file due to merge conflicts not be resolved correctly (#2761)
* Fix corrupted vllm.patch file due to merge conflicts not be resolved correctly

* Update CODEOWNERS of vllm
2024-03-07 16:13:46 +00:00
KCFindstrandGitHub 5b72579e51 Update Gemma low-code finetuning notebooks (#2762)
* Update Gemma low-code finetuning notebooks

* Fix invalid params due to the formatter
2024-03-07 16:13:04 +00:00
KCFindstrandGitHub 73122731a9 Update Model Garden vllm serving docker script and dockerfile (#2758)
* Update vllm serving docker script and dockerfile

* Add vllm to community content CODEOWNERS

* Update vllm serving docker script and dockerfile

* Update vllm serving docker script and dockerfile
2024-03-06 20:47:56 +00:00
dstnluong-googleandGitHub 986aaa408f Set max model len (#2757)
* switch llama2 deploymente notebook to lowcode version

* add moderate text link and lint

* lint

* Set gpu utilization

* Add --max-num-batched-tokens=4096

* Set max model len

* move prints in function

* lint

* Remove comment

* Fix link
2024-03-06 19:52:01 +00:00
Kathy YuandGitHub 60810269ad Update vLLM dockerfile. (#2759) 2024-03-06 19:50:50 +00:00
dstnluong-googleandGitHub fedde5da76 Create separate deployment only notebook for SD1.5 (#2750)
* SD notebook

* lintlint

* codeowners

* number to integer
2024-03-06 19:27:45 +00:00
Mend RenovateandGitHub 613258940e chore(deps): update dependency nbqa to v1.8.3 (#2756) 2024-03-04 15:34:44 +00:00
weigaryandGitHub 59a337e3cb Rewrite the SDXL - vertex serving notebook for the low-code user experience. (#2753) 2024-03-01 02:09:42 +00:00
Huguens JeanandGitHub ea2068bc00 Add camp zipnerf jax implementation to model garden. (#2754) 2024-03-01 02:08:28 +00:00
dstnluong-googleandGitHub 4e13f317e8 Modify llama2 deployment notebook to be lowcode (#2755)
* switch llama2 deploymente notebook to lowcode version

* add moderate text link and lint

* lint
2024-03-01 02:07:22 +00:00
jismailyan-googleandGitHub 9db64f74a2 refactor: Simplify Pic2Word notebook steps (#2751)
* refactor: Simplify Pic2Word notebook steps

* fix: linter

* fix: Fix inference issue
2024-02-28 22:05:33 +00:00
Michael HuandGitHub b4b20c3995 Make optional section ending more obvious in AutoSxS notebooks (#2748)
* Make it clear when optional section ends in AutoSxS

* run formatter and linter

* fix component names

* update xsum sample
2024-02-28 22:04:11 +00:00
kittyabsandGitHub d7a9ea8eed Edited "Vertex AI: Track artifacts and metrics across Vertex AI Pipelines runs using Vertex ML Metadata. No impact to code (#2749) 2024-02-27 21:23:48 +00:00
3fb37b5f35 Fix fvlm dockerfiles. (#2747)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-02-26 21:46:48 +00:00
kittyabsandGitHub 92c1e27c50 Edited "Tabular Workflow for Forecasting". No impact on code. (#2726) 2024-02-26 21:46:15 +00:00
weigaryandGitHub a1695d47d9 Update the docker image version to 20240223_1230_RC00 to fix the image quality issue associated with DPMSolverMultistepScheduler. (#2744)
* Pin the `pytorch-diffusers-serve-opt` docker image to `20231213_0836_RC00`.

* Update 4 stable diffusion notebooks to use the optimized serving container, including controlnet, instruct-pix2pix, text-to-video, text-to-video-zero-shot.

* Fix linter error.

* Update the docker image version to 20240223_1230_RC00 to fix the image quality issue associated with DPMSolverMultistepScheduler.
2024-02-26 20:29:26 +00:00
Alok PattaniandGitHub df3e2d4889 Adding EDA with R and BigQuery notebook for update to Cloud Architecture Center guide (#2745)
* Create test

* Adding updated notebook for EDA with R & BigQuery

* Delete notebooks/community/exploratory_data_analysis/test

* Update CODEOWNERS
2024-02-24 14:07:00 +00:00
kittyabsandGitHub c1d1e23cd0 Added missing link and made other edits to "Custom training with pre-built Google Cloud Pipeline Components". No impact on code (#2710)
* Added missing link and made other edits to "Custom training with pre-built Google Cloud Pipeline Components". No impact on code

* Update custom_model_training_and_batch_prediction.ipynb

fixed typo
2024-02-23 20:16:58 +00:00
kittyabsandGitHub c837c4367d Vertex-ai-training-typo-3 (#2742)
* Changed "Vertex AI training" to "Vertex AI Training

* changed "Vertex AI training" to "Vertex AI Training"
2024-02-23 20:13:13 +00:00
kittyabsandGitHub d4a422da2d Edit "Using Vertex AI Multimodal Embeddings and Vector Search". Updated links to point to new directory /vector-search/. No impact on code (#2728) 2024-02-23 20:11:24 +00:00
weigaryandGitHub 78dacd7652 Update 4 stable diffusion notebooks to start using the optimized serving dock image. (#2727)
* Pin the `pytorch-diffusers-serve-opt` docker image to `20231213_0836_RC00`.

* Update 4 stable diffusion notebooks to use the optimized serving container, including controlnet, instruct-pix2pix, text-to-video, text-to-video-zero-shot.

* Fix linter error.
2024-02-23 18:50:43 +00:00
KCFindstrandGitHub d558e7d101 Allow selecting accelerator in the #Gemma Vertex finetuning notebook and update the predict section (#2743) 2024-02-23 02:03:36 +00:00
Huguens JeanandGitHub 8394c2317d Update Bytetrack video object tracking notebook with AutoML IOD deployment. (#2721) 2024-02-22 22:28:03 +00:00
kittyabsandGitHub 485648c0b1 Edited "Get started with Vertex AI Experiments". Changed "Vertex AP training" to "Vertex AI "Training," and remove back ticks from "Vertex AI Training" in one case where it shouldn't have been. (#2741) 2024-02-22 22:25:01 +00:00
kittyabsandGitHub 3d0a0e23e2 Changed "Vertex AI training" to "Vertex AI Training" (#2740) 2024-02-22 22:24:37 +00:00
Bo zhengandGitHub 00028dee95 feat: Replace evaluation pipeline with Vertex SDK evaluate function on automl_text_classification_model_evaluation.ipynb (#2719)
* feat: Replace evaluation pipeline with Vertex SDK evaluate function on automl_text_classification_model_evaluation.ipynb

* Add automl-text-classification-evaluation-image

* Manually change notebook to test lint locally

* Format lint
2024-02-22 21:27:50 +00:00
kittyabsandGitHub afb501a116 Changed "Vertex AI training" to "Vertex AI Training (#2739) 2024-02-22 21:25:39 +00:00
KCFindstrandGitHub 56924aa804 Update ModelGarden Gemma finetuning and delpoyment notebooks on Vertex (#2738) 2024-02-22 18:34:53 +00:00
dstnluong-googleandGitHub 839cc67a5a Add 3 SD 1.5 finetuning notebooks. (#2724)
* Add 3 SD 1.5 finetuning notebooks.

* Lint
2024-02-22 18:24:40 +00:00
kittyabsandGitHub 3eb9c4af53 Edited "Vertex AI: Create, train, and deploy an AutoML text classification model" Updated URLS. (#2725) 2024-02-22 17:53:51 +00:00
kittyabsandGitHub 34d941c52c Made edits to "Vertex AI SDK for Python: AutoML Tabular training and prediction". No impact on code (#2722) 2024-02-22 17:53:20 +00:00
kittyabsandGitHub 1da787a325 Edited "Using Vertex AI Vector Search for StackOverflow Questions." Updated links to avoid redirects. Fixed one link that was due to a failed redirect and yielded a 404. No impact on code (#2729) 2024-02-22 17:52:55 +00:00
kittyabsandGitHub 55dcba8883 Edited "Using Vertex AI Vector Search and Vertex AI embeddings for text for StackOverflow Questions" Fixed one URL to remove redirect. (#2734) 2024-02-22 17:52:37 +00:00
kittyabsandGitHub 5b3492f3ab Edited "Create Vertex AI Vector Search index". Updated a URL to avoid a redirect. No impact on code (#2735) 2024-02-22 17:52:08 +00:00
kittyabsandGitHub 452a270a4e Changed "Vertex AI training" to "Vertex AI Training" (#2737) 2024-02-22 17:51:18 +00:00
Kathy YuandGitHub 97a677c08d Update Gemma deployment and finetuning notebook descriptions. (#2733) 2024-02-21 14:11:52 +00:00
Laurent PicardandGitHub 8e7e5138a7 Add Gemma KerasNLP finetuning Vertex AI deployment notebook (#2732) 2024-02-21 13:49:04 +00:00
kittyabsandGitHub 6cd96394f7 Made edits to "Get started with Vertex AI Experiments. Updated URL to point to new location of doc. Code not impacted. (#2697) 2024-02-21 13:19:22 +00:00
KCFindstrandGitHub dd75908741 Add #ModelGarden Gemma finetuning and deployment notebooks (#2730) 2024-02-21 04:11:51 +00:00
KCFindstrandGitHub 9b72294cf1 Add mistral and mixtral model fine-tuning notebooks (#2716) 2024-02-20 15:18:57 +00:00
Huguens JeanandGitHub 1439a364e0 Unify the model name as MODEL_ID in related containers and notebooks. (#2720) 2024-02-20 15:17:32 +00:00
Mend RenovateandGitHub 4b2724ccbe chore(deps): update dependency pyupgrade to v3.15.1 (#2718) 2024-02-20 15:15:49 +00:00
Kelsi LakeyandGitHub ddf3d1c73b Fix errors in get_started_with_vertex_experiments.ipynb (#2717)
* Update get_started_with_vertex_experiments.ipynb

Fix several errors preventing notebook from being run out of the box, namely the custom job container image.

* Update get_started_with_vertex_experiments.ipynb

* Update get_started_with_vertex_experiments.ipynb

* Update get_started_with_vertex_experiments.ipynb

* Update get_started_with_vertex_experiments.ipynb

* Update CODEOWNERS

* Update get_started_with_vertex_experiments.ipynb
2024-02-20 15:15:12 +00:00
weigaryandGitHub 8d9e2cecf9 Update the stable-diffusion-upscaler notebook to use the optimized serving containder. (#2714)
* Update the link of how to request TPU v5e quota in the notebook.

* Create a notebook to demonstrate how to load a thrid-party stable diffusion model, on Vertex AI for online prediction.

* Add codeowner.

* add code owner.

* Make stable_diffusion_xl_turbo a separate notebook.

* Update the `stable-diffusion-upscaler` notebook to use the optimized serving containder.
2024-02-20 15:14:00 +00:00
Kavitha RajendranandGitHub 1ad4c0331f Detect anomalies in Cloud Audit Logs using BQML models (#2709)
* Adding a notebook to detect anomalies in Cloud Audit Logs with BQML models

* cleaned up version

* incorporated review comments
2024-02-17 15:14:43 +00:00
Ivan NardiniandGitHub cb2b1a19c3 feat: ray on vertex - torch sample (#2711)
* add rov torch sample

* update codeowners

* add gericdong review

* linter passed
2024-02-17 15:07:22 +00:00
weigaryandGitHub 6fb5c2ea04 Make stable_diffusion_xl_turbo a separate notebook. (#2713)
* Update the link of how to request TPU v5e quota in the notebook.

* Create a notebook to demonstrate how to load a thrid-party stable diffusion model, on Vertex AI for online prediction.

* Add codeowner.

* add code owner.

* Make stable_diffusion_xl_turbo a separate notebook.
2024-02-16 21:04:49 +00:00
weigaryandGitHub ddcd08fb0b Create a notebook to demonstrate how to load a thrid-party stable diffusion model, on Vertex AI for online prediction. (#2708)
* Update the link of how to request TPU v5e quota in the notebook.

* Create a notebook to demonstrate how to load a thrid-party stable diffusion model, on Vertex AI for online prediction.

* Add codeowner.

* add code owner.
2024-02-16 14:53:41 +00:00
dstnluong-googleandGitHub f272ca4796 Update quantization docker for LLaMA2 (#2707) 2024-02-16 01:21:17 +00:00
Aiden010200andGitHub df9192d0c2 Upload batch prediction job sample (#2705)
* Upload examples of kfp v2

* Upload run experiment example.

* Upload batch prediction job sample.
2024-02-16 01:20:36 +00:00
kittyabsandGitHub 23b90796ea Made edits to "Vertex AI Pipelines: pipeline control structures using the KFP SDK," which includes updated the KFP URL and adding a missing URL to "Enable the Vertex AI API". No impact to code. (#2706) 2024-02-14 16:55:02 +00:00
Mend RenovateandGitHub c03b43b79b chore(deps): update dependency black to v24.2.0 (#2702) 2024-02-14 16:54:07 +00:00
kittyabsandGitHub 731b456c2f Edited "Vertex AI TensorBoard custom training with prebuilt container" No impact on code. (#2704) 2024-02-14 16:53:33 +00:00
weigaryandGitHub 130c621df7 Update the link of how to request TPU v5e quota in the notebook. (#2703)
* Update the link of how to request TPU v5e quota in the notebook.

* Create a notebook to demonstrate how to load a thrid-party stable diffusion model, on Vertex AI for online prediction.

* Delete notebooks/community/model_garden/model_garden_pytorch_stable_diffusion_custom.ipynb

move it to a separate commit
2024-02-14 16:52:51 +00:00
kittyabsandGitHub 87c43c0231 Made edits to "Vertex AI TensorBoard custom training with custom container". Fixed typos and cleaned up content. No impact on code (#2701)
* Made edits to "Vertex AI TensorBoard custom training with custom container". Fixed typos and cleaned up content. No impact on code

* Update tensorboard_custom_training_with_custom_container.ipynb

Deleted empty cell.
2024-02-14 16:52:13 +00:00
2e8dc70079 Remove eval_dataset from RLHF tuning parameters. (#2700)
We temporarily disabled this parameter for first-party models, so this will avoid validation errors when running the RLHF tuning notebook in the meantime.

Co-authored-by: Ryan Latture <latture@google.com>
2024-02-14 16:50:48 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e712fe3503 chore(deps): bump pillow (#2699)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-14 16:50:02 +00:00
Huguens JeanandGitHub 39da99a8bb Open source pytorch zipnerf model garden dockers. (#2696) 2024-02-12 15:14:01 +00:00
weigaryandGitHub 13de238a84 Add a notebook for SDXL - lora serving (#2691)
* Add a notebook with example on deploying SDXL model on TPU v5e

* Add a notebook for SDXL - lora serving

* Add code owners
2024-02-12 15:12:48 +00:00
kittyabsandGitHub 080674024b Made edits to "Vertex AI Experiments: Custom training autologging - Local script" and added link to relevant documentation. No impact on code (#2698) 2024-02-12 15:06:47 +00:00
kittyabsandGitHub f348edb56e Made edits to "Delete Outdated Experiments in Vertex AI TensorBoard". Updated URL(s). (#2695) 2024-02-12 15:05:21 +00:00
dstnluong-googleandGitHub 5c4bfa0979 Fix upscaler notebook (#2694) 2024-02-12 15:04:05 +00:00
cac8896a80 Increase default max-num-batched-tokens to 16385 for larger models. (#2689)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-02-12 15:03:09 +00:00
kittyabsandGitHub 5ca8adca08 Numerous edits to "Vertex AI SDK: AutoML training video classification model for batch prediction". Does not impact code. (#2688)
* Numerous edits to "Vertex AI SDK: AutoML training video classification model for batch prediction". Does not impact code.

* Update sdk_automl_video_classification_batch.ipynb

deleted "a"
2024-02-09 18:53:29 +00:00
weigaryandGitHub a9e2d4e7c4 Pin the pytorch-diffusers-serve-opt docker image to 20231213_0836_RC00. (#2692) 2024-02-09 14:31:37 +00:00
kittyabsandGitHub aa9ce6a6fb Made edits to "Vertex AI TensorBoard hyperparameter tuning with the HParams Dashboard" and updated URL to go to more relevant document. (#2690) 2024-02-09 14:09:04 +00:00
kittyabsandGitHub c51c52c03f Change url for viewing TensorBoard data. (#2687) 2024-02-09 14:07:58 +00:00
Michael HuandGitHub 163b66d3e7 Update Prophet and ARIMA notebook GCPC versions (#2658)
* Update Prophet and ARIMA notebook GCPC versions

Also, move ARIMA notebook back into official.

* Delete comparison with Vertex Forecasting

* Disable caching

* Rename
2024-02-08 21:41:58 +00:00
Thomas Le moullecandGitHub 2d960509f6 Mistral 7B Finetuning with QLora (#2645)
* Mistral 7B Finetuning with QLora

Need to fix the PEFT Train docker image for the finetuning step. 
Merging works correctly with the docker image, You might face an error when merging if the peft version used for merging is different from the one used for finetuning (new field added in the config_adapter file)

* Update peft docker train image to 20240126_0936_RC00

* Linter OK

* updated the notebook with pull requests comments

* Remove HPT and updated the bucket URI

* Linter update
2024-02-08 18:19:40 +00:00
Lav RaiandGitHub 2bf37e86fb Autogluon source (#2685)
* Add AutoGluon source files.

* Add AutoGluon source files.
2024-02-08 15:25:38 +00:00
bb274e4040 Support DITO training (#2683)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-02-08 15:23:34 +00:00
kittyabsandGitHub 34abfec74c Made edits to "Vertex AI TensorBoard integration with Vertex AI Pipelines". I also updated the section on viewing and comparing pipeline runs to point to new documentation. (#2684)
* Made edits to "Vertex AI TensorBoard integration with Vertex AI Pipelines". I also updated the section on viewing and comparing pipeline runs to point to new documentation.

* Update tensorboard_vertex_ai_pipelines_integration.ipynb

A few more small fixes. Trying to find source of lint error

* Update tensorboard_vertex_ai_pipelines_integration.ipynb

removed empty cells
2024-02-08 14:29:53 +00:00
kittyabsandGitHub 49f2f12ea2 Fixed typos and rewrote some sentences to make them clearer. Be sure to check that I didn't change the meaning or intent. No code impacted (#2680) 2024-02-07 15:17:35 +00:00
Huguens JeanandGitHub 306c4fa8f4 Update model deployment function with serving_container_environment_variables. (#2675) 2024-02-06 22:03:02 +00:00
kittyabsandGitHub 0964e7f0da Updated link to Vertex AI TensorBoard profiler page, which had been moved. Other edits to align with guidelines (#2676) 2024-02-06 22:01:30 +00:00
dstnluong-googleandGitHub 8e1d91e2c2 Fix URI (#2677) 2024-02-06 22:01:06 +00:00
Bo zhengandGitHub 26001062b7 feat: Replace evaluation pipeline with Vertex SDK evaluate function on model evaluation notebooks (#2610)
* Replace evaluation pipeline with evaluate function

* Replace evaluation pipeline with evaluate function on automl_tabular_regression_model_evaluation.ipynb

* Replace evaluation pipeline with evaluate function on custom_tabular_classification_model_evaluation.ipynb

* Replace evaluation pipeline with evaluate function on custom_tabular_regression_model_evaluation.ipynb

* Replace evaluation pipeline with evaluate function on automl_video_classification_model_evaluation.ipynb

* Format automl_tabular_classification_model_evaluation.ipynb

* Format automl_tabular_regression_model_evaluation.ipynb

* Format automl_video_classification_model_evaluation.ipynb

* Format custom_tabular_classification_model_evaluation.ipynb

* Format custom_tabular_regression_model_evaluation.ipynb

* Add files via upload

* Update screenshot for notebooks with evaluate function usage

* Revert custom_tabular_classification_model_evaluation.ipynb

* Format lint

* manual fix lint
2024-02-06 00:25:15 +00:00
siping-huandGitHub 56656f2225 Add notebooks for autosxs (model based llm evaluation) (#2659)
* Create model_based_llm_evaluation folder

* Add autosxs sample notebooks.

* Update autosxs sample notebooks.

* Update CODEOWNERS for autosxs

* Fix lint and format.

* Resolve Michael's comments.

* Fix test failures.

* Fix test errors and resolve Eric's comments.

* Update autosxs_llm_evaluation_for_summarization_task.ipynb

* Update autosxs_llm_evaluation_for_summarization_task.ipynb

* Update autosxs_llm_evaluation_for_summarization_task.ipynb

* Update autosxs_llm_evaluation_for_summarization_task.ipynb

* Update autosxs_llm_evaluation_for_summarization_task.ipynb

* Fix isort.

* Fix nbfmt
2024-02-06 00:22:16 +00:00
kittyabsandGitHub 684285d4f1 Update URL to go directly to /training/... (#2674) 2024-02-06 00:19:20 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a898bf8aad chore(deps): bump fastapi (#2673)
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.75.2 to 0.109.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.75.2...0.109.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 18:11:03 +00:00
weigaryandGitHub 60b49d8419 Add a notebook with example on deploying SDXL model on TPU v5e (#2672) 2024-02-05 17:42:31 +00:00
8b55dada76 Dealing with numerous text edits. Does not impact code (#2670)
* Update get_started_with_vertex_experiments_autologging.ipynb

Added link in "Learn more about..." to the Vertex AI Experiments intro page. Currently, this notebook is not showing up properly in the Jupyter SDK Tutorial page.

* Update get_started_with_vertex_experiments_autologging.ipynb

* Update notebook_template_review.py

Missing left curly bracket/brace 2xs 
(Note, commented out, but still fixing)
 #'AutoML Vision': '{automl_vision_name}}',
 #'AutoML Image': '{automl_vision_name}}',

* Update get_started_with_vertex_experiments_autologging.ipynb

Needed to add a period.

* fix: update spacing

---------

Co-authored-by: Katie Nguyen <katiemn@gmail.com>
2024-02-02 17:05:24 +00:00
dstnluong-googleandGitHub f18c851428 Fix Lama URI (#2671)
* LaMa notebook

* lint

* codeowners

* update

* lint

* Fix indentation issue

* fix URI
2024-02-02 14:23:57 +00:00
Huguens JeanandGitHub a78b5ce878 Search for the MODEL_ID env and set it in the deployment function for… (#2669)
* Search for the MODEL_ID env and set it in the deployment function for all model garden notebooks for pre-trained and tuned models.

* Fix model_garden_pytorch_stable_video_diffusion_img2vid_xt notebook linter issue with load_image and HTML.

* Fix model_garden_pytorch_stable_video_diffusion_img2vid_xt notebook linter issue with load_image and HTML.

* Fix missing MODEL_ID in model_garden_mediapipe_image_generation.ipynb.
2024-02-02 14:21:29 +00:00
kittyabsandGitHub a9aea28b37 Update get_started_with_bqml_training.ipynb (#2666)
Remove "back ticks" around product/service names. Fix typos.
2024-02-02 14:12:31 +00:00
kittyabsandGitHub 0cb84572ba Update tensorboard_profiler_custom_training.ipynb (#2665)
Text edits: Removed `...` from product names and made other edits. Code not impacted
2024-02-02 14:11:18 +00:00
kittyabsandGitHub 764b7a5cc8 Update comparing_pipeline_runs.ipynb (#2664)
* Update comparing_pipeline_runs.ipynb

Needed edits for the page. Does not impact code.

* Update comparing_pipeline_runs.ipynb

responded to katie's feedback.
2024-02-02 14:10:18 +00:00
zbl94andGitHub 94294de17c feat: Vertex AI Feature Store Based LLM Grounding Tutorial (#2652)
* feat: Vertex AI Feature Store Based LLM Grounding Tutorial

* fix: fix the feature store based llm grounding tutorial based on a few comments

* fix: fix the feature store based llm grounding tutorial based on a few comments

* fix: move the fs grounding notebook to official

* fix: comment colab only code

* fix: fix pipeline prefix

* fix: resolve several comments

* fix: resolve several comments

* fix: a quick fix for type

* fix: a quick fix for import

* fix: a quick fix for colab
2024-02-01 22:06:34 +00:00
d9d3be36f9 Support CodeLlama 70B models. (#2667)
Co-authored-by: minwoopark <minwoopark@google.com>
2024-02-01 18:10:12 +00:00
kittyabsandGitHub 48f1a43efc Update sdk-custom-image-classification-batch.ipynb (#2662)
Removed tick marks from product names so they don't render as code.
2024-01-31 21:55:26 +00:00
kittyabsandGitHub 64417df16a Update tensorboard_vertex_ai_pipelines_integration.ipynb (#2663)
Fixing typo: "monitorning" -> "monitoring"
2024-01-31 21:53:59 +00:00
dstnluong-googleandGitHub 165d58f328 Fix indentation in LaMa notebook (#2661)
* LaMa notebook

* lint

* codeowners

* update

* lint

* Fix indentation issue
2024-01-31 19:42:43 +00:00
Shikanime DevaandGitHub bb2085a95d Add Peft additional parameters (#2657) 2024-01-31 16:12:34 +00:00
kittyabsandGitHub 5cd844f2dd Small edit - first time making a change to a github sample. (#2660) 2024-01-30 21:00:18 +00:00
Lehui LiuandGitHub 4b455390f6 feat: add sample notebook for vertex distillation (#2656) 2024-01-30 01:29:29 +00:00
Mend RenovateandGitHub d5f90ce6de chore(deps): update dependency black to v24.1.1 (#2654) 2024-01-30 01:17:16 +00:00
Aiden010200andGitHub 4ede21cccd Upload run experiment example (#2653)
* Upload examples of kfp v2

* Upload run experiment example.
2024-01-29 15:36:10 +00:00
weigaryandGitHub 16bf0a8813 Update/optimize the serving efficiency of the image-inpainting model. (#2650) 2024-01-26 19:04:55 +00:00
Mend RenovateandGitHub c7fb10d374 chore(deps): update dependency black to v24 (#2651) 2024-01-26 19:03:13 +00:00
dstnluong-googleandGitHub e700dbbad3 Add LaMa Notebook to Vertex MG (#2648)
* LaMa notebook

* lint

* codeowners

* update

* lint
2024-01-25 17:40:59 +00:00
Katie NguyenandGitHub 0a082b4c07 fix: update links to official notebook (#2647) 2024-01-25 17:39:03 +00:00
Lav RaiandGitHub ad947ea952 Add AutoGluon notebook. (#2649) 2024-01-25 17:38:17 +00:00
dstnluong-googleandGitHub 7d7db7d2d7 Separate hp tuning from llama notebook. (#2641)
* Separate notebook

* lint

* add codeowners

* Remove unused import

* Merge with pipeline addition.

* Remove prediction from hptuning nb.
2024-01-24 22:27:05 +00:00
Erick De Santiago AnayaandGitHub 884d649434 Update model_garden_video_object_tracking_serve.ipynb (#2646)
The model it's expecting a number instead of a boolean value
2024-01-24 20:52:40 +00:00
61789574c0 feat: Document how to get predictions from tuned 1P and 3P models. (#2642)
1P models should use Online or Batch Prediction. 3P models should use the Bulk Inference pipeline.

Co-authored-by: Ryan Latture <latture@google.com>
2024-01-24 20:51:02 +00:00
Matthew TangandGitHub 0ea0c04195 [Vertex AI SDK] Add custom serializer args for bigframes tensorflow (#2633)
* Add custom serializer args for bigframes tensorflow

* Add custom serializer args for remote prediction
2024-01-24 20:47:02 +00:00
Katie NguyenandGitHub 556cbe7049 fix: update API call in triton client (#2644) 2024-01-24 20:45:48 +00:00
jismailyan-googleandGitHub b695dc7631 Move and update pipeline finetuning section. (#2640)
* Add a section documenting the one-click finetuning
button in the Model Card UI.

The section explains how to use the button,
what the pipeline does and some troubleshooting
tips.

* Edit one-click finetuning instructions for clarity
and syntax.

* Correct 'Tensorboard' to 'TensorBoard'

* Updated finetuning pipeline instructions to
include steps on launching the pipeline via the
Vertex SDK.

* Added more parameters to the pipeline command
example. Moved the section down.

* Remove unintentional character interpolation

* Removed changes

* Undo formatting

* Remove old version of finetuning pipeline section

* Only allow huggingface datasets with the
finetuning pipeline.

* Fix linter issues
2024-01-23 18:43:35 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f8f2f35920 chore(deps): bump pillow (#2639)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 18:42:07 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3c6198f8bc chore(deps): bump pillow (#2638)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 18:41:39 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3ed1f26dab chore(deps): bump pillow (#2637)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 18:41:09 +00:00
3507602da1 feat: add llava 1.5 docker and notebook. (#2636)
Co-authored-by: Pooya Moradi <pooyam@google.com>
2024-01-23 18:40:22 +00:00
Amy WuandGitHub 0cae18cfba feat: Add Ray on Vertex AI cluster management sample (#2634)
* feat: Add Ray on Vertex cluster management sample

* fix: lint

* fix: vpc

* fix: python version

* fix: scale up

* fix: lint

* fix: clean up

* fix: update notebook

* fix: docs

* fix: docs

* fix: links
2024-01-23 18:25:25 +00:00
Aiden010200andGitHub e735195230 Upload examples of kfp v2 (#2627) 2024-01-18 19:08:49 +00:00
Kathy YuandGitHub c8f95d2121 Update Mixtral vLLM container and support OpenAI vLLM server. (#2630) 2024-01-18 19:06:48 +00:00
Huguens JeanandGitHub b679b3d72d Added individual download links for mipnerf360 dataset. (#2631) 2024-01-18 19:06:04 +00:00
joiceyeandGitHub c52ce038f6 notebook for stable video diffusion img2vid xt (#2626) 2024-01-15 15:15:18 +00:00
35f42fd9fc fix: Update RLHF large_model_reference to match text. (#2625)
Co-authored-by: Ryan Latture <latture@google.com>
2024-01-15 15:13:09 +00:00
jismailyan-googleandGitHub 252093ddf3 Add Fine-tuning Pipeline button instructions to Llama2 PEFT notebook (#2621)
* Add a section documenting the one-click finetuning
button in the Model Card UI.

The section explains how to use the button,
what the pipeline does and some troubleshooting
tips.

* Edit one-click finetuning instructions for clarity
and syntax.

* Correct 'Tensorboard' to 'TensorBoard'
2024-01-12 18:23:03 +00:00
Alicia WilliamsandGitHub 722a8cfe4c Update bq_ml_with_vision_translation_nlp.ipynb (#2624)
Update dataset links
2024-01-11 21:07:21 +00:00
weigaryandGitHub c9d4a27cff Update the SD notebooks using the new pytorch-diffusers-serve-opt container. (#2597)
* Update staable-diffusion 1.5 and XL notebooks to deploy with default GPU as L4, instead of A100.

* Update the SD notebooks using the new  container.

* Delete notebooks/community/model_garden/model_garden_pytorch_stable_diffusion_xl_1_0.ipynb

Resolve the merge conflict.

* Resolve the merge conflict.
2024-01-10 19:57:25 +00:00
Mend RenovateandGitHub 97de848e13 chore(deps): update dependency flake8 to v7 (#2612) 2024-01-10 15:33:50 +00:00
Mend RenovateandGitHub dea762c54a chore(deps): update dependency black to v23.12.1 (#2608) 2024-01-10 15:33:04 +00:00
Mend RenovateandGitHub e8ed4c3fd9 chore(deps): update actions/setup-python action to v5 (#2569) 2024-01-10 15:21:37 +00:00
Katie NguyenandGitHub 00b4598734 fix: lowercase hyperparameter tuning (#2616) 2024-01-10 15:06:00 +00:00
Katie NguyenandGitHub f5ccb578f4 fix: lowercase custom training (#2617) 2024-01-10 15:05:20 +00:00
Katie NguyenandGitHub cacbdbcf93 fix: lowercase maintenance (#2618) 2024-01-10 15:04:33 +00:00
Katie NguyenandGitHub 7737a98ec9 fix: lowercase hyperparameter tuning within text cells (#2619) 2024-01-10 15:03:51 +00:00
Ivan NardiniandGitHub 745bd03644 feat: adding Vertex AI Deployer notebook (#2613)
* adding vertexai deployer notebook

* linter test passed

* adding codeowners

* eric review

* linter test passed
2024-01-10 15:02:36 +00:00
Huguens JeanandGitHub c502dee709 Adding Pytorch-ZipNeRF notebook to Vertex AI samples model garden. (#2615)
* Adding Pytorch-ZipNeRF notebook to Vertex AI samples model garden.

* Format and lint Pytorch-ZipNeRF notebook.
2024-01-08 18:56:16 +00:00
KCFindstrandGitHub a1e0012df0 Add #ModelGarden Wizard LM notebook (#2614) 2024-01-08 18:54:46 +00:00
Douglass ChenandGitHub 9f6f46d56e Fix ready_to_go text classification pipeline notebook (#2609)
* Code fix, specify that old version of components library must be used

* reformat

* fix workbench url
2024-01-08 18:52:54 +00:00
Katie NguyenandGitHub f90d4f59c0 fix: lowercase distributed training (#2606) 2023-12-22 02:25:43 +00:00
Katie NguyenandGitHub 3e31d830c6 fix: lowercase batch prediction (#2605) 2023-12-21 23:36:18 +00:00
Katie NguyenandGitHub c0607f46ba fix: update name to cloud profiler (#2604) 2023-12-21 21:39:09 +00:00
Katie NguyenandGitHub b67cccb91a fix: update video workbook title (#2602) 2023-12-21 13:15:14 +00:00
Katie NguyenandGitHub 70db60129a fix: update workbook title (#2601) 2023-12-20 22:23:48 +00:00
Kathy YuandGitHub a185e106e0 Switch API for launching evaluation jobs and make bug fixes. (#2598)
* Switch API for launching evaluation jobs and make bug fixes.

* Fix linter issues.
2023-12-19 14:15:54 +00:00
dstnluong-googleandGitHub 38a1367fb8 Fix typos in Vicuna and Openllam Notebook. (#2594) 2023-12-15 19:50:53 +00:00
KCFindstrandGitHub f991f868d2 Add #ModelGarden wizard coder notebook. (#2595) 2023-12-15 19:49:56 +00:00
Eric DongandGitHub 813547b8fd fix: bad link to PaLM (#2596) 2023-12-15 16:06:41 +00:00
Kathy YuandGitHub 6cac1b2456 Add Mixtral 8x7B to Mistral notebook. (#2584) 2023-12-14 19:49:24 +00:00
Mend RenovateandGitHub f23cade8a6 chore(deps): update dependency isort to v5.13.2 (#2576) 2023-12-14 15:33:40 +00:00
Mend RenovateandGitHub 45520e9c06 chore(deps): update dependency nbqa to v1.7.1 (#2549) 2023-12-14 15:32:58 +00:00
Mend RenovateandGitHub 903c964487 chore(deps): update dependency black to v23.12.0 (#2470) 2023-12-14 15:32:16 +00:00
Mend RenovateandGitHub a3bb4afe06 chore(deps): update python docker tag to v3.12 (#2315) 2023-12-14 15:14:09 +00:00
f242e348c4 Document RLHF and inference pipelines support chat-bison@001. (#2577)
This adds `chat-bison@001` to the table of supported models and documents chat dataset formats for relevant input parameters.

Co-authored-by: Ryan Latture <latture@google.com>
2023-12-13 21:54:45 +00:00
weigaryandGitHub 8d47ab03c7 Add a new notebook for sdxl LCM (#2582)
* Add SDXL-turbo as a separate section in the SDXL notebook.

* Add SDXL-turbo as a separate section in the SDXL notebook.

* Add a new notebook for sdxl LCM
2023-12-13 21:50:35 +00:00
e8b86f503f Use open source detectron2 docker. (#2583)
Co-authored-by: minwoopark <minwoopark@google.com>
2023-12-13 21:48:35 +00:00
dstnluong-googleandGitHub 9449785b20 Switch TFvisio docker URIs to use vertex-ai (#2280) 2023-12-13 21:47:41 +00:00
genquan9andGitHub ac4f63b4e0 remove old vertex_vision_model_garden folder (#2570) 2023-12-13 19:56:38 +00:00
weigaryandGitHub 65ee5cdf52 Sd turbo (#2572)
* Add SDXL-turbo as a separate section in the SDXL notebook.

* Add SDXL-turbo as a separate section in the SDXL notebook.
2023-12-13 19:52:24 +00:00
dstnluong-googleandGitHub 90219e0a76 Add GPTQ to Falcon Instruct (#2574)
* Add local inference for Falcon Instruct

* Lint

* Add memory necessary for falcon 7b

* nit: Typo

* add gptq quantization to falcon

* lint

* typo

* Comment out one setting.
2023-12-13 19:49:39 +00:00
dstnluong-googleandGitHub d2ad1dd763 Add cache_examples_on_gpu flag to GPTQ. (#2579)
* Add cache_examples_on_gpu flag to GPTQ.

* Lower GPU suggestions for 70b model.

* Lower GPU suggestions for 70b.

* Typo
2023-12-13 19:47:07 +00:00
Kathy YuandGitHub b2ec0e956e Update timm notebook to use vertex-ai docker link. (#2580) 2023-12-13 19:45:01 +00:00
dstnluong-googleandGitHub 7fb60acf89 Create 5 separate notebooks from LLaMA2 notebook sections (#2568)
* add deployment notebook

* lint

* add finetune notebook

* lint

* lint

* add evaluation notebook

* lint

* add rlhf notebook

* lint

* lint rlhf notebook?

* add notebooks to codeowners
2023-12-05 20:50:46 +00:00
genquan9andGitHub 4f2408ce9e use the vertex_model_garden links instead of vertex_vision_model_garden (#2567) 2023-12-05 20:50:13 +00:00
Kathy YuandGitHub ef9a176c75 Add evaluation for CodeLLaMA and fix typos in CodeLLaMA and Mistral notebooks. (#2566) 2023-12-04 15:11:41 +00:00
genquan9andGitHub e72fffd682 copy vertex_vision_model_garden as vertex_model_garden (#2565) 2023-12-04 15:11:07 +00:00
KCFindstrandGitHub a9301eeb64 Add hyperparameter tuning examples to #PEFT Llama2 and OpenLlama notebooks (#2564) 2023-12-04 15:10:04 +00:00
weigaryandGitHub 9e2dcd494a Add charts to the benchmark report. (#2563)
* Add charts to the benchmark report.

* Add charts to the benchmark report.
2023-12-02 00:09:06 +00:00
KCFindstrandGitHub 2ae33b5b12 Add OpenLLaMA hyperparameter tuning benchmark report (#2562) 2023-12-01 22:47:03 +00:00
weigaryandGitHub d85a1e9c0c Update the SD XL notebook for refiner to use the default GPU as L4 (instead of A100). (#2561) 2023-12-01 22:46:30 +00:00
dstnluong-googleandGitHub fff9673703 Add SD benchmarking report (#2560)
* Add SD benchmarking report

* Fix images

* remove old table

* grammar

* lint

* typo
2023-12-01 22:45:50 +00:00
dstnluong-googleandGitHub 55fbb89a95 Update Docker URIs. (#2554)
* Update Docker URIs.

* lint

* update docker URI

* typo

* add comma

* lint

* fix parameters

* Add quantization method to gptq
2023-12-01 22:45:12 +00:00
dstnluong-googleandGitHub 007610f4f2 Add quantization section for Openllama (#2551)
* Add quantization section for Openllama

* use peft serving for 3b quantized

* missing comma

* lint

* add quantization_method to gptq

* add quantization_method to gptq
2023-12-01 22:44:36 +00:00
weigaryandGitHub 1354c74058 Move the openllama 7b benchmark report to the centralized place. (#2559) 2023-12-01 22:43:34 +00:00
Andrew FerlitschandGitHub f36ab8ef40 fix: online FS (#2558) 2023-11-30 17:08:43 +00:00
Andrew FerlitschandGitHub 33793dbb78 fix: backticks (#2557) 2023-11-30 15:05:18 +00:00
Lav RaiandGitHub d3bdf63115 Vit report (#2556)
* Add ViT benchmarking report.

* Add ViT benchmarking report.

* Add ViT benchmarking report.

* Add ViT benchmarking report.

* Add ViT benchmarking report.

* Add ViT benchmarking report.
2023-11-30 14:20:04 +00:00
weigaryandGitHub f3395041e4 Add openllama-7b fine tuning benchmark report. (#2555) 2023-11-30 14:19:29 +00:00
Andrew FerlitschandGitHub 5dfc87cbab fix: FS legacy delete (#2553) 2023-11-29 18:17:40 +00:00
Andrew FerlitschandGitHub a162066c94 in-progress: SDK whl replacement (#2552)
* in-progress: SDK whl replacement

* add: cmd param
2023-11-29 18:17:07 +00:00
dstnluong-googleandGitHub a4940cc2ba Add quantization to llama2 notebook (#2550) 2023-11-29 03:20:21 +00:00
Andrew FerlitschandGitHub d1dfe04ff0 2nd part of deprecate (#2542)
* 2nd part of deprecate

* fix links
2023-11-22 23:55:33 +00:00
fca8a0f9f5 Support DITO custom categories (#2543)
Co-authored-by: minwoopark <minwoopark@google.com>
2023-11-20 21:27:39 +00:00
Andrew FerlitschandGitHub ea3a5d3d79 deprecate flaky notebook (#2541) 2023-11-20 19:25:19 +00:00
Andrew FerlitschandGitHub 013bd9b78b fine tuning: auto error detection (#2539) 2023-11-20 18:42:28 +00:00
Andrew FerlitschandGitHub 1ca46e450d update: notebook status (#2535) 2023-11-20 16:52:16 +00:00
Xiang XuandGitHub 6c4f09fd43 increase max_num_batched_tokens for vllm and remove streaming (#2536) 2023-11-17 20:46:26 +00:00
Andrew FerlitschandGitHub 66427bd244 fix: detecting internal (#2534) 2023-11-17 20:37:13 +00:00
weigaryandGitHub d49bae8d29 Update staable-diffusion 1.5 and XL notebooks to deploy with default GPU as L4, instead of A100. (#2533) 2023-11-17 19:40:17 +00:00
Andrew FerlitschandGitHub 66c05c8217 fix: typo in results vs result (#2532) 2023-11-17 18:46:51 +00:00
Andrew FerlitschandGitHub 79473f0b88 fix: cleanup for FS 2.x (#2526) 2023-11-17 14:35:47 +00:00
Andrew FerlitschandGitHub 2568e012f9 fix: detect other types of quota and internal errors (#2525) 2023-11-16 23:50:25 +00:00
Kathy YuandGitHub 97fa323aca Fix typo in LLaMA 2 instructions. (#2524) 2023-11-16 22:04:52 +00:00
Kelsi LakeyandGitHub 20a9ff65e0 Update IMAGE_URI in tensorboard_custom_training_with_custom_container.ipynb (#2522)
Add variable in IMAGE_URI to set region. Right now it is hard-coded to us-central1.
2023-11-16 22:04:11 +00:00
Andrew FerlitschandGitHub ed6de9fde5 feat: stub and document reaper support for FS 2.x (#2521) 2023-11-15 22:04:01 +00:00
zhangxiaotianandGitHub dbaa3d098c fix clean up (#2520)
* improve to make it more aligned with the template

* fix:fix clean up section
2023-11-15 21:53:44 +00:00
Andrew FerlitschandGitHub 7e77de2800 CI/CD fix (#2514)
* CI/CD fix

* pin 1.34
2023-11-15 17:59:11 +00:00
Andrew FerlitschandGitHub ef8b70db32 Update CI/CD fix (#2513) 2023-11-15 00:09:33 +00:00
578adab3b0 revert how sdk is downloaded (#2518)
Co-authored-by: Kamal Gurala <gkamal@google.com>
2023-11-15 00:08:22 +00:00
KCFindstrandGitHub 3ef187ecc3 Update Llama2 PEFT notebook train docker version (#2519) 2023-11-15 00:05:45 +00:00
23dc370602 Updates optimized to remove known issues (#2512)
Co-authored-by: Kamal Gurala <gkamal@google.com>
2023-11-15 00:05:17 +00:00
Andrew FerlitschandGitHub d1835e98af feat: auto find latest build results (#2517) 2023-11-15 00:00:31 +00:00
823c10315a Update vector notebook to remove disclaimer (#2515)
* Update vector notebook to disclaimer

* Update region used for vector case

---------

Co-authored-by: Kamal Gurala <gkamal@google.com>
2023-11-14 22:51:17 +00:00
Kathy YuandGitHub 497297007c Update serving container version for sequence classification models. (#2509) 2023-11-14 22:17:31 +00:00
87ddc8ec00 Update for GA relase, use v1 sdk, and remove known issues (#2510)
* Updates Bigtable serving noteebok for GA release

* Removes preview disclaimer

* Updates from linter

---------

Co-authored-by: Kamal Gurala <gkamal@google.com>
2023-11-14 22:17:01 +00:00
Andrew FerlitschandGitHub eb104d4d92 fix: capture log on fail (#2508) 2023-11-14 20:59:49 +00:00
zhangxiaotianandGitHub ba335b250b improve to make it more aligned with the template (#2506) 2023-11-14 20:41:57 +00:00
Andrew FerlitschandGitHub 5f014bcf34 CI/CD debug (#2503) 2023-11-14 20:30:29 +00:00
Andrew FerlitschandGitHub 0d453b7e01 documented what to do for FS 2.x cleanup (#2507) 2023-11-14 18:27:23 +00:00
Andrew FerlitschandGitHub 379644e115 Update CI/CD debug (#2504) 2023-11-14 16:43:53 +00:00
Andrew FerlitschandGitHub 72ab1484b7 deprecate to community (#2502) 2023-11-14 16:32:54 +00:00
zhangxiaotianandGitHub 885a62489e fix: fix image rending for running in Jupyter (#2501) 2023-11-14 15:45:47 +00:00
Andrew FerlitschandGitHub 9591e8db4d fix CI/CD (#2498) 2023-11-14 00:27:39 +00:00
Andrew FerlitschandGitHub 9757e14644 feat: filter for notebooks under investigation (#2497) 2023-11-13 23:53:33 +00:00
Kathy YuandGitHub 959c56a4c7 Add documentation for building chat applications using LLaMA 2. (#2494) 2023-11-13 19:17:29 +00:00
Andrew FerlitschandGitHub ea1afda39d fix: internal and log url (#2492) 2023-11-13 19:06:41 +00:00
weigaryandGitHub e8539218e4 Temporarily pin the docker to 20231112_0948_RC00. (#2493) 2023-11-13 18:49:32 +00:00
Andrew FerlitschandGitHub 4fb0761fb8 add log url (#2490)
* add log url

* fix: syntax error

* fix: syntax error
2023-11-13 17:39:16 +00:00
Andrew FerlitschandGitHub 6a61010225 feat: finish round1 of dirty dashboard (#2489)
* feat: finish round1 of dirty dashboard

* debug: CICD issue
2023-11-13 17:38:04 +00:00
838e72087f refactor: explicitly prepare featch_Feature_values request (#2485)
* refactor: explicitly prepare featch_Feature_values request

* Fix unintednded metadata updates

* Fixes from linter

* add unique to resource ids

* add unique to resource ids for public optimized

---------

Co-authored-by: Kamal Gurala <gkamal@google.com>
Co-authored-by: Andrew Ferlitsch <aferlitsch@google.com>
2023-11-11 01:15:29 +00:00
zhangxiaotianandGitHub c633231e07 Warehouse (#2484)
* add warehouse sdk colab

* update owner

* update colab and github link

* resolve comments

* resolve comments

* resolve comments

* fix format

* remove unused code

* resolve lint
2023-11-10 23:03:37 +00:00
zhangxiaotianandGitHub 5f73c9e445 create a notebook for image warehouse (#2488)
* create a notebook for image warehouse

* update

* resolve comments

* resolve comments
2023-11-10 22:41:14 +00:00
Andrew FerlitschandGitHub 4d77391672 fix: bad link (#2486) 2023-11-10 21:18:32 +00:00
Matthew TangandGitHub 289db671b8 [Vertex AI SDK] Remove sdk2 wording from bigframes notebooks (#2487)
* Remove sdk2 wording

* don't override class
2023-11-10 21:15:29 +00:00
weigaryandGitHub c725d85433 Update stable diffusion 2.1 notebook to use the optimized serving docker (#2483)
* Update stable diffusion 2.1 notebook to use the optimized serving docker.

* Update model_garden_pytorch_stable_diffusion_2_1.ipynb

* Update model_garden_pytorch_stable_diffusion_2_1.ipynb
2023-11-10 21:13:22 +00:00
Andrew FerlitschandGitHub 6f48419a31 pin to fix CI/CD failure (#2480) 2023-11-10 18:02:30 +00:00
Andrew FerlitschandGitHub 3c83824d02 fix syntax error (#2481) 2023-11-09 19:54:23 +00:00
Andrew FerlitschandGitHub 7d53d90235 fix: timeout in CI/CD (#2478) 2023-11-09 19:42:43 +00:00
Matthew TangandGitHub fc3f467899 [Vertex AI SDK] Remove bigframes tf-io installation on user side (#2472)
* Remove tf-io installation on user side

* Fix lint
2023-11-09 19:31:40 +00:00
Andrew FerlitschandGitHub 11fe3dbc28 fix: missing link (#2466) 2023-11-09 18:11:12 +00:00
Andrew FerlitschandGitHub 253f755d86 fix: remove output (#2476) 2023-11-09 16:50:03 +00:00
Mend RenovateandGitHub 89b868705b chore(deps): update actions/checkout action to v4 (#2394) 2023-11-09 14:32:16 +00:00
Mend RenovateandGitHub 038fc057ee chore(deps): update dependency pyupgrade to v3.15.0 (#2314) 2023-11-09 14:30:53 +00:00
Andrew FerlitschandGitHub 4377a1b485 fix: bug in selection algo for age and max notebooks (#2475)
* fix: invert time test

* fix: percent unt
2023-11-09 00:17:51 +00:00
Andrew FerlitschandGitHub 9f5cb39eb4 already in official (#2477) 2023-11-09 00:17:28 +00:00
yexing111andGitHub 103c168a82 Rephrase optimized notebook to address previous comment (#2473)
* Rephrase optimized notebook

* Update format issue and change region

* Update format issue and change region2

* Fix import format

* Apply format

* Change region
2023-11-08 22:04:42 +00:00
Andrew FerlitschandGitHub 42914ffba6 fix: read from local file (#2474)
* fix: read from local file

* fix: GCS file
2023-11-08 21:46:03 +00:00
Andrew FerlitschandGitHub b4f3601262 debug: saving results (#2471) 2023-11-08 19:48:43 +00:00
yexing111andGitHub 3978ea80bf Create new colab for FS optimized serving (#2454)
* Create new colab for FS optimized serving

* Address comments

* Fix allowlist syntax error with param

* Change default region to trigger test in clean env

* Comment expect to fail cells

* Change default region to trigger test
2023-11-08 13:15:24 +00:00
Kelsi LakeyandGitHub b3a8e98150 Update delete_outdated_tensorboard_experiments.ipynb (#2469)
Change detailed_log to match DETAILED_LOG variable defined above.
Add note about how user can set tensorboard experiment labels.
2023-11-08 00:56:39 +00:00
weigaryandGitHub 817e9f6f5f Update stable diffusion XL notebook to use the optimized serving docker. (#2467)
* Update stable diffusion XL notebook to use the optimized serving docker.

* Update model_garden_pytorch_stable_diffusion_xl_1_0.ipynb

minor update

* Update model_garden_pytorch_stable_diffusion_xl_1_0.ipynb

minor update
2023-11-08 00:55:49 +00:00
Andrew FerlitschandGitHub f028260fe9 feat: detect error from log (#2465)
* feat: detect error from log

* fix: None
2023-11-07 15:57:13 +00:00
Mend RenovateandGitHub 3b0dc3a9af chore(deps): update dependency black to v23.10.1 (#2086) 2023-11-07 13:51:08 +00:00
Kathy YuandGitHub d27adf8c47 Update swap space setting for CodeLLaMA notebook. (#2462) 2023-11-07 00:13:51 +00:00
KCFindstrandGitHub 4873c54cf0 Add hyperparameter tuning instructions to llama2 PEFT notebook (#2460) 2023-11-07 00:13:27 +00:00
Andrew FerlitschandGitHub 55645a8583 fix: protect harness from system wide execution failure (#2464)
* feat: add option for files not to index

* fix: harden harness against system failure
2023-11-06 16:17:38 +00:00
Andrew FerlitschandGitHub 47da217cca Tpu ga 2 (#2461)
* migrate to official

* fix: AR permission

* fix: TPU available

* convert to KFP2
2023-11-03 20:49:48 +00:00
Andrew FerlitschandGitHub 2cc877438c fix: timeout (#2458) 2023-11-02 16:46:34 +00:00
Jose BracheandGitHub 2ee1c72bf9 Jbrache 20231101 (#2457)
* chore: Renaming notebook, updated text formatting, typos.

* chore: Renaming notebook, updated text formatting, typos.
2023-11-02 16:42:41 +00:00
Kathy YuandGitHub ee5f69b5b8 Add deployment recommendations, clarifications and bug fixes to PEFT and vLLM notebooks. (#2455) 2023-11-01 20:19:26 +00:00
Andrew FerlitschandGitHub da3f4abbc2 updates for webdoc index generation (#2456)
* fix: remove backticks

* fix: vector search branding
2023-11-01 18:52:04 +00:00
Andrew FerlitschandGitHub cc585a3faa fix broken links (#2453) 2023-11-01 13:27:59 +00:00
Andrew FerlitschandGitHub 6afc5ce353 fix: skipping in indexer (#2452) 2023-10-31 22:36:33 +00:00
Andrew FerlitschandGitHub 9cb9d272f0 fix: last date ran (#2451) 2023-10-31 21:00:07 +00:00
weigaryandGitHub 759726e7b4 Update the stable diffusion 1.5 notebook to use the optimized serving docker image (#2450) 2023-10-31 20:55:23 +00:00
kemurayamaandGitHub d282fe7461 Update model_garden_pytorch_stable_diffusion_2_1.ipynb (#2446)
Deleted `torch_dtype=torch.float16` on line 397
2023-10-31 20:54:57 +00:00
Andrew FerlitschandGitHub ed7cd22e27 feat: add arg for run first file (#2449) 2023-10-31 19:04:32 +00:00
Andrew FerlitschandGitHub fdac86f541 fix: run first (#2448) 2023-10-31 17:54:22 +00:00
Andrew FerlitschandGitHub 7f464a92e0 migrate to official (#2443)
* migrate to official

* fix: missing install

* fix: import os

* fix: IS_COLAB
2023-10-30 19:11:44 +00:00
Andrew FerlitschandGitHub a779d317af migrate to official (#2431)
* migrate to official

* fix: artifact registry

* fix: lint

* fix: missing image

* fix: add more cleanup
2023-10-30 19:10:05 +00:00
Andrew FerlitschandGitHub ee538ce371 migrate to official (#2444)
* migrate to official

* fix: missing installs

* fix: IS_COLAB
2023-10-30 17:27:30 +00:00
Andrew FerlitschandGitHub 2ec5b39bdc migrate to official (#2441)
* migrate to official

* fix: remove param

* fix: IS_COLAB

* fix: requirements.txt

* fix: image missing

* fix: IS_TESTING

* fix: IS_TESTINGFG
2023-10-30 14:27:17 +00:00
Andrew FerlitschandGitHub 68f160db50 migrate to official (#2445) 2023-10-30 14:20:12 +00:00
Andrew FerlitschandGitHub b65392f2be fix: learn more about (#2419)
* fix: learn more about

* fix: VPC issue

* fix: VPC issue

* fix: handle exception

* fix: add VPC network

* fix: lint
2023-10-30 14:06:58 +00:00
Jaycee LiandGitHub 6625012a95 Move sdk2 bigframes notebooks (#2440)
* Refactor SDK 2.0 notebooks

* fix linting

* Update CODEOWNERS

* change codeowner username

* install dependencies

* update dependencies

* update folder name

* Update CODEOWNERS

* move sdk2 notebooks

* linting
2023-10-27 17:47:55 +00:00
e542e915b1 Colab (#2439)
* Support Colab Enterprise

* Support Colab Enterprise

---------

Co-authored-by: minwoopark <minwoopark@google.com>
2023-10-27 17:47:00 +00:00
Huguens JeanandGitHub 757419e1b1 Update BioGPT serve docker URI in notebook. (#2438) 2023-10-27 17:46:28 +00:00
Andrew FerlitschandGitHub 3dd41db8a5 fix: timeouts (#2437) 2023-10-27 17:01:30 +00:00
Andrew FerlitschandGitHub c027f88d2a fix: unreliable service (#2436) 2023-10-27 15:30:43 +00:00
Mend RenovateandGitHub 596bb6a6b7 chore(deps): update dependency flake8 to v6.1.0 (#2131) 2023-10-27 14:56:51 +00:00
xqr-gandGitHub d3a6a7bf91 change model version (#2433) 2023-10-26 23:03:11 +00:00
Jaycee LiandGitHub be68829742 Refactor SDK 2.0 notebooks (#2367)
* Refactor SDK 2.0 notebooks

* fix linting

* Update CODEOWNERS

* change codeowner username

* install dependencies

* update dependencies

* update folder name

* Update CODEOWNERS
2023-10-26 18:54:02 +00:00
dstnluong-googleandGitHub 64be3cd9ee Fix VLLM format string. (#2432)
* Minor updates to Vicuna notebook

* Lint

* Fix format string for Vicuna notebook.
2023-10-26 17:41:33 +00:00
Eric DongandGitHub 2414433f94 chore: remove unnecessary comments from the template (#2428) 2023-10-26 15:40:49 +00:00
Andrew FerlitschandGitHub 7206ea4d99 Harden 9 (#2429)
* fix: force run based on age of last run

* fix: force run based on age of last run
2023-10-26 15:40:34 +00:00
Andrew FerlitschandGitHub 8dad9cd13f fix: clean and rebrand - permission (#2335)
* fix: clean and rebrand

* fix: VPC setup

* rebrand

* rebrand

* fix: PROJECTT

* fix: VPC network

* fix: redis

* fix: import os
2023-10-25 21:20:59 +00:00
Andrew FerlitschandGitHub d0037863ff feat: record last date of fail (#2425) 2023-10-25 17:20:12 +00:00
Andrew FerlitschandGitHub ce4b2b1781 fix CI/CD error (#2423) 2023-10-25 17:03:37 +00:00
Andrew FerlitschandGitHub 8b2e7766c3 add more notebooks to list (#2424) 2023-10-25 16:51:11 +00:00
Andrew FerlitschandGitHub 7844755cac feat: select notebook if failed on last run (#2420) 2023-10-25 12:56:53 +00:00
Andrew FerlitschandGitHub 6f566cc4f8 feat: add option for files not to index (#2418) 2023-10-24 18:59:35 +00:00
Andrew FerlitschandGitHub 6ac2f82c0b debug CI/CD failure (#2405)
* debug CI/CD failure

* pin GCPC version
2023-10-24 18:24:55 +00:00
Andrew FerlitschandGitHub 1f818fe469 Harden 3 (#2416)
* feat: run-first argument

* feat: run-first code

* feat: add run first file
2023-10-24 17:03:33 +00:00
weigaryandGitHub 51f87eb06a Pin the transformer-serve version in the NLLB notebook (#2417) 2023-10-24 16:58:33 +00:00
KCFindstrandGitHub cdb5c1c54b Switch #BiomedCLIP default GPU to V100 (#2415) 2023-10-24 16:58:03 +00:00
dstnluong-googleandGitHub 7f6c2f28d3 Minor updates to Vicuna notebook. (#2410)
* Minor updates to Vicuna notebook

* Lint
2023-10-24 16:57:28 +00:00
Kathy YuandGitHub ced4f55dac Add V100 recommendations for LLaMA 2. (#2409) 2023-10-24 16:56:52 +00:00
Andrew FerlitschandGitHub a5a003b831 Harden 2 (#2414)
* feat: run-first argument

* feat: run-first code
2023-10-24 13:57:46 +00:00
Andrew FerlitschandGitHub e7b8238615 fix: filename only not path (#2412) 2023-10-23 20:11:19 +00:00
Andrew FerlitschandGitHub e5a50be51e feat: skip notebook option (#2411) 2023-10-23 19:37:37 +00:00
Andrew FerlitschandGitHub e5bfc74c11 clean: not index notebooks w/o webdoc page (#2408) 2023-10-23 17:57:49 +00:00
Andrew FerlitschandGitHub d03779423c cleanup: obsolete build files (#2406) 2023-10-23 17:01:54 +00:00
weigaryandGitHub ba62d20dad Update an incorrect hyperlink in the NLLB notebook. (#2403)
* Add a notebook example for the NLLB model in model garden

* Add a notebook example for the NLLB model in model garden

* Update an incorrect hyperlink in the NLLB notebook.
2023-10-23 16:30:56 +00:00
KCFindstrandGitHub 50273e9883 Tag PEFT trainer docker in #ModelGarden notebooks. (#2404) 2023-10-20 23:42:07 +00:00
Kelsi LakeyandGitHub d6ab1248e2 Remove tensorboard billing alert from get_started_with_vertex_experiments_autologging.ipynb (#2402) 2023-10-20 23:39:59 +00:00
c6f451c8d1 Patch-4 (#2363)
* Miscellaneous editorial fixes and rebranding to "Vertex AI Feature Store (Legacy)"

* chore: rebrand Legacy Feature Store product

* chore: Rebrand to "Vertex AI Feature Store (Legacy)" and change "ingest" to "import".

---------

Co-authored-by: Andrew Ferlitsch <aferlitsch@google.com>
2023-10-20 22:26:02 +00:00
Andrew FerlitschandGitHub 71f3f12607 fix CI/CD failure (#2398) 2023-10-20 20:51:01 +00:00
Sebastian SchmidtandGitHub c7b9274c2e Display generated images in Image Generator notebook (#2395)
* Display generated images in Image Generator notebook

* Style

* Lint
2023-10-20 18:47:40 +00:00
Kathy YuandGitHub ee46a01c83 Open-source ImageBind serving Docker image. (#2401)
* Open-source ImageBind serving Docker image.

* Update CODEOWNERS to cover ImageBind.
2023-10-20 18:19:35 +00:00
Kathy YuandGitHub d8a6659fd2 Update deployment recommendations in ImageBind notebook. (#2400) 2023-10-20 18:18:55 +00:00
Andrew FerlitschandGitHub b24eb863af migrate to official (#2354)
* migrate to official

* workaround VPC

* fix: missing title
2023-10-20 18:15:59 +00:00
Andrew FerlitschandGitHub a0bebae049 migrate to official (#2355)
* migrate to official

* fix: settings

* workaround VPC
2023-10-20 17:35:46 +00:00
Andrew FerlitschGitHubivanmkc@google.com <ivanmkc@google.com>
1cab2c2d1c rebrand and clean (#2350)
* rebrand and clean

* fix: Added better type checking and fixed misspelling of _GCP_VPC_NETWORK_NAME

---------

Co-authored-by: ivanmkc@google.com <ivanmkc@google.com>
2023-10-20 15:50:52 +00:00
Andrew FerlitschandGitHub f0dacd8ccd deprecate to community (#2396) 2023-10-20 12:31:17 +00:00
Andrew FerlitschandGitHub 9b8dd67fc6 clean and rebrand - parallelism (#2338)
* clean and rebrand

* import

* import

* fix: lint

* deprecate: move to community

* fix: lint
2023-10-20 12:30:21 +00:00
Andrew FerlitschandGitHub fe57394773 fix: link (#2393) 2023-10-19 16:58:36 +00:00
Kathy YuandGitHub 6b98f077b7 Add ImageBind notebook. (#2392) 2023-10-19 16:56:50 +00:00
Huguens JeanandGitHub b515719465 Chore: Open source Segment Anything handler and dockerfile to Model Garden. (#2389) 2023-10-19 16:56:06 +00:00
dstnluong-googleandGitHub 0603133c15 Add accelerator suggestions for Vicuna. (#2374)
* Add Vicuna notebook

* Add notebook to CODEOWNERS

* add GPU recs

* replace 33b with 13b-32k

* lint

* Update accelerator count

* Lint

* Add suggested accelerator setup.

* Lint

* Add comment for max_model_len

* remove license line
2023-10-19 16:55:37 +00:00
Andrew FerlitschandGitHub 9901150c5c fix: add missing learn about (#2388) 2023-10-18 19:23:25 +00:00
3d7886eb0b Fix CODEOWNERS change due to merge conflict. (#2390)
Co-authored-by: minwoopark <minwoopark@google.com>
2023-10-18 17:29:54 +00:00
9abb80db28 Add DITO notebook (#2387)
Co-authored-by: minwoopark <minwoopark@google.com>
Co-authored-by: Andrew Ferlitsch <aferlitsch@google.com>
2023-10-18 16:55:29 +00:00
85e93c8db3 Add OWL-ViT v2 notebook (#2386)
* Add OWL-ViT v2 notebook

* Add OWL-ViT v2 notebook.

---------

Co-authored-by: minwoopark <minwoopark@google.com>
2023-10-18 16:53:24 +00:00
Andrew FerlitschandGitHub df11806ebf fix: missing learn more about (#2384) 2023-10-18 14:16:28 +00:00
Andrew FerlitschandGitHub 57210868ad fix: missing learn more about (#2385) 2023-10-18 12:28:23 +00:00
Jose BracheandGitHub 44fa59f6de Jbrache persistent resource (#2379)
* feat: Committing new example for persistent resources

* feat: Committing new example for persistent resources
2023-10-17 21:32:52 +00:00
Xiang XuandGitHub d397549dac fix streaming (#2378) 2023-10-17 19:42:20 +00:00
Andrew FerlitschandGitHub c45aaff2f1 fix: handling H1 heading (#2383) 2023-10-17 17:47:12 +00:00
Andrew FerlitschandGitHub 88cf9b3278 update indices (#2382) 2023-10-17 17:42:09 +00:00
Matthew TangandGitHub b589216811 Clean up SDK2 Bigframes notebooks (#2362)
* Clean up SDK2 Bigframes notebooks

* Debug ci dependency error

* Remove cell output

* Remove local overrides

* Additional debug

* Re-trigger CI test

* Rerun CI tests

* Rerun CI tests

* Rerun CI tests

* Add tensorflow-io-gcs-filesystem pin

* Fix version pin

* Fix other version pin
2023-10-17 17:05:54 +00:00
Andrew FerlitschandGitHub 7ae85ce5d6 fix: CI/CD failure (#2377)
* fix: CI/CD failure

* deprecate from official

* lint
2023-10-17 15:58:15 +00:00
Andrew FerlitschandGitHub 0ad3530420 Debug CI/CD failure (#2375)
* Debug CI/CD failure

* change TF11 to TF12

* Update get_started_with_custom_training_autologging_local_script.ipynb

try 2.10

* valid TF12
2023-10-16 23:36:47 +00:00
Andrew FerlitschandGitHub 58547f4630 CI/CD: debug fail (#2346)
* CI/CD: debug fail

* unhardcode the PROJECT_ID
2023-10-16 23:36:02 +00:00
Sebastian SchmidtandGitHub 4fca43d63d Update MediaPipe Image Generator notebook with latest changes (#2372) 2023-10-16 16:40:25 +00:00
KCFindstrandGitHub 8a0acfa1b0 Remove misleading prompt output from openllama notebook (#2371) 2023-10-13 15:35:24 +00:00
KCFindstrandGitHub 90001d4234 Add custom dataset support to #ModelGarden PEFT notebooks (#2370)
* Add custom dataset support to #ModelGarden PEFT notebooks

* Update OpenLLaMA notebook

* Revert unnecessary change in Llama2 notebook.
2023-10-12 20:10:13 +00:00
sen-samandGitHub 3d4bd5fdfc chore: rebrand "Vertex AI Feature Store (Legacy)", miscellaneous editorial changes, and changing "ingest" to "import" globally. (#2369) 2023-10-12 20:09:17 +00:00
Kathy YuandGitHub 283c0a3727 Add model evaluation to Dolly V2 notebook. (#2368) 2023-10-12 20:08:23 +00:00
Andrew FerlitschandGitHub bbfc2d9114 migrate to official (#2356)
* migrate to official

* fix: os

* fix: review

* fix: review
2023-10-12 00:17:20 +00:00
Kathy YuandGitHub fa1cfbe09b Remove extra print statement in LLaMA 2 notebook. (#2366) 2023-10-11 22:48:51 +00:00
KCFindstrandGitHub c781c9f7ad Update #ModelGarden TFVision notebooks model export docker URI. (#2365) 2023-10-11 22:48:26 +00:00
Huguens JeanandGitHub 4c37f8e43b Update SAM docker URI and accelerator type for vertex endpoint deployment. (#2361) 2023-10-11 22:47:41 +00:00
KCFindstrandGitHub acf5853b98 Add #ModelGarden BiomedCLIP notebook. (#2364) 2023-10-11 19:05:29 +00:00
Julio Anthony LeonardandGitHub 7d086b08e7 Fix typos and sentence (#2359)
Fix a typo and add more clarity to sentences
2023-10-11 12:17:33 +00:00
sen-samandGitHub e4275197ac Miscellaneous editorial fixes and rebranding to "Vertex AI Feature Store (Legacy)" (#2358)
* Miscellaneous editorial fixes and rebranding to "Vertex AI Feature Store (Legacy)"

* chore: rebrand Legacy Feature Store product
2023-10-11 00:35:56 +00:00
Xiang XuandGitHub 8fede82c32 Upgrade deps version for Mistral model (#2351) 2023-10-09 22:53:13 +00:00
Andrew FerlitschandGitHub e598af21ac debug: CI/CD failure (#2347)
* debug: CI/CD failure

* debug: CI/CD failure
2023-10-06 22:24:59 +00:00
Andrew FerlitschandGitHub 682786616c port: kfp2 (#2302)
* port: kfp2

* fix import importer_node

* fix: selector

* fix: format

* lint

* set node

* fix: types

* fix: type

* types

* yaml/json

* yaml/json

* train image

* train image

* key error

* fix: outputs

* fix: outputs

* fix: outputs

* fix: outputs

* fix: outputs
2023-10-06 20:40:51 +00:00
dstnluong-googleandGitHub feee6149a1 Add Vicuna notebook (#2252)
* Add Vicuna notebook

* Add notebook to CODEOWNERS

* add GPU recs

* replace 33b with 13b-32k

* lint

* Update accelerator count

* Lint
2023-10-06 17:57:31 +00:00
Huguens JeanandGitHub bf374c8c5e Fix BioGPT notebook name in Vertex AI Model Garden. (#2344) 2023-10-06 17:29:02 +00:00
Xiang XuandGitHub 7e58fb8471 add streaming to llm notebooks (#2345) 2023-10-06 17:27:22 +00:00
Andrew FerlitschandGitHub 37f75ce3da fix: rebrand (#2342) 2023-10-06 13:45:14 +00:00
Andrew FerlitschandGitHub 2b94e8b51e fix: rebrand (#2343) 2023-10-06 13:43:37 +00:00
Andrew FerlitschandGitHub 0041b7da91 fix: rebrand (#2341) 2023-10-06 13:42:32 +00:00
Andrew FerlitschandGitHub 6de14d11c8 port: kfp2 (#2327)
* port: kfp2

* fix: imports

* fix: v1

* fix: params

* fix: params

* fix: imports

* fix: model upload

* fix: importer node

* fix: artifacts_type

* fix: component paths

* fix: component paths

* fix: component paths
2023-10-06 00:20:50 +00:00
Rajesh ThallamandGitHub 203d2e8a0b Add Mistral models to Vertex AI Model Garden (#2340)
* PyTorch efficient training - refcator code

* Revert "PyTorch efficient training - refcator code"

This reverts commit 90b563a7697b15b4154ac76236b894253dd58f3c.

* Add notebook to deploy Mistral models on Vertex AI

* Add notebook to deploy Mistral models on Vertex AI

* Add notebook to deploy Mistral models on Vertex AI

* Updated notebook to deploy Mistral models on Vertex AI

* Linting fixes

* Adding endpoint cleanup and machine spec

* Updating CODEOWNERS file

* Update linting fixes
2023-10-06 00:02:22 +00:00
Andrew FerlitschandGitHub ca7cb251ec fix: rebrand (#2339) 2023-10-05 23:21:42 +00:00
Andrew FerlitschandGitHub db359011f4 fix: rebrand/clean (#2334) 2023-10-05 22:56:14 +00:00
Andrew FerlitschandGitHub 52313b8fc4 fix: remove redis (#2333) 2023-10-05 22:55:39 +00:00
sen-samandGitHub c6a2c8e673 Update online_feature_serving_and_fetching_bigquery_data_with_feature_store.ipynb (#2331)
Made a minor fix flagged by the PM.
2023-10-05 18:48:08 +00:00
sen-samandGitHub 3e090ce61d Update online_feature_serving_and_vector_retrieval_bigquery_data_with_feature_store.ipynb (#2332)
Minor change (restored the missing "of" in the title).
2023-10-05 18:47:40 +00:00
Huguens JeanandGitHub 8061ce96ed Add BioGPT to Vertex AI Model Garden. (#2323) 2023-10-05 15:51:28 +00:00
5eeb4b1fd9 Add offical notebook for Vertex SDK LLM snippets (#1843)
* Add offical notebook for Vertex SDK LLM snippets

* Updating based on template

* cleanup for linter

* edit notebook

* fix lint

* test checks

* project id

* comply with template

* fix lint

* add pandas import

* fix lint

* fix test error

* Address Andy's comments

---------

Co-authored-by: Yvonne <liyvonne@google.com>
2023-10-05 00:15:02 +00:00
Andrew FerlitschandGitHub bc14aa72b9 fix: CI/CD failure (#2329) 2023-10-04 23:18:20 +00:00
Andrew FerlitschandGitHub c9faf848b2 port: kfp2 (#2328) 2023-10-04 23:17:29 +00:00
Andrew FerlitschandGitHub ea89e8e1f6 port: kfp2 (#2326) 2023-10-04 23:13:08 +00:00
Andrew FerlitschandGitHub aa8e2c6af3 port: kfp2 (#2318)
* port: kfp2

* port: kfp2
2023-10-04 20:28:16 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2529586683 build(deps): bump pillow (#2322)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.1...10.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 16:38:17 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
66601678e0 build(deps): bump pillow (#2321)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.1...10.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 16:37:47 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75da4cfb99 build(deps): bump pillow (#2320)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.1...10.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 16:37:09 +00:00
Eric DongandGitHub 7d406848ea feat: feature store 2.0 tutorial (goku) (#2281)
* feat: feature store 2.0 tutorial (goku)

* Complying with the template

* Complying with the template 2

* clarify the notebook description

* clarify the notebook description 2

* address review comments and rename file

* add known issue and change install package

* wait for the sync job to complete, and fix resource conflicts

* address review comments

* address review comments 2

* add a delay for the endpoint to start properly
2023-10-04 01:20:44 +00:00
Eric DongandGitHub 2aea69a022 feat: feature store 2.0 tutorial for feature value fetching (#2283)
* feat: feature store 2.0 tutorial for feature value fetching

* remove 2.0 references and rename file name

* add known issue and change install package

* add sdk; add job check logic; fix cleanup

* address review comments
2023-10-03 20:54:03 +00:00
Andrew FerlitschandGitHub 4a56ab4138 port: kfp2 (#2313) 2023-10-03 14:31:40 +00:00
Andrew FerlitschandGitHub b7c7691c52 kfp: notice (#2312) 2023-10-03 01:50:37 +00:00
Andrew FerlitschandGitHub 57da2a745f kfp: notice (#2311) 2023-10-03 01:50:04 +00:00
Andrew FerlitschandGitHub d0ea048385 fix: notice (#2310) 2023-10-03 01:49:28 +00:00
Andrew FerlitschandGitHub 15537b2ed8 port: kfp2 (#2309) 2023-10-03 01:48:47 +00:00
Andrew FerlitschandGitHub a3239d8b71 port: kfp2 (#2308) 2023-10-03 01:48:10 +00:00
Andrew FerlitschandGitHub 6ecebd2973 port: kfp2 (#2304)
* port: kfp2

* fix: import

* fix: params

* fix: json/yaml
2023-10-02 21:37:01 +00:00
Andrew FerlitschandGitHub c4fe6fad23 deprecate (#2306) 2023-10-02 20:29:36 +00:00
Andrew FerlitschandGitHub a162051187 deprecate (#2305) 2023-10-02 20:18:58 +00:00
Ashley XuandGitHub 0d7d96e09c feat: add BigFrames llm code notebooks in generative_ai (#2290)
* feat: add BigFrames llm code notebooks

* fix: fix the linter and address comments
2023-10-02 17:26:07 +00:00
Huguens JeanandGitHub 5a1549d5cc Open source jax vision transformer to model garden. (#2295) 2023-10-02 16:11:16 +00:00
Kathy YuandGitHub aed9434c7f Add instructions for using L4-24G GPUs to serve LLaMA 2 70B models. (#2303) 2023-10-02 16:00:58 +00:00
Andrew FerlitschandGitHub 5ce45d1222 port: kfp2 (#2300)
* port: kfp2

* port: kfp2

* resolve import issue

* fix import

* fix: import

* fix importer_node
2023-10-02 15:50:18 +00:00
Andrew FerlitschandGitHub 58b8cba1e9 port: kfp2 (#2299)
* port: kfp2

* port: kfp2

* port: kfp2
2023-10-02 15:48:42 +00:00
Andrew FerlitschandGitHub da1e2b17f3 port: kfp2 (#2298)
* port: kfp2

* port: kfp2
2023-10-02 15:47:21 +00:00
Andrew FerlitschandGitHub f98a7aa4d6 port: kfp2 (#2297)
* port: kfp2

* port: kfp2
2023-10-02 15:30:29 +00:00
Andrew FerlitschandGitHub 84393171c2 port: KFP2 (#2296) 2023-09-30 14:53:34 +00:00
Ashley XuandGitHub d7f07167aa feat: add BigFrames gen-ai notebook for a use case about drug (#2291)
* feat: add BigFrames gen-ai notebook for a use case about drug

* fix: sort the imports

* fix: fix the linter checks
2023-09-29 19:05:12 +00:00
Andrew FerlitschandGitHub 2511bb1246 fix: CI/CD failure (#2292)
* fix: CI/CD failure

* fix: CI/CD failure
2023-09-29 16:56:11 +00:00
Andrew FerlitschandGitHub 4e3fbed9f7 missing setting IS_COLAB (#2288) 2023-09-29 15:54:51 +00:00
dstnluong-googleandGitHub 6726b90892 Add train/model_export files for TFVision. (#2279)
* Add TFVision

* Add TFVision to CODEOWNERS

* remove serving.Dockerifle

* build from vertex-ai
2023-09-29 15:51:30 +00:00
weigaryandGitHub f257b2f924 Add a notebook example for the NLLB model in model garden (#2289)
* Add a notebook example for the NLLB model in model garden

* Add a notebook example for the NLLB model in model garden
2023-09-28 22:00:06 +00:00
Andrew FerlitschandGitHub 2ace347737 fix: CI/CD failure (#2284)
* fix: CI/CD failure

* continue to debug

* continue to debug

* fix REGION
2023-09-28 18:28:18 +00:00
Huguens JeanandGitHub 572cbaf8b7 Open source detectron2 handler and trainer scripts and dockerfiles. (#2286) 2023-09-28 15:23:24 +00:00
eb93058f8e Add F-VLM Dockerfiles (#2285)
Co-authored-by: minwoopark <minwoopark@google.com>
2023-09-28 15:22:53 +00:00
Andrew FerlitschandGitHub 45e9a2db9e debug CI/CD internal failure (#2278)
* debug CI/CD internal failure

* fix: CI/CD failure
2023-09-27 20:58:27 +00:00
Andrew FerlitschandGitHub 530b4a6978 fix: cache issue (#2282)
* fix: cache issue

* fix: missing import

* fix: review comments
2023-09-27 20:56:46 +00:00
Andrew FerlitschandGitHub 3a9d88d642 fix: CI/CD failure (#2277) 2023-09-27 15:38:29 +00:00
Andrew FerlitschandGitHub fe5dc2bfbe Update pre-built to prebuilt (#2276) 2023-09-25 18:40:56 +00:00
Mend RenovateandGitHub d4c96f334d chore(deps): update dependency pyupgrade to v3.13.0 (#2066) 2023-09-25 18:30:06 +00:00
Mend RenovateandGitHub 487c04a216 Update python Docker tag to v3.11 (#1345) 2023-09-25 18:20:50 +00:00
Matthew TangandGitHub 45536c644c Make SDK 2.0 bigframes notebook wording consistent (#2274)
* Make SDK 2.0 bigframes notebook wording consistent

* Make learn more in a new line
2023-09-25 14:17:48 +00:00
Andrew FerlitschandGitHub 297d7b7e71 debug: verify works (#2275) 2023-09-25 14:16:15 +00:00
Andrew FerlitschandGitHub 4a9e61a007 feat: SDK2 remote predict (#2259)
* feat: SDK2 remote predict

* fix: 3.10

* fix: py check

* fix: py check

* fix: review comments

* fix: pytorch lightning not support register model
2023-09-22 19:50:52 +00:00
Andrew FerlitschandGitHub ef6c7457c3 fix: CI/CD failure (#2269) 2023-09-22 16:10:14 +00:00
weigaryandGitHub 578287d3ef Add a section to merge a base model with a lora (#2272) 2023-09-22 15:59:48 +00:00
Andrew FerlitschandGitHub 0fb27b69b6 feat: SDK2 remote training (#2258)
* feat: SDK2 remote training

* fix: 3.10

* fix: 3.10

* fix: py check

* fix: py check

* fix: review comments
2023-09-22 12:57:22 +00:00
Andrew FerlitschandGitHub f327bd4bec feat: SDK2 remote tuning (#2260)
* feat: SDK2 remote tuning

* fix: missing pandas

* fix: review comments
2023-09-22 12:54:20 +00:00
521 changed files with 125132 additions and 36305 deletions
+6 -1
View File
@@ -16,6 +16,7 @@ from resource_cleanup_manager import (
ResourceCleanupManager,
MatchingEngineIndexEndpointResourceCleanupManager,
MatchingEngineIndexResourceCleanupManager,
FeatureStoreLegacyCleanupManager,
FeatureStoreCleanupManager,
PipelineJobCleanupManager,
TrainingJobCleanupManager,
@@ -35,7 +36,10 @@ def run_cleanup_managers(managers: List[ResourceCleanupManager], is_dry_run: boo
print(f"Fetching {type_name}'s...")
resources = manager.list()
print(f"Found {len(resources)} {type_name}'s")
try:
print(f"Found {len(resources)} {type_name}'s")
except Exception as e:
print(f"{type_name} {e}")
for resource in resources:
try:
if not manager.is_deletable(resource):
@@ -62,6 +66,7 @@ managers: List[ResourceCleanupManager] = [
ModelResourceCleanupManager(), # ModelResourceCleanupManager must follow EndpointResourceCleanupManager due to deployed models blocking model deletion.
MatchingEngineIndexEndpointResourceCleanupManager(),
MatchingEngineIndexResourceCleanupManager(),
FeatureStoreLegacyCleanupManager(),
FeatureStoreCleanupManager(),
PipelineJobCleanupManager(),
TrainingJobCleanupManager(),
@@ -12,9 +12,15 @@ from typing import Any, Type
from google.cloud import aiplatform
from google.cloud.aiplatform import base
from google.cloud.aiplatform_v1beta1 import (FeatureOnlineStoreAdminServiceClient,
FeatureOnlineStore)
from google.cloud import storage
from proto.datetime_helpers import DatetimeWithNanoseconds
PROJECT_ID = "python-docs-samples-tests"
REGION = "us-central1"
API_ENDPOINT = f"{REGION}-aiplatform.googleapis.com"
# If a resource was updated within this number of seconds, do not delete.
RESOURCE_UPDATE_BUFFER_IN_SECONDS = 60 * 60 * 8
@@ -129,12 +135,51 @@ class MatchingEngineIndexEndpointResourceCleanupManager(VertexAIResourceCleanupM
resource.undeploy_all()
resource.delete(force=True)
class FeatureStoreCleanupManager(VertexAIResourceCleanupManager):
class FeatureStoreLegacyCleanupManager(VertexAIResourceCleanupManager):
# TODO: only deleting legacy
# not deleting ingestions jobs
# ingest_from_xxx methods do not return a job ID, there is no list command, aka no python way to delete
# not deleting batch serving jobs
# batch_serve_to_xxx methods do not return a job ID, there is no list command, aka no python way to delete
vertex_ai_resource = aiplatform.Featurestore
def resource_name(self, resource: Any) -> str:
return resource.name
def delete(self, resource):
resource.delete(force=True)
class FeatureStoreCleanupManager(VertexAIResourceCleanupManager):
# for FS 2.0
# TODO: use _v1beta1, and gapic clients
# delete features, feature groups, feature views, feature online stores
vertex_ai_resource = FeatureOnlineStore
admin_client = FeatureOnlineStoreAdminServiceClient(
client_options={"api_endpoint": API_ENDPOINT}
)
def resource_name(self, resource: Any) -> str:
return resource.name
def type_name(self) -> str:
return "FeatureOnlineStore"
def list(self) -> Any:
try:
return self.admin_client.list_feature_online_stores(parent=f"projects/{PROJECT_ID}/locations/{REGION}")
except Exception as e:
print(e)
return []
def delete(self, resource):
try:
self.admin_client.delete_feature_online_store(name=resource.name, force=True)
except Exception as e:
print(e)
class PipelineJobCleanupManager(VertexAIResourceCleanupManager):
vertex_ai_resource = aiplatform.PipelineJob
+40 -1
View File
@@ -18,6 +18,7 @@
import argparse
import pathlib
import os
import csv
import execute_changed_notebooks_helper
@@ -37,7 +38,7 @@ parser = argparse.ArgumentParser(description="Run changed notebooks.")
parser.add_argument(
"--test_paths_file",
type=pathlib.Path,
help="The path to the file that has newline-limited folders of notebooks that should be tested.",
help="The path to the file that has newline-delimited folders of notebooks that should be tested.",
required=True,
)
parser.add_argument(
@@ -128,6 +129,20 @@ parser.add_argument(
default=10,
required=False,
)
parser.add_argument(
"--run_first_file",
type=pathlib.Path,
help="The path to the file that has newline-delimited of notebooks to run in the first batch",
default=None,
required=False,
)
parser.add_argument(
"--aiplatform_whl",
type=str,
help="The GCS path to a whl version google-cloud-aiplatform",
default=None,
required=False,
)
parser.add_argument(
"--dry_run",
type=str2bool,
@@ -157,6 +172,29 @@ else:
accumulative_results = execute_changed_notebooks_helper.load_results(results_bucket, results_file)
notebooks = [changed_notebook for changed_notebook in changed_notebooks if execute_changed_notebooks_helper.select_notebook(changed_notebook, accumulative_results, args.test_percent)]
# cap the number of notebooks to the specified percentage
max_notebooks = int((len(changed_notebooks) * (args.test_percent/100)))
if (len(notebooks) > max_notebooks):
notebooks = notebooks[:max_notebooks]
run_first = []
if args.run_first_file:
if not os.path.isfile(args.run_first_file):
print("Error: file does not exist", args.run_first_file)
else:
with open(args.run_first_file, 'r') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
notebook = row[0]
run_first.append(notebook)
for notebook in run_first:
if notebook in notebooks:
# remove from existing list
notebooks.remove(notebook)
# add back to the front of the list
notebooks.insert(0, notebook)
print(f"Run first: {notebook}")
if args.dry_run:
print("Dry run ...\n")
@@ -177,4 +215,5 @@ else:
variable_vpc_network=args.variable_vpc_network,
private_pool_id=args.private_pool_id,
concurrent_notebooks=args.concurrent_notebooks,
aiplatform_whl=args.aiplatform_whl
)
@@ -41,10 +41,13 @@ from utils import NotebookProcessors, util
# A buffer so that workers finish before the orchestrating job
WORKER_TIMEOUT_BUFFER_IN_SECONDS: int = 60 * 60
PYTHON_VERSION = "3.9" # Set default python version
# rolling time window for accumulating build results for selecting notebooks
MAX_RESULTS_AGE_SECONDS: int = (60 * 60) * 24 * 60 # 60 days
# maximum time since last run to force a run on the current build
MAX_AGE_BEFORE_FORCE_RUN: int = (60 * 60) * 24 * 30
def format_timedelta(delta: datetime.timedelta) -> str:
@@ -118,8 +121,12 @@ def load_results(results_bucket: str,
if notebook in accumulative_results:
accumulative_results[notebook]['passed'] += build_results[notebook]['passed']
accumulative_results[notebook]['failed'] += build_results[notebook]['failed']
if accumulative_results[notebook]['last_time_ran'] < time_created:
accumulative_results[notebook]['last_time_ran'] = time_created
else:
accumulative_results[notebook] = build_results[notebook]
accumulative_results[notebook]['failed_on_latest_run'] = build_results[notebook]['failed']
accumulative_results[notebook]['last_time_ran'] = time_created
print(accumulative_results)
except Exception as e:
@@ -138,19 +145,37 @@ def select_notebook(changed_notebook: str,
if changed_notebook in accumulative_results:
pass_count = accumulative_results[changed_notebook]['passed']
fail_count = accumulative_results[changed_notebook]['failed']
failed_on_latest_run = accumulative_results[changed_notebook]['failed_on_latest_run']
last_time_ran = accumulative_results[changed_notebook]['last_time_ran']
else:
pass_count = 1
fail_count = 0
failed_on_latest_run = 0
last_time_ran = datetime.datetime.now().replace(tzinfo=None)
inferred_failure_rate = fail_count / (pass_count + fail_count)
# If notebook has not been ran in a long time, force running it
if (datetime.datetime.now().replace(tzinfo=None) - last_time_ran).total_seconds() > MAX_AGE_BEFORE_FORCE_RUN:
should_test_do_to_age = True
else:
should_test_do_to_age = False
# if failed on the last time it was ran, select the notebook
if failed_on_latest_run:
inferred_failure_rate = 1
# otherwise, calculate the frequency of failure
else:
inferred_failure_rate = fail_count / (pass_count + fail_count)
# If failure rate is high, the chance of testing should be higher
should_test_due_to_failure = random.uniform(0, 1) <= inferred_failure_rate
#if accumulative_resultsi[changed_notebook]['latest_date_ran']
# Additionally, only test a percentage of these
should_test_due_to_random_subset = random.uniform(0, 1) <= (test_percent / 100)
if should_test_due_to_failure or should_test_due_to_random_subset:
if should_test_due_to_failure or should_test_due_to_random_subset or should_test_do_to_age:
print(f"Selected: {changed_notebook}, {should_test_due_to_failure}, {should_test_due_to_random_subset}")
return True
else:
@@ -213,7 +238,7 @@ def _get_notebook_python_version(notebook_path: str) -> str:
# Look for the python version specification pattern
re_match = re.search(
"python version = (\d\.\d)", markdown, flags=re.IGNORECASE
"python version = (\d+\.\d+)", markdown, flags=re.IGNORECASE
)
if re_match:
# get the version number
@@ -246,7 +271,7 @@ def process_and_execute_notebook(
private_pool_id: Optional[str],
deadline: datetime.datetime,
notebook: str,
should_get_tail_logs: bool = False,
should_get_tail_logs: bool = True,
) -> NotebookExecutionResult:
print(f"Running notebook: {notebook}")
@@ -428,15 +453,39 @@ def _save_results(results: List[NotebookExecutionResult],
else:
pass_count = 0
fail_count = 1
if result.error_message is None:
error_type = ''
elif '500 Internal' in result.error_message or 'INTERNAL' in result.error_message or 'internal error' in result.error_message:
error_type = 'INTERNAL'
elif 'context deadline exceeded' in result.error_message or 'TIMEOUT' in result.error_message:
error_type = 'TIMEOUT'
elif 'Quota' in result.error_message or 'quotas are exceeded' in result.error_message:
error_type = 'QUOTA'
elif 'ServiceUnavailable' in result.error_message:
error_type = 'SERVICEUNAVAILABLE'
elif 'ModuleNotFoundError' in result.error_message:
error_type = 'IMPORT'
elif result.is_pass:
error_type = ''
else:
error_type = 'undetermined'
if error_type != '':
log_url = result.log_url
else:
log_url = ''
build_results[result.path] = {
'duration': result.duration.total_seconds(),
'start_time': str(result.start_time),
'passed': pass_count,
'failed': fail_count
'failed': fail_count,
'error_type': error_type,
'log_url': log_url
}
print(f"adding {result.path}")
print("Saving accumulative results ...")
print(f"Saving accumulative results to {results_file}, nentries {len(build_results)}")
content = json.dumps(build_results)
client = storage.Client()
@@ -459,6 +508,7 @@ def process_and_execute_notebooks(
variable_vpc_network: Optional[str] = None,
private_pool_id: Optional[str] = None,
concurrent_notebooks: Optional[int] = 10,
aiplatform_whl: Optional[str] = None,
):
"""
Run the notebooks that exist under the folders defined in the test_paths_file.
@@ -490,6 +540,7 @@ def process_and_execute_notebooks(
timeout (str):
Required. Timeout string according to https://cloud.google.com/build/docs/build-config-file-schema#timeout.
concurrent_notebooks (int): Max number of notebooks per minute to run in parallel.
aiplatform_whl: alternate whl version of Vertex AI SDK to install
"""
# Calculate deadline
@@ -36,7 +36,7 @@ steps:
- -c
- |
. workspace/env/bin/activate &&
python3 .cloud-build/execute_changed_notebooks_cli.py --test_paths_file "${_TEST_PATHS_FILE}" --base_branch "${_FORCED_BASE_BRANCH}" --container_uri ${_PYTHON_IMAGE} --staging_bucket ${_GCS_STAGING_BUCKET} --artifacts_bucket ${_GCS_STAGING_BUCKET}/executed_notebooks/PR_${_PR_NUMBER}/BUILD_${BUILD_ID} --variable_project_id ${PROJECT_ID} --variable_region ${_GCP_REGION} --variable_service_account ${_GCP_SERVICE_ACCOUNT} --variable_vpc_network "${_GPC_VPC_NETWORK_NAME}" `if [ ! -z "${_PRIVATE_POOL_NAME}" ]; then echo "--private_pool_id ${_PRIVATE_POOL_NAME}"; fi` --build_id ${BUILD_ID} --test_percent=${_TEST_PERCENT} --concurrent_notebooks=${_CONCURRENT_NOTEBOOKS}
python3 .cloud-build/execute_changed_notebooks_cli.py --test_paths_file "${_TEST_PATHS_FILE}" --base_branch "${_FORCED_BASE_BRANCH}" --container_uri ${_PYTHON_IMAGE} --staging_bucket ${_GCS_STAGING_BUCKET} --artifacts_bucket ${_GCS_STAGING_BUCKET}/executed_notebooks/PR_${_PR_NUMBER}/BUILD_${BUILD_ID} --variable_project_id ${PROJECT_ID} --variable_region ${_GCP_REGION} --variable_service_account ${_GCP_SERVICE_ACCOUNT} --variable_vpc_network "${_GCP_VPC_NETWORK_NAME}" `if [ ! -z "${_PRIVATE_POOL_NAME}" ]; then echo "--private_pool_id ${_PRIVATE_POOL_NAME}"; fi` --build_id ${BUILD_ID} --test_percent=${_TEST_PERCENT} --concurrent_notebooks=${_CONCURRENT_NOTEBOOKS} --run_first_file=${_RUN_FIRST_FILE}
env:
- 'IS_TESTING=1'
timeout: 86400s
+8
View File
@@ -0,0 +1,8 @@
notebooks/official/pipelines/google_cloud_pipeline_components_automl_text.ipynb
notebooks/official/generative_ai/rlhf_tune_llm.ipynb
notebooks/official/generative_ai/tune_peft.ipynb
notebooks/official/prediction/llm_streaming_prediction.ipynb
notebooks/official/migration/sdk-automl-text-classification-batch-prediction.ipynb
notebooks/official/vizier/get_started_vertex_vizier.ipynb
notebooks/official/workbench/sentiment_analysis/Sentiment_Analysis.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_automl.ipynb
1 notebooks/official/pipelines/google_cloud_pipeline_components_automl_text.ipynb
2 notebooks/official/generative_ai/rlhf_tune_llm.ipynb
3 notebooks/official/generative_ai/tune_peft.ipynb
4 notebooks/official/prediction/llm_streaming_prediction.ipynb
5 notebooks/official/migration/sdk-automl-text-classification-batch-prediction.ipynb
6 notebooks/official/vizier/get_started_vertex_vizier.ipynb
7 notebooks/official/workbench/sentiment_analysis/Sentiment_Analysis.ipynb
8 notebooks/official/model_monitoring/get_started_with_model_monitoring_automl.ipynb
-40
View File
@@ -1,40 +0,0 @@
notebooks/official/training/pytorch_gcs_data_training.ipynb
notebooks/official/custom/custom_training_tensorboard_profiler.ipynb
notebooks/official/custom/custom-tabular-bq-managed-dataset.ipynb
notebooks/official/ml_metadata/sdk-metric-parameter-tracking-for-locally-trained-models.ipynb
notebooks/official/ml_metadata/sdk-metric-parameter-tracking-for-custom-jobs.ipynb
notebooks/official/tabnet/tabnet_vertex_tutorial.ipynb
notebooks/official/tabnet/get_started_with_tabnet.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_automl_text.ipynb
notebooks/official/pipelines/multicontender_vs_champion_deployment_method.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_automl_images.ipynb
notebooks/official/pipelines/rapid_prototyping_bqml_automl.ipynb
notebooks/official/pipelines/challenger_vs_blessed_deployment_method.ipynb
notebooks/official/matching_engine/sdk_matching_engine_create_stack_overflow_embeddings.ipynb
notebooks/official/matching_engine/sdk_matching_engine_for_indexing.ipynb
notebooks/official/matching_engine/sdk_matching_engine_create_text_to_image_embeddings.ipynb
notebooks/official/explainable_ai/sdk_custom_image_classification_online_explain.ipynb
notebooks/official/explainable_ai/xai_image_classification_feature_attributions.ipynb
notebooks/official/explainable_ai/sdk_custom_image_classification_batch_explain.ipynb
notebooks/official/tabular_workflows/tabnet_on_vertex_pipelines.ipynb
notebooks/official/model_registry/get_started_with_model_registry.ipynb
notebooks/official/model_registry/bqml_vertexai_model_registry.ipynb
notebooks/official/sdk/SDK_Custom_Training_Python_Package_Managed_Text_Dataset_Tensorflow_Serving_Container.ipynb
notebooks/official/model_monitoring/batch_prediction_model_monitoring.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_setup.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_custom.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_custom_tf_serving.ipynb
notebooks/official/model_monitoring/model_monitoring.ipynb
notebooks/official/tensorboard/tensorboard_profiler_custom_training_with_prebuilt_container.ipynb
notebooks/official/tensorboard/tensorboard_hyperparameter_tuning_with_hparams.ipynb
notebooks/official/tensorboard/tensorboard_profiler_custom_training.ipynb
notebooks/official/model_evaluation/custom_tabular_regression_model_evaluation.ipynb
notebooks/official/model_evaluation/custom_tabular_classification_model_evaluation.ipynb
notebooks/official/model_evaluation/automl_video_classification_model_evaluation.ipynb
notebooks/official/experiments/comparing_local_trained_models.ipynb
notebooks/official/automl/automl_image_classification_online_online_prediction.ipynb
notebooks/official/automl/automl-text-classification.ipynb
notebooks/official/automl/sdk_automl_video_object_tracking_batch.ipynb
notebooks/official/feature_store/sdk-feature-store-pandas.ipynb
notebooks/official/prediction/custom_batch_prediction_feature_filter.ipynb
notebooks/official/prediction/pytorch_image_classification_with_prebuilt_serving_containers.ipynb
-80
View File
@@ -1,80 +0,0 @@
notebooks/official/training/hyperparameter_tuning_tensorflow.ipynb
notebooks/official/training/get_started_with_vertex_distributed_training.ipynb
notebooks/official/training/hyperparameter_tuning_xgboost.ipynb
notebooks/official/training/multi_node_ddp_gloo_vertex_training_with_custom_container.ipynb
notebooks/official/training/distributed_hyperparameter_tuning.ipynb
notebooks/official/training/pytorch-text-sentiment-classification-custom-train-deploy.ipynb
notebooks/official/training/xgboost_data_parallel_training_on_cpu_using_dask.ipynb
notebooks/official/training/multi_node_ddp_nccl_vertex_training_with_custom_container.ipynb
notebooks/official/bigquery_ml/get_started_with_bqml_training.ipynb
notebooks/official/bigquery_ml/bqml-online-prediction.ipynb
notebooks/official/custom/custom_training_container_and_model_registry.ipynb
notebooks/official/custom/sdk-custom-image-classification-online.ipynb
notebooks/official/custom/sdk-custom-image-classification-batch.ipynb
notebooks/official/custom/SDK_FBProphet_Forecasting_Online.ipynb
notebooks/official/custom/get_started_vertex_training_xgboost.ipynb
notebooks/official/custom/get_started_with_vertex_endpoint_and_shared_vm.ipynb
notebooks/official/custom/SDK_Custom_Container_Prediction.ipynb
notebooks/official/reduction_server/pytorch_distributed_training_reduction_server.ipynb
notebooks/official/tabnet/ai-explanations-tabnet-algorithm.ipynb
notebooks/official/vizier/get_started_vertex_vizier.ipynb
notebooks/official/vizier/gapic-vizier-multi-objective-optimization.ipynb
notebooks/official/pipelines/get_started_with_hpt_pipeline_components.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_automl_tabular.ipynb
notebooks/official/pipelines/custom_tabular_train_batch_pred_bq_pipeline.ipynb
notebooks/official/pipelines/metrics_viz_run_compare_kfp.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_model_upload_predict_evaluate.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_model_train_upload_deploy.ipynb
notebooks/official/pipelines/get_started_with_machine_management.ipynb
notebooks/official/pipelines/custom_model_training_and_batch_prediction.ipynb
notebooks/official/pipelines/control_flow_kfp.ipynb
notebooks/official/pipelines/lightweight_functions_component_io_kfp.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_bqml_text.ipynb
notebooks/official/pipelines/pipelines_intro_kfp.ipynb
notebooks/official/pipelines/automl_tabular_classification_beans.ipynb
notebooks/official/pipelines/google_cloud_pipeline_components_dataproc_tabular.ipynb
notebooks/official/explainable_ai/sdk_automl_tabular_classification_online_explain.ipynb
notebooks/official/explainable_ai/sdk_custom_tabular_regression_online_explain.ipynb
notebooks/official/explainable_ai/sdk_automl_tabular_binary_classification_batch_explain.ipynb
notebooks/official/explainable_ai/sdk_custom_tabular_regression_online_explain_get_metadata.ipynb
notebooks/official/explainable_ai/sdk_custom_tabular_regression_batch_explain.ipynb
notebooks/official/tabular_workflows/prophet_on_vertex_pipelines.ipynb
notebooks/official/tabular_workflows/wide_and_deep_on_vertex_pipelines.ipynb
notebooks/official/sdk/SDK_AutoML_Video_Classification.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_automl.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_automl_image_batch.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_automl_image_online.ipynb
notebooks/official/model_monitoring/get_started_with_model_monitoring_xgboost.ipynb
notebooks/official/tensorboard/tensorboard_custom_training_with_custom_container.ipynb
notebooks/official/tensorboard/tensorboard_custom_training_with_prebuilt_container.ipynb
notebooks/official/tensorboard/tensorboard_vertex_ai_pipelines_integration.ipynb
notebooks/official/model_evaluation/automl_text_classification_model_evaluation.ipynb
notebooks/official/model_evaluation/get_started_with_custom_model_evaluation_import.ipynb
notebooks/official/model_evaluation/automl_tabular_classification_model_evaluation.ipynb
notebooks/official/model_evaluation/automl_tabular_regression_model_evaluation.ipynb
notebooks/official/experiments/get_started_with_vertex_experiments.ipynb
notebooks/official/experiments/comparing_pipeline_runs.ipynb
notebooks/official/experiments/get_started_with_vertex_experiments_autologging.ipynb
notebooks/official/experiments/build_model_experimentation_lineage_with_prebuild_code.ipynb
notebooks/official/experiments/delete_outdated_tensorboard_experiments.ipynb
notebooks/official/automl/sdk_automl_tabular_regression_batch_bq.ipynb
notebooks/official/automl/sdk_automl_text_sentiment_analysis_online.ipynb
notebooks/official/automl/sdk_automl_text_entity_extraction_online.ipynb
notebooks/official/automl/sdk_automl_forecasting_hierarchical_batch.ipynb
notebooks/official/automl/automl_text_entity_extraction_batch_prediction.ipynb
notebooks/official/automl/automl_image_classification_batch_prediction.ipynb
notebooks/official/automl/automl_text_sentiment_analysis_batch_prediction.ipynb
notebooks/official/automl/sdk_automl_tabular_regression_online_bq.ipynb
notebooks/official/automl/get_started_automl_training.ipynb
notebooks/official/automl/automl-tabular-classification.ipynb
notebooks/official/automl/automl_image_object_detection_export_edge.ipynb
notebooks/official/automl/sdk_automl_image_object_detection_batch.ipynb
notebooks/official/automl/automl_tabular_on_vertex_pipelines.ipynb
notebooks/official/automl/sdk_automl_video_classification_batch.ipynb
notebooks/official/automl/sdk_automl_video_action_recognition_batch.ipynb
notebooks/official/automl/sdk_automl_tabular_forecasting_batch.ipynb
notebooks/official/automl/automl_image_object_detection_online_prediction.ipynb
notebooks/official/automl/automl_forecasting_bqml_arima_plus_comparison.ipynb
notebooks/official/datasets/get_started_bq_datasets.ipynb
notebooks/official/datasets/get_started_with_data_labeling.ipynb
notebooks/official/feature_store/feature_store_streaming_ingestion_sdk.ipynb
+26 -1
View File
@@ -35,7 +35,7 @@ class RemoveNoExecuteCells(Preprocessor):
class UpdateVariablesPreprocessor(Preprocessor):
def __init__(self, replacement_map: Dict):
def __init__(self, replacement_map: Dict[str, str]):
self._replacement_map = replacement_map
@staticmethod
@@ -98,3 +98,28 @@ class UniqueStringsPreprocessor(Preprocessor):
executable_cells.append(cell)
notebook.cells = executable_cells
return notebook, resources
class VertexAIInstallProprocessor(Preprocessor):
def __init__(self, vertex_ai_wheel):
self.vertex_ai_wheel = vertex_ai_wheel
@staticmethod
def update_vertex_ai_install(content: str):
if "google-cloud-aiplatform" not in content:
return content
return (
f"gsutil cp {self.vertex_ai_wheel} google-cloud-aiplatform.whl\n" +
content.replace("google-cloud-aiplatform\n", "google-cloud-aiplatform.whl\n")
.replace("google-cloud-aiplatform ", "google-cloud-aiplatform.whl ")
)
def preprocess(self, notebook, resources=None):
executable_cells = []
for cell in notebook.cells:
if cell.cell_type == "code":
cell.source = self.update_vertex_ai_install(
content=cell.source,
)
executable_cells.append(cell)
notebook.cells = executable_cells
+56 -5
View File
@@ -5,18 +5,69 @@ Cloud Storage location: gs://cloud-build-notebooks-presubmit/build_results/
'''
import argparse
import json
from util import download_file
import csv
import datetime
from google.cloud import storage
BUILD_BUCKET = "cloud-build-notebooks-presubmit"
BUILD_FOLDER = "build_results"
parser = argparse.ArgumentParser()
parser.add_argument('--file', dest='file',
default='build.json', type=str, help='build results file')
import json
default=None, type=str, help='build results filei (local or GCS)')
args = parser.parse_args()
with open('build.json', 'r') as f:
investigate = {}
with open('investigate.csv', 'r') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
investigate[row[0][:-6]] = row[1]
if not args.file:
client = storage.Client()
blobs = client.list_blobs(BUILD_BUCKET, prefix=BUILD_FOLDER)
newest_time = datetime.datetime(2000, 1, 1)
for blob in blobs:
# individual PR
if blob.size < 2000:
continue
time_created = blob.time_created.replace(tzinfo=None)
if time_created > newest_time:
newest_time = time_created
args.file = f"gs://{BUILD_BUCKET}/{blob.name}"
if args.file.startswith("gs://"):
path = args.file[5:]
bucket = path.split('/')[0]
file = path[len(bucket)+1:]
download_file(bucket, file, "build.json")
args.file = "build.json"
with open(args.file, 'r') as f:
results = json.load(f)
for item in results.items():
notebook = item[0][len("/notebooks/official/")-1:-6]
if item[1]['passed']:
print(f"{item[0]},PASSED")
passed = "PASS"
else:
print(f"{item[0]},FAILED")
if notebook in investigate:
passed = "INVG"
else:
passed = "FAIL"
error = item[1]['error_type']
if passed == "FAIL":
if error == '':
error = "undetermined"
if 'log_url' in item[1]:
log_url = item[1]['log_url']
else:
log_url = ''
else:
log_url = ''
print(f"{notebook:75} {passed} {error:10} {log_url}")
+19
View File
@@ -0,0 +1,19 @@
notebook,status
prediction/llm_streaming_prediction.ipynb,wait_for_fix
custom/get_started_with_vertex_endpoint_and_shared_vm.ipynb,issue 2527
feature_store/online_feature_serving_and_fetching_bigquery_data_with_feature_store.ipynb,wait_for_reaper
feature_store/online_feature_serving_and_vector_retrieval_bigquery_data_with_feature_store.ipynb,wait_for_reaper
pipelines/google_cloud_pipeline_components_TPU_model_train_upload_deploy.ipynb,wait_for_fix
explainable_ai/sdk_custom_image_classification_batch_explain.ipynb,issue 2528
explainable_ai/sdk_custom_image_classification_online_explain.ipynb,issue 2528
explainable_ai/sdk_custom_tabular_regression_online_explain.ipynb,issue 2528
explainable_ai/sdk_automl_tabular_binary_classification_batch_explain.ipynb,issue 2528
explainable_ai/xai_image_classification_feature_attributions.ipynb,issue 2528
matching_engine,sdk_matching_engine_create_stack_overflow_embeddings.ipynb,issue 2530
automl/automl_forecasting_bqml_arima_plus_comparison.ipynb,flaky
model_evaluation/custom_tabular_regression_model_evaluation.ipynb,regr
experiments/get_started_with_vertex_experiments.ipynb,regr
experiments/comparing_local_trained_models.ipynb,regr
generative_ai/tune_peft.ipynb,internal
pipelines/custom_model_training_and_batch_prediction.ipynb,regr
feature_store/online_feature_serving_and_fetching_bigquery_data_with_feature_store_optimized.ipynb,wait_for_reaper
1 notebook status
2 prediction/llm_streaming_prediction.ipynb wait_for_fix
3 custom/get_started_with_vertex_endpoint_and_shared_vm.ipynb issue 2527
4 feature_store/online_feature_serving_and_fetching_bigquery_data_with_feature_store.ipynb wait_for_reaper
5 feature_store/online_feature_serving_and_vector_retrieval_bigquery_data_with_feature_store.ipynb wait_for_reaper
6 pipelines/google_cloud_pipeline_components_TPU_model_train_upload_deploy.ipynb wait_for_fix
7 explainable_ai/sdk_custom_image_classification_batch_explain.ipynb issue 2528
8 explainable_ai/sdk_custom_image_classification_online_explain.ipynb issue 2528
9 explainable_ai/sdk_custom_tabular_regression_online_explain.ipynb issue 2528
10 explainable_ai/sdk_automl_tabular_binary_classification_batch_explain.ipynb issue 2528
11 explainable_ai/xai_image_classification_feature_attributions.ipynb issue 2528
12 matching_engine sdk_matching_engine_create_stack_overflow_embeddings.ipynb issue 2530
13 automl/automl_forecasting_bqml_arima_plus_comparison.ipynb flaky
14 model_evaluation/custom_tabular_regression_model_evaluation.ipynb regr
15 experiments/get_started_with_vertex_experiments.ipynb regr
16 experiments/comparing_local_trained_models.ipynb regr
17 generative_ai/tune_peft.ipynb internal
18 pipelines/custom_model_training_and_batch_prediction.ipynb regr
19 feature_store/online_feature_serving_and_fetching_bigquery_data_with_feature_store_optimized.ipynb wait_for_reaper
+11
View File
@@ -0,0 +1,11 @@
sdk2_remote_tabnet_training.ipynb
remote_hyperparameter_tuning.ipynb
remote_prediction.ipynb
remote_training_bigframes_pytorch.ipynb
remote_training_bigframes_sklearn.ipynb
remote_training_bigframes_tensorflow.ipynb
remote_training_lightning.ipynb
remote_training_pytorch.ipynb
remote_training_sklearn.ipynb
remote_training_tensorflow_with_autologging.ipynb
@@ -15,7 +15,7 @@ steps:
- -c
- |
. workspace/env/bin/activate &&
python3 notebooks/notebook_template_review.py --web --title --steps --desc --linkback --notebook-dir=notebooks/official >web.html
python3 notebooks/notebook_template_review.py --web --title --steps --desc --linkback --notebook-dir=notebooks/official --skip-file=${_DO_NOT_INDEX_FILE} >web.html
artifacts:
objects:
location: gs://${_GCS_ARTIFACTS_BUCKET}/webdoc
+2 -2
View File
@@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Fetch pull request branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch base main branch
+1 -1
View File
@@ -4,7 +4,7 @@
# 2. To lint specific notebooks:
# docker run -v ${PWD}:/setup/app gcr.io/python-docs-samples-tests/notebook_linter:latest notebooks/1.ipynb notebooks/2.ipynb
FROM python:3.10
FROM python:3.12
WORKDIR setup
+5 -5
View File
@@ -2,9 +2,9 @@ git+https://github.com/tensorflow/docs
ipython
jupyter
nbconvert
black==23.3.0
pyupgrade==3.7.0
isort==5.12.0
flake8==6.0.0
nbqa==1.7.0
black==24.4.2
pyupgrade==3.16.0
isort==5.13.2
flake8==7.1.0
nbqa==1.8.5
+1 -1
View File
@@ -58,7 +58,7 @@ done
# Only check notebooks in test folders modified in this pull request.
# Note: Use process substitution to persist the data in the array
if [ ${#notebooks[@]} -eq 0 ]; then
echo "Checking for changed notebooked using git"
echo "Checking for changed notebooks using git"
while read -r file || [ -n "$line" ]; do
notebooks+=("$file")
done < <(git diff --name-only main... | grep '\.ipynb$')
+152 -13
View File
@@ -1,37 +1,176 @@
# Google Cloud Vertex AI Samples
# ![Google Cloud](https://avatars.githubusercontent.com/u/2810941?s=60&v=4) Google Cloud Vertex AI Samples
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
Welcome to the Google Cloud [Vertex AI](https://cloud.google.com/vertex-ai/docs/) sample repository.
This repository contains notebooks, code samples, sample apps, and other resources that demonstrate how to use, develop and manage machine learning and generative AI workflows using Google Cloud Vertex AI.
## Overview
The repository contains [notebooks](https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/master/notebooks) and [community content](https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/master/community-content) that demonstrate how to develop and manage ML workflows using Google Cloud Vertex AI.
[Vertex AI](https://cloud.google.com/vertex-ai) is a fully-managed, unified AI development platform for building and using generative AI. This repository is designed to help you get started with Vertex AI. Whether you're new to Vertex AI or an experienced ML practitioner, you'll find valuable resources here.
For more Vertex AI Generative AI notebook samples, please visit the Vertex AI [Generative AI](https://github.com/GoogleCloudPlatform/generative-ai) GitHub repository.
## Explore, learn and contribute
You can explore, learn, and contribute to this repository to unleash the full potential of machine learning on Vertex AI!
### Explore and learn
Explore this repository, follow the links in the header section of each of the notebooks to -
![Colab](https://cloud.google.com/ml-engine/images/colab-logo-32px.png) Open and run the notebook in [Colab](https://colab.google/)\
![Colab Enterprise](https://cloud.google.com/ml-engine/images/colab-enterprise-logo-32px.png) Open and run the notebook in [Colab Enterprise](https://cloud.google.com/colab/docs/introduction)\
![Workbench](https://lh3.googleusercontent.com/UiNooY4LUgW_oTvpsNhPpQzsstV5W8F7rYgxgGBD85cWJoLmrOzhVs_ksK_vgx40SHs7jCqkTkCk=e14-rj-sc0xffffff-h130-w32) Open and run the notebook in [Vertex AI Workbench](https://cloud.google.com/vertex-ai/docs/workbench/introduction)\
![Github](https://cloud.google.com/ml-engine/images/github-logo-32px.png) View the notebook on Github
### Contribute
See the [Contributing Guide](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/master/CONTRIBUTING.md).
## Get started
To get started using Vertex AI, you must have a Google Cloud project.
- If you don't have a Google Cloud project, you can learn and build on GCP for free using [Free Trail](https://cloud.google.com/free).
- Once you have a Google Cloud project, you can learn more about [setting up a project and a development environment](https://cloud.google.com/vertex-ai/docs/start/cloud-environment).
## Repository structure
```bash
├── community-content - Sample code and tutorials contributed by the community
├── notebooks
│ ├── community - Notebooks contributed by the community
│ ├── official - Notebooks demonstrating use of each Vertex AI service
│ │ ├── automl
│ │ ├── custom
│ │ ├── ...
│ ├── community - Notebooks contributed by the community
│ │ ├── model_garden
│ │ ├── ...
├── community-content - Sample code and tutorials contributed by the community
```
## Examples
## Contributing
<!-- markdownlint-disable MD033 -->
<table>
Contributions welcome! See the [Contributing Guide](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/master/CONTRIBUTING.md).
<tr>
<th style="text-align: center;">Category</th>
<th style="text-align: center;">Product</th>
<th style="text-align: center;">Description</th>
</tr>
<tr>
<td>Model</td>
<td>
<a href="notebooks/community/model_garden"><code>Model Garden/</code></a>
</td>
<td>
Curated collection of first-party, open-source, and third-party models available on Vertex AI including Gemini, Gemma, Llama 3, Claude 3 and many more.
</td>
</tr>
<tr>
<td>Data</td>
<td>
<a href="notebooks/official/feature_store"><code>Feature Store/</code></a>
</td>
<td>
Set up and manage online serving using Vertex AI Feature Store.
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/datasets"><code>datasets/</code></a>
</td>
<td>
Use BigQuery and Data Labeling service with Vertex AI.
</td>
</tr>
<tr>
<td>Model development</td>
<td>
<a href="notebooks/official/automl"><code>automl/</code></a>
</td>
<td>
Train and make predictions on AutoML models
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/custom"><code>custom/</code></a>
</td>
<td>
Create, deploy and serve custom models on Vertex AI
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/ray_on_vertex_ai"><code>ray_on_vertex_ai/</code></a>
</td>
<td>
Use Colab Enterprise and Vertex AI SDK for Python to connect to the Ray Cluster.
</td>
</tr>
<tr>
<td>Deploy and use</td>
<td>
<a href="notebooks/official/prediction"><code>prediction/</code></a>
</td>
<td>
Build, train and deploy models using prebuilt containers for custom training and prediction.
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/model_registry"><code>model_registry/</code></a>
</td>
<td>
Use Model Registry to create and register a model.
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/explainable_ai"><code>Explainable AI/</code></a>
</td>
<td>
Use Vertex Explainable AI's feature-based and example-based explanations to explain how or why a model produced a specific prediction.
</td>
</tr>
<tr>
<td></td>
<td>
<a href="notebooks/official/ml_metadata"><code>ml_metadata/</code></a>
</td>
<td>
Record the metadata and artifacts and query that metadata to help analyze, debug, and audit the performance of your ML system.
</td>
</tr>
<tr>
<td>Tools</td>
<td>
<a href="notebooks/official/pipelines"><code>Pipelines/</code></a>
</td>
<td>
Use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build, tune, or deploy a custom model.
</td>
</tr>
</table>
<!-- markdownlint-enable MD033 -->
## Getting help
Please use the [issues page](https://github.com/GoogleCloudPlatform/vertex-ai-samples/issues) to provide feedback or submit a bug report.
## Get help
Please use the [Issues page](https://github.com/GoogleCloudPlatform/vertex-ai-samples/issues) to provide feedback or submit a bug report.
## Disclaimer
This is not an officially supported Google product. The code in this repository is for demonstrative purposes only.
## Feedback
Please feel free to fill out our [survey](https://bit.ly/vertex-ai-samples-survey) to give us feedback on the repo and its content.
## References
- [Vertex AI Jupyter Notebook tutorials](https://cloud.google.com/vertex-ai/docs/tutorials/jupyter-notebooks)
- Vertex AI [Generative AI](https://github.com/GoogleCloudPlatform/generative-ai) GitHub repository
- [Vertex AI documentaton](https://cloud.google.com/vertex-ai/docs)
+18 -10
View File
@@ -10,14 +10,22 @@
/pipeline_components @Ark-kun
/pipeline_components/image_ml_model_training @lakeyk
/prediction_featurestore_integration @googleapis/vertex-prediction-team
/vertex_vision_model_garden/model_oss/util @weigary
/vertex_vision_model_garden/model_oss/diffusers @weigary
/vertex_vision_model_garden/model_oss/keras @dstnluong-google
/vertex_vision_model_garden/model_oss/transformers @dstnluong-google
/vertex_vision_model_garden/model_oss/pic2word @jismailyan-google
/vertex_vision_model_garden/model_oss/open_clip @lydhr
/vertex_vision_model_garden/model_oss/movinet @KCFindstr
/vertex_vision_model_garden/model_oss/data_converter @KCFindstr
/vertex_vision_model_garden/model_oss/peft @weigary
/vertex_vision_model_garden/model_oss/lm-evaluation-harness @kathyyu-google
/vertex_model_garden/model_oss/notebook_util @minwoo33park
/vertex_model_garden/model_oss/util @weigary
/vertex_model_garden/model_oss/diffusers @weigary
/vertex_model_garden/model_oss/keras @dstnluong-google
/vertex_model_garden/model_oss/transformers @dstnluong-google
/vertex_model_garden/model_oss/pic2word @jismailyan-google
/vertex_model_garden/model_oss/open_clip @lydhr
/vertex_model_garden/model_oss/movinet @KCFindstr
/vertex_model_garden/model_oss/data_converter @KCFindstr
/vertex_model_garden/model_oss/peft @weigary
/vertex_model_garden/model_oss/lm-evaluation-harness @kathyyu-google
/vertex_model_garden/model_oss/tfvision @dstnluong-google
/vertex_model_garden/model_oss/fvlm @minwoo33park
/vertex_model_garden/model_oss/imagebind @kathyyu-google
/vertex_model_garden/model_oss/llava @py4
/vertex_model_garden/model_oss/vllm @kathyyu-google
/vertex_model_garden/benchmarking_reports @lavraicse
/vertex_model_garden/model_oss/autogluon @lavraicse
@@ -1,5 +1,5 @@
absl-py==1.1.0
fastapi==0.75.2
fastapi==0.109.1
uvicorn==0.18.2
timm==0.5.4
smart_open==6.0.0
@@ -1,3 +1,3 @@
torch==1.13.1
torch==2.2.0
torchvision==0.9.1
tensorboard==2.5.0
@@ -1,4 +1,4 @@
google-cloud-bigquery==2.20.0
tensorflow==2.7.2
pillow==9.0.1
pillow==10.3.0
tf-agents==0.8.0
@@ -1,4 +1,4 @@
google-cloud-pubsub==2.5.0
pillow==9.0.1
pillow==10.3.0
tf-agents==0.8.0
tensorflow==2.7.2
@@ -1,5 +1,5 @@
dataclasses==0.6
google-cloud-aiplatform==1.8.1
tensorflow==2.7.2
pillow==9.0.1
pillow==10.3.0
tf-agents==0.8.0
@@ -0,0 +1,15 @@
# Vertex AI custom prediction routines samples
## Overview
Vertex Custom Prediction Routines(CPR) simplify the process of building custom containers
and make local model testing easy. Here are the sameple codes for different libraries.
### Objectives
The objective is to provide various samples for Vertex Custom Prediction Routine(CPR).
### Supporting libraries
* torch
* sklearn
* xgboost
@@ -0,0 +1,73 @@
import ast
import json
import os
import pickle
import torch
from google.cloud.aiplatform.utils import prediction_utils
from google.cloud.aiplatform.prediction.predictor import Predictor
from transformers import AutoModelForQuestionAnswering
from typing import Dict, List
class TorchTransformersPredictor(Predictor):
def __init__(self):
return
def load(self, artifacts_uri: str) -> None:
prediction_utils.download_model_artifacts(artifacts_uri)
if os.path.isfile("setup_config.json"):
with open("setup_config.json") as setup_config_file:
self.setup_config = json.load(setup_config_file)
if os.path.exists("model.pt"):
self.model = AutoModelForQuestionAnswering.from_pretrained("model.pt")
self.model.eval()
else:
raise ValueError("One of the following model files must be provided: model.pt.")
def preprocess(self, prediction_input: dict) -> torch.Tensor:
max_length = self.setup_config["max_length"]
instances = prediction_input["instances"]
question_context = ast.literal_eval(instances)
question = question_context["question"]
context = question_context["context"]
inputs = self.tokenizer.encode_plus(
question,
context,
max_length=int(max_length),
pad_to_max_length=True,
add_special_tokens=True,
return_tensors="pt",
)
input_ids = inputs["input_ids"]
attention_mask = inputs["attention_mask"]
return torch.Tensor(input_ids, attention_mask)
@torch.inference_mode()
def predict(self, instances: torch.Tensor) -> List[str]:
input_ids, attention_mask = instances
outputs = self._model(input_ids, attention_mask)
answer_start_scores = outputs.start_logits
answer_end_scores = outputs.end_logits
num_rows, num_cols = answer_start_scores.shape
inferences = []
for i in range(num_rows):
answer_start_scores_one_seq = answer_start_scores[i].unsqueeze(0)
answer_start = torch.argmax(answer_start_scores_one_seq)
answer_end_scores_one_seq = answer_end_scores[i].unsqueeze(0)
answer_end = torch.argmax(answer_end_scores_one_seq) + 1
prediction = self.tokenizer.convert_tokens_to_string(
self.tokenizer.convert_ids_to_tokens(
input_ids[i].tolist()[answer_start:answer_end]
)
)
inferences.append(prediction)
return inferences
def postprocess(self, prediction_results: List[str]) -> Dict:
return {"predictions": prediction_results}
Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

@@ -0,0 +1,253 @@
# ViT PyTorch vs JAX training benchmarks on Vertex AI Training Platform
Lav Rai, Software Engineer, Google Cloud
Xiang Xu, Software Engineer, Google Cloud
Andreas Steiner, Software Engineer, Google DeepMind
Tao Wang, Software Engineer, Google DeepMind
Alexander Kolesnikov, Research Engineer, Google DeepMind
## Introduction
Many repositories now offer both PyTorch and JAX versions of a model. For
example, [Hugging Face offers many models such as GPT2, BERT][1]
etc. Other examples are [OpenLLaMa][2] and [ViT][3]
models which were first developed in JAX and then their corresponding PyTorch
versions were made available. **Given both the PyTorch and JAX options for a
model, it may not be obvious as to which option to choose**. To make such a
decision, it is important for one to know about the training cost, effectiveness
and efficiency for each choice.
Apart from the framework choice, the other choice that one faces on Vertex AI
training platform is the type and count of the accelerators. Although the
[Vertex AI pricing table][4] lists the price per hour for each
machine, **one may not know beforehand about the training speed of JAX and
PyTorch frameworks for different types and count of the accelerators**.
If one has access to some training benchmark numbers for the same model
under (a) PyTorch and JAX frameworks and (b) for different types and count of
the accelerators, then it will be easier for them to make a cost effective
decision. Such a benchmark will also aid the developers in identifying strength
and weakness of different choices and then figure out recipes to remove those
weaknesses if possible.
This blog uses the ViT [classification models][5] of varying sizes
to benchmark the training performance of PyTorch and JAX versions on the Vertex
AI Platform under different machine configurations. The goal is to:
- Benchmark OSS ViT training for both PyTorch and JAX frameworks.
- Benchmark OSS ViT L16, H14, g14, and G14 models.
- Benchmark OSS ViT PyTorch training with A100 GPUs.
- Benchmark OSS ViT JAX training with A100 GPUs and TPU V3 accelerators.
## Benchmarking setup
This section lays out the benchmarking set up for the [PyTorch][6] and [JAX][7]
frameworks and provides a reasoning for choosing those settings.
### PyTorch GPU
#### Machine configuration
We run training jobs on [Vertex AI Custom Training][8] using 1
single node with 8 A100-40GB GPUs.
- Machine type: [a2-highgpu-8g][9]
- Machine count: 1
- Accelerator type: [NVIDIA_TESLA_A100 (40GB)][10]
- Accelerator count: 8
#### Modeling
We benchmark 4 variants of ViT model in different sizes:
- [ViT-L16, 300M params][11]
- [ViT-H14, 630M params][12]
- [ViT-g14, 1B params][13]
- [ViT-G14, 1.8B params][14]
We use the Huggingface [transformers library][15] for ViT L16 and
H14 variants, and the [TIMM library][16] for ViT g14 and G14
variants.
#### Dataset
We run training against the [cifar10][17] dataset with 50K training
images and 10K test images. To factor out network communication overhead for
data loading, we copy the whole dataset to the local disk then load data from
the local disk during training.
#### Training parameters
- Trainer
- We use [PyTorch Lightning][18] as the trainer for the
boilerplate data loading and train loop coding.
- Precision
- Float16
- Input resolution
- 224 x 224
- Strategy
- We use [DDP][19] for models which can be entirely loaded to one
GPU, use [Deepspeed-ZeRO][20] otherwise:
- ViT-L16: DDP
- ViT-H14: DDP
- ViT-g14: DDP
- ViT-G14: Deepspeed-ZeRO stage-3
- Batch size
- We use the max batch size as power of 2 without CUDA OOM for each model:
- ViT-L16: 64 per GPU
- ViT-H14: 16 per GPU
- ViT-g14: 16 per GPU
- ViT-G14: 32 per GPU
- Compilation
- We apply [torch.compile][21] to model whenever it's applicable:
- ViT-L16: torch.compile
- ViT-H14: torch.compile
- ViT-g14: torch.compile
- ViT-G14: N/A
### JAX TPU and GPU
#### Machine configuration
All the TPU and GPU training jobs are run on [Vertex AI Custom
Training][8]. The following machine configurations were used for the
TPU and GPU experiments:
**Note**: TPU V3 POD requires multi-host supporting training code. For example,
a 32 core POD runs on 4 hosts with each host using 8 cores.
**Note**: 8 A100 are similar to TPU V3 32 cores in terms of [Vertex AI
pricing][4].
**Note**: [Each TPU v3 chip has 2 cores which can use 32 GB high-bandwidth
memory][22] (16 GB per core) so total memory for 32 cores is 16x32 =
512 GB. Therefore for the same price, TPUs offer more memory than 8 A100-40GB
GPUs.
#### Modeling
We decided to use an OSS code repository for model implementation. Using an OSS
repository helps anyone to independently verify the benchmarking results and
also relate to the results well. For JAX, we selected the
[Big Vision][23] code repository.
Same as the PyTorch modeling, we benchmark 4 variants of ViT model in different
sizes:
- [ViT-L16, 300M params][24]
- [ViT-H14, 630M params][24]
- [ViT-g14, 1B params][24]
- [ViT-G14, 1.8B params][24]
**Note**: The [Big Vision code repo][23] has not made the
checkpoints publicly available for the models larger than the ViT-L16. Therefore
for the rest of the three variants, the experiments only used random
initialization for benchmarking the training speed.
#### Dataset
We use training against the [cifar10 TensorFlow dataset][25] with
50K training images and 10K test images. This dataset is the same as the one
used for PyTorch experiments except that it is loaded as a TensorFlow dataset.
Similar to the PyTorch experiments, we copy the whole dataset to the docker
image to factor out network communication overhead for data loading.
#### Training parameters
- Precision
- "bfloat16" setting was used.
- Input resolution
- 224 x 224 after resize (to 448x448) and random crop (to 224x224) before
training.
- This resolution for training was the same as the PyTorch settings.
- Strategy
- Used DDP for all models except ViT-G14. ViT-G14 used the FSDP strategy.
- Batch size
- We use the max batch size as power of 2 without OOM for each model. The
[Benchmarking results][26] section shows the final
batch size for each experiment.
- Once a maximum batch-size for TPU V3 8 cores was determined, we just scaled
it linearly for 32 cores.
- Once a maximum batch-size for 1 A100 GPU was determined, we just scaled it
linearly for 8 A100 GPUs.
- Compilation
- [jax.jit() compilation][27] is used in JAX codes for efficient
execution in XLA.
- GPU related flags
- The following flags are set in the dockerfile for the GPU runs.
- Note: _xla_gpu_enable_pipelined_collectives_ is set to false for the
ViT-G14 FSDP run.
### Evaluation metric
For both the PyTorch and JAX experiments, the following evaluation metrics are
collected:
- Throughput: Images-per-second observed for training.
- Cost: The training-cost-per-epoch (USD).
**Note**: The above metrics are not biased against any framework or machine
configurations. In addition, these metrics will help one decide the most
efficient training configurations on Vertex AI.
## Benchmarking results
The lowest cost experiment for each model is marked in **bold** in the last
column.
![vit_benchmarking_table](images/vit_benchmarking_table.png)
The following bar charts summarize the performance visually:
![vit_training_time](images/vit_training_time.png)
![vit_training_cost](images/vit_training_cost.png)
The following section provides observations and conclusions for these results.
## Observation and Conclusions
- Training with JAX TPU V3 POD with 32 cores costs 33% less than the PyTorch GPU
8 A100-40GBs runs.
- Training with JAX GPU 8 A100-40GBs costs 23% less than the PyTorch GPU 8
A100-40GBs runs.
- JAX TPU V3 POD with 32 cores was 4x faster and slightly more cost-effective
than the JAX TPU V3 8 core run for the ViT-large model. This indicates that it
might be better to use more cores. The JAX TPU V3 speed scales very well with
the number of cores.
- Cloud TPU VM training speed numbers were the same as the Vertex AI for
TPU V3 8 cores. The dataset was copied to the docker in both the cases.
- The training-cost-per-epoch increases with the model size irrespective of the
framework.
[1]: https://github.com/huggingface/transformers/blob/main/examples/research_projects/jax-projects/README.md#quickstart-flax-and-jax-in-transformers
[2]: https://github.com/openlm-research/open_llama
[3]: https://github.com/google-research/vision_transformer
[4]: https://cloud.google.com/vertex-ai/pricing#custom-trained_models
[5]: https://arxiv.org/abs/2010.11929
[6]: #pytorch-gpu
[7]: #jax-tpu-and-gpu
[8]: https://cloud.google.com/vertex-ai/docs/training/overview
[9]: https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types
[10]: https://cloud.google.com/vertex-ai/docs/training/configure-compute#specifying_gpus
[11]: https://huggingface.co/google/vit-large-patch16-224-in21k
[12]: https://huggingface.co/google/vit-huge-patch14-224-in21k
[13]: https://github.com/huggingface/pytorch-image-models/blob/v0.9.2/timm/models/vision_transformer.py#L1308
[14]: https://github.com/huggingface/pytorch-image-models/blob/v0.9.2/timm/models/vision_transformer.py#L1312
[15]: https://huggingface.co/docs/transformers/main/model_doc/vit#transformers.ViTModel
[16]: https://github.com/huggingface/pytorch-image-models
[17]: https://huggingface.co/datasets/cifar10
[18]: https://lightning.ai/docs/pytorch/stable/
[19]: https://pytorch.org/docs/stable/notes/ddp.html
[20]: https://www.deepspeed.ai/tutorials/zero/
[21]: https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html
[22]: https://cloud.google.com/tpu/docs/system-architecture-tpu-vm#tpu_v3
[23]: https://github.com/google-research/big_vision
[24]: https://screenshot.googleplex.com/BximJgxsgvBVu38
[25]: https://www.tensorflow.org/datasets/catalog/cifar10
[26]: #benchmarking-results
[27]: https://jax.readthedocs.io/en/latest/jax-101/02-jitting.html
@@ -0,0 +1,188 @@
# Benchmark report on hyperparameter tuning the OpenLLaMA models on Google Cloud Vertex Model Garden
Changyu Zhu, Software Engineer, Google Cloud
Dustin Luong, Software Engineer, Google Cloud
Gary Wei, Software Engineer, Google Cloud
Genquan Duan, Software Engineer, Google Cloud
## Introduction
Fine-tuning of LLMs can be non-trivial to find an optimal configuration of
machine types, training parameters, and other hyperparameters that achieves a
good balance between cost efficiency and model performance. To facilitate users
in conducting tuning experiments, this report benchmarks fine-tuning OpenLLaMA
models with [Vertex AI Hyperparameter Tuning Service](https://cloud.google.com/vertex-ai/docs/training/hyperparameter-tuning-overview), demonstrating both efficiency
and effectiveness. Similar hyperparameter tuning techniques can apply to other models as well.
## Key takeaways
- **The hyperparameter tuning service finds good parameters**: The best model found by the hyperparameter tuning service has an average improvement of around 4% in accuracy in *ARC*, *HellaSwag*, and *TruthfulQA* datasets, while only tuning the learning rate.
- **Hyperparameter tuning works with QLoRA on limited resources**: 4bit QLoRA is sufficient for hyperparameter tuning to find a set of good parameters. In this way, all OpenLLaMA models can run on 1 single `NVIDIA_L4` GPU. It is also possible to train for more steps on the good parameters discovered by hyperparameter tuning, avoiding the waste of computing resources on fine-tuning with suboptimal hyperparameters.
- **Hyperparameter tuning is cost-effective**: While `NVIDIA_L4` is slower than `NVIDIA_TESLA_V100`, it costs less and avoids the overhead of multi-GPU training since it has more GPU memory. Finding a good 3B/7B/13B OpenLLaMA model costs $28.5671, $47.8016, and $87.9208, respectively.
## Benchmarking setup
This section describes the experiment setup of the hyperparameter tuning experiments. The default tuning parameters are:
### Machine configuration
- Machine type: g2-standard-8
- Machine count: 1
- Accelerator type: NVIDIA_L4
- Accelerator count: 1
### Modeling
We benchmark all 3 OpenLLaMA models:
- [open_llama_3b](https://huggingface.co/openlm-research/open_llama_3b)
- [open_llama_7b](https://huggingface.co/openlm-research/open_llama_7b)
- [open_llama_13b](https://huggingface.co/openlm-research/open_llama_13b)
We use the Huggingface [PEFT](https://github.com/huggingface/peft) library for fine-tuning.
### Training dataset
We use the dataset [timdettmers/openassistant-guanaco](https://huggingface.co/datasets/timdettmers/openassistant-guanaco) loaded directly via Huggingface.
### Training parameters
The set of training parameters used during benchmarking:
- Batch size: 4
- Precision mode: 4bit QLoRA
- LoRA rank: 32
- LoRA alpha: 64
- Max sequence length: 512
- Max train steps: 1000
### Evaluation dataset
We use the [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) library injected into the training loop for evaluation. The hyperparameter tuning job will pick the model according to the evaluation metrics.
- Eval task: [ARC Challenge](https://huggingface.co/datasets/ai2_arc)
- Eval metric: acc_norm
- Max eval examples: 10000
### Standalone evaluation dataset
After finding the best model with Vertex hyperparameter tuning service, we run standalone evaluations with the model on the following datasets:
- [ARC Challenge](https://huggingface.co/datasets/ai2_arc)
- [HellaSwag](https://huggingface.co/datasets/Rowan/hellaswag)
- [TruthfulQA](https://huggingface.co/datasets/EleutherAI/truthful_qa_mc)
### Hyperparameter tuning
We only tune the learning rate hyperparameter. It is considered a floating point value in the continuous range [1e-5, 1e-4]. We run 8 trials in total, with a parallelism of 1 or 2.
### Code example
The following code example launches an example hyperparameter tuning job of OpenLLaMA 7B model.
```py
from google.cloud import aiplatform
from google.cloud.aiplatform import hyperparameter_tuning as hpt
TRAIN_DOCKER_URI = 'us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-peft-train:20231130_0936_RC00'
output_dir = "gs://path/to/output/dir"
base_model_id = "openlm-research/open_llama_7b"
dataset_name = "timdettmers/openassistant-guanaco"
hpt_precision_mode = "4bit"
machine_type = "g2-standard-8"
accelerator_type = "NVIDIA_L4"
accelerator_count = 1
eval_task = "arc_challenge"
eval_metric_name = "acc_norm"
max_steps = 1000
eval_limit = 10000
flags = {
"learning_rate": 1e-5,
"precision_mode": hpt_precision_mode,
"task": "instruct-lora",
"pretrained_model_id": base_model_id,
"output_dir": output_dir,
"warmup_steps": 10,
"max_steps": max_steps,
"lora_rank": 32,
"lora_alpha": 64,
"lora_dropout": 0.05,
"dataset_name": dataset_name,
"eval_steps": max_steps + 1, # Only evaluates at the end.
"eval_tasks": eval_task,
"eval_limit": eval_limit,
"eval_metric_name": eval_metric_name,
}
worker_pool_specs = [
{
"machine_spec": {
"machine_type": machine_type,
"accelerator_type": accelerator_type,
"accelerator_count": accelerator_count,
},
"replica_count": 1,
"container_spec": {
"image_uri": TRAIN_DOCKER_URI,
"args": ["--{}={}".format(k, v) for k, v in flags.items()],
},
}
]
metric_spec = {"model_performance": "maximize"}
parameter_spec = {
"learning_rate": hpt.DoubleParameterSpec(
min=1e-5, max=1e-4, scale="linear"
),
}
train_job = aiplatform.CustomJob(
display_name=job_name,
worker_pool_specs=worker_pool_specs,
staging_bucket=STAGING_BUCKET,
)
train_hpt_job = aiplatform.HyperparameterTuningJob(
display_name=f"{job_name}_hpt",
custom_job=train_job,
metric_spec=metric_spec,
parameter_spec=parameter_spec,
max_trial_count=8,
parallel_trial_count=2,
)
train_hpt_job.run()
```
## Benchmark results
### Fine-tuning cost
The fine-tuning cost is calculated from `us-central1` pricing and may be subject to changes.
| Model | Train time | Trials | Parallel Trials | Hourly cost | Cost | Eval acc_norm (ARC-Challenge) |
|---------------|------------|--------|-----------------|-------------|----------|-------------------------------|
| OpenLLaMA 3B | 16 hrs | 8 | 2 | $1.7072 | $28.5671 | 39.9% |
| OpenLLaMA 7B | 28 hrs | 8 | 2 | $1.7072 | $47.8016 | 45.8% |
| OpenLLaMA 13B | 103 hrs | 8 | 1 | $0.8536 | $87.9208 | 47.6% |
### Fine-tuning performance
Here are the evaluation results of the best model found by hyperparameter tuning, compared with the baseline model. The column `Eval acc_norm` is calculated during training, which is always lower than that during standalone evaluation, because the model is loaded and evaluated at a lower precision (4bit during training / float16 during standalone evaluation).
| Model | Eval acc_norm (ARC-Challenge) | ARC | hellaswag | Truthfulqa_mc | ∆ARC | ∆Hellaswag | ∆Truthfulqa_mc | ∆Average |
|---------------|-------------------------------|--------|-----------|---------------|--------|------------|----------------|----------|
| OpenLLaMA 3B | 39.9% | 41.47% | 69.97% | 38.31% | +1.62% | +7.32% | +3.34% | +4.09% |
| OpenLLaMA 7B | 45.8% | 49.83% | 75.53% | 41.53% | +2.82% | +3.55% | +6.68% | +4.35% |
| OpenLLaMA 13B | 47.6% | 52.20% | 78.90% | 44.27% | +1.01% | +3.67% | +6.19% | +3.62% |
## Related documents
1. [Benchmark report on fine tuning the OpenLLaMA 7B model on Google Cloud Vertex Model Garden
](
https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/community-content/vertex_model_garden/benchmarking_reports/pytorch_openllama_7b_finetune_benchmark_report.md)
@@ -0,0 +1,218 @@
# Benchmark Stable Diffusion v1-5 Fine Tuning and Serving With Google Cloud Vertex Model Garden
Dustin Luong, Software Engineer, Google Cloud
Gary Wei, Software Engineer, Google Cloud
Changyu Zhu, Software Engineer, Google Cloud
Genquan Duan, Software Engineer, Google Cloud
## Introduction
[The public notebook][1] shows the full examples of fine tuning and serving of Stable diffusion v1-5. [The github repo][2] contains examples of building training and serving dockers for Google Cloud Vertex Model Garden. This report benchmarks Stable diffusion v1-5 fine tuning and serving in Google Cloud Vertex AI, showing both efficiencies and effectiveness.
### Benchmark Highlights
- Fine tuning
- Stable diffusion v1-5 with LoRA and Gradient checkpointing only requires ~10G GPU memory. Larger batch sizes, or larger resolutions require more GPU memories, but not does not change much for different LoRA ranks.
- The fine tuning speed is fast in ~11 minutes for 1k steps, and costs less than $1 in 1 A100. The fine tuning speed increases with batch sizes, decreases with resolution, but is not affected much by LoRA ranks.
- LoRA tunes a few percent (only 0.1% with LoRA rank=8) of all parameters, and the tuned models are very small (only 3.1MB with LoRA rank=8).
- Dreambooth+LoRA and Dreambooth can achieve similar performances, but Dreambooth LoRA can require much less GPU.
- Increasing batch size, reducing training steps, and increasing learning rate can result in models with the same performance for less cost.
- Inference
- The optimized serving docker pytorch-peft-serve can speed up inference by 2x than current pytorch-diffuser-serve, and support both base models and fine tuned lora models.
- The optimized serving docker pytorch-peft-serve can generate 4 512*512 images in 4.1 seconds on 1 V100 and 1.7 seconds on 1 A100.
Benchmark details are below.
## Fine Tuning Benchmarks
### Experiment Setup
We mainly compare two tuning algorithms:
- parameter efficient finetuning based on [dreambooth][3] and [LoRA][4] (shorten as Dreambooth+LoRA below)
- full parameter fine tuning based on [dreambooth][3] (shorten as Dreambooth below)
And then report benchmark results on GPU memories, tuning parameters, tuning speeds, costs and accuracy, using the public oxford flowers dataset: [train][5] and [test][6], where the column blip_caption as texts, and column image as images. We also benchmark subject and prompt fidelity using the [dataset][7] from the Dreambooth paper.
The default tuning parameters during benchmark are:
- Hardware: 1 A100 40G
- batch size: 4
- lora_rank: 8
- resolution: 512
- max_train_steps: 10
- use_lora: False
- gradient_checkpointing: False
```
# Examples to start finetuning dockers.
MODEL_NAME="runwayml/stable-diffusion-v1-5"
OUTPUT_DIR=<OUTPUT_DIR>
INSTANCE_DATA_DIR=<INSTANCE_DATA_DIR>
INSTANCE_PROMPT=<INSTANCE_PROMPT>
IMAGE="us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-peft-train"
docker run \
--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 \
--rm --name "test_gpu" \
-it ${IMAGE} \
--task=text-to-image-dreambooth-lora-peft \
--pretrained_model_name_or_path=$MODEL_NAME \
--resolution=512 \
--instance_data_dir=$INSTANCE_DATA_DIR \
--instance_prompt=$INSTANCE_PROMPT \
--train_batch_size=4 \
--max_train_steps=10 \
--output_dir=${OUTPUT_DIR} \
--use_lora \
--lora_r=8 \
--gradient_checkpointing
```
### GPU Memories
Many various factors will impact GPU memory usages. In this benchmark, we mainly benchmark with different finetuning algorithms, batch sizes, lora rank, resolution, and then recommended max batch size on different GPUs.
![sd_v1-5_peak_gpu_algorithm](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_peak_gpu_algorithm.png)
![sd_v1-5_peak_gpu_batch_size](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_peak_gpu_batch_size.png)
![sd_v1-5_peak_gpu_lora_rank](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_peak_gpu_lora_rank.png)
![sd_v1-5_peak_gpu_resolution](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_peak_gpu_resolution.png)
- LoRA tuning reduced about 47% peak RAM and 42% peak VRAM for GPU memory, compared to full parameter fine tuning.
- Gradient checkpointing decreases about 1% peak RAM and 31% peak VRAM for GPU memory further, compared without gradient checkpointing.
- The GPU memory does not change much for different LoRA ranks.
- Larger batch sizes require more GPU memories.
- Larger resolutions require more GPU memories.
- Dreambooth+LoRA+Gradient_Checkpointing can support max batch size as 32, or max resolution as 2048, but Dreambooth can only support max batch size as 8, or max resolution as 1024.
### Fine Tuning Parameters
This section shows the percentage of trainable parameters, and tuned model sizes.
- LoRA tunes quite a few percent (only 0.1% with LoRA rank=8) of all parameters, and the tuned models are very small (only 3.1MB with LoRA rank=8).
| LoRA Rank | Trainable parameters | Total parameters | Trainable Parameter Percentage | Fine tuned model size (MB) |
|---|---|---|---|---|
| 4 | 398592 | 859919556 | 0.05% | 1.57 |
|8 | 797184 | 860318148 | 0.09% | 3.09 |
| 16 | 1594368| 861115332| 0.19%| 6.13|
| 32| 3188736| 862709700| 0.37%| 12.21|
### Fine Tuning Speed And Costs
Fine tuning speeds and costs are affected by many different factors, such as batch size, tuning parameters, image resolutions, GPUs, and datasets. In order to make the report easy to understand, we set the following values in this section:
- Hardware: 1 A100 40G
- use_lora: True
- gradient_checkpointing: True
![sd_v1-5_training_speed_batch_size](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_training_speed_batch_size.png)
![sd_v1-5_training_speed_lora_rank](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_training_speed_lora_rank.png)
![sd_v1-5_training_speed_resolution](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_training_speed_resolution.png)
![sd_v1-5_training_cost_max_steps](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_training_cost_max_steps.png)
- The fine tuning speed increases with batch sizes, decreases with resolution, but is not affected much by LoRA ranks.
- The fine tuning speed is about 11 minutes for 1k steps, and costs less than $1 in 1 A100.
### Fine Tuning Quality
In this benchmark, we mainly benchmark Dreambooth and Dreambooth+LoRA to compare fine tuning quality. We compare [subject fidelity scored (DINO)][8], how well the subject is represented in the generated images, and [prompt fidelity scores (CoCa)][9], how well the generated images match the given prompt, for a single subject, a [dog][10] from the dataset released with the original Dreambooth paper. In practice, we recommend saving checkpoints periodically and inspecting validation prompts visually. We fine tuned the unet without fine tuning the text encoder and used the following hyperparameters:
Dreambooth
- Learning rate: 5e-6
- Batch size: 1
Dreambooth+LoRA
- Learning rate: 1e-4
- Batch size: 1
![sd_v1-5_finetuning_quality_subject_fidelity](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_finetuning_quality_subject_fidelity.png)
![sd_v1-5_finetuning_quality_prompt_fidelity](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_finetuning_quality_prompt_fidelity.png)
- Fine tuning with Dreambooth or Dreambooth+LoRA can result in models with comparable performance. The base model produced images of the class rather than the instance.
- Dreambooth+LoRA is able to achieve the same subject fidelity score as Dreambooth if trained for more epochs.
- Increasing the number of training steps results in better subject fidelity but at the cost of prompt fidelity.
### Suggested Max Batch Sizes By Resolutions
We benchmarked and suggested max batch sizes by resolutions on 1 A100 and 1 V100 as below. This is with LoRA and gradient checkpointing enabled.
![sd_v1-5_batch_size_by_resolution](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_batch_size_by_resolution.png)
### Fine Tuning Cost Optimization
Increasing batch size allows for more images to be considered at each training step for fine tuning. This allows models to be trained in fewer training steps. In this benchmark, we aim to show how batch size can be increased to reduce training costs while still preserving subject and prompt fidelity.
Since the training dataset consists of 5 images, we train with a batch size of 5 and reduce the number of training steps from 400 to 80. Doing so results in a model that has not learned the subject since we’ve decreased the number of training steps. Conceptually, the model is taking a more precise step at each iteration, but it is taking fewer steps. To compensate for this, we increased the learning rate from 5e-6 and observed the best results at 1e-5 for full parameter finetuning.
![sd_v1-5_subject_fidelity_batch_size_5_learning_rate](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_subject_fidelity_batch_size_5_learning_rate.png)
![sd_v1-5_prompt_fidelity_batch_size_5_learning_rate](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_prompt_fidelity_batch_size_5_learning_rate.png)
Comparing cost of training the “best” model for batch size 1 vs. batch size 5
![sd_v1-5_cost_batch_size](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_cost_batch_size.png)
| Train method| Training parameters| Sample image| CoCa (prompt fidelity)| DINO (subject fidelity) | Cost of training on A100 |
|---|---|---|---|---|---|
| dreambooth| dreambooth, num_train_steps=400, batch_size=1, lr=5e-6| ![dog1](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_dog1.png) | 0.12215| 0.76531| $0.26 |
| dreambooth | dreambooth, num_train_steps=80, batch_size=5,lr=1e-5| ![dog2](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_dog2.png)| 0.12644| 0.74697 | $0.15 |
| dreambooth-lora| num_train_steps=500, batch_size=1, lr=1e-4, gc|![dog3](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_dog3.png)| 0.12856| 0.78148 | $0.26|
| dreambooth-lora | num_train_steps=50, batch_size=5, lr=1e-3, gc | ![dog4](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_dog4.png) | 0.12566 | 0.75479 | $0.09 |
A followup question is that since finetuning can be run on a single GPU, should finetuning be run on 1 V100 or A100?
Setup:
- num_train_steps=800 / batch_size
- Resolution=512
![sd_v1-5_cost_training_method_batch_size](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_cost_training_method_batch_size.png)
- Although V100 has a lower $/hr cost than an A100, the same training setup takes longer. Even given the longer training time, the cost on V100 is still lower.
- Dreambooth+LoRA enables training with larger batch sizes, however, larger batch sizes will not necessarily mean faster training time.
- It is possible to fine tune with 1 V100 on 512 resolution with Dreambooth+LoRA.
- Dreambooth fine tuning must be run on 1 A100 at 512 resolution.
## Inference Benchmarks
We provide two serving dockers in vertex model garden for stable diffusion:
- pytorch-diffuser-serve:
- us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-diffusers-serve
- This serving docker only serves base stable diffusion models and does not contain any optimizations yet.
- pytorch-peft-serve:
- us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-peft-serve
- This serving docker can serve base stable diffusion models, and base stable diffusion models with fine tuned lora models, and contains optimization for serving.
We run the two serving dockers on T4/V100/A100 to generate 4 512*512 images, and compare the inference speed without network considerations as:
![sd_v1-5_inference_speed_gpu](images/stable_diffusion_v1-5_benchmarking_report/sd_v1-5_inference_speed_gpu.png)
The speed up of optimized pytorch-peft-serve is about 2x than current pytorch-diffuser-serve.
### Serving cost comparison
Pytorch-diffuser-serve (without any optimizations)
| GPU type| Time required to generate 4 512x512 images | Machine unit price ($ / hour) | Cost per image ($) |
|---|---|---|---|
| T4 | 28.6 | 0.4025| 0.00080 |
| V100 | 8.8 | 2.852| 0.00174|
| A100 | 4.2 | 4.2245 | 0.00123 |
Pytorch-peft-serve (with optimizations)
| GPU type | Time required to generate 4 512x512 images | Machine unit price ($ / hour) | Cost per image ($) |
|--- |---|---|---|
| T4 | 12.6 | 0.4025 | 0.00035 |
| V100 | 4.1 | 2.852 | 0.00081 |
| A100 | 1.7 | 4.2245 | 0.00050 |
- The optimized pytorch-peft-serve has approximately half the price per image, compared with the un-optimized pytorch-diffuser-serve.
- Serving the model with a T4 is most cost effective, however, serving with an A100 still has the best throughput and fastest predictions.
[1]: https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_stable_diffusion.ipynb
[2]: https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/community-content/vertex_model_garden/model_oss
[3]: https://arxiv.org/abs/2208.12242
[4]: https://arxiv.org/abs/2106.09685
[5]: https://huggingface.co/datasets/Multimodal-Fatima/OxfordFlowers_train
[6]: https://huggingface.co/datasets/Multimodal-Fatima/OxfordFlowers_test_facebook_opt_6.7b_Attributes_ns_6149
[7]: https://github.com/google/dreambooth
[8]: https://arxiv.org/abs/2104.14294
[9]: https://arxiv.org/abs/2205.01917
[10]: https://github.com/google/dreambooth/tree/main/dataset/dog6
@@ -0,0 +1,50 @@
# Dockerfile for serving dockers with AutoGluon.
#
# To build:
# docker build -f model_oss/autogluon/dockerfile/serve.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-runtime
USER root
# AutoGluon might require libgomp for some dependencies.
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
curl \
wget \
vim \
libgomp1
# Install AutoGluon and other dependencies.
RUN pip install --upgrade pip
RUN pip install autogluon==1.0.0
RUN pip install flask==3.0.0
# Dependencies needed to work with GCS.
RUN pip install absl-py==2.0.0
RUN pip install google-cloud-storage==2.7.0
# Copy scripts into the container.
COPY model_oss/autogluon /autogluon
COPY model_oss/util /autogluon/util
WORKDIR /autogluon
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
RUN wget https://github.com/pallets/flask/blob/main/LICENSE.rst
# Expose the port the app runs on.
EXPOSE 8501
# Set the working directory to a specific path for consistency.
WORKDIR /autogluon
# Change to a non-root user for security purposes.
RUN useradd -m autogluonuser
USER autogluonuser
# Run Flask application.
CMD ["python", "serve.py"]
@@ -0,0 +1,36 @@
# Dockerfile for training dockers with Autogluon.
#
# To build:
# docker build -f model_oss/autogluon/dockerfile/train.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-runtime
# Install tools.
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
apt-utils \
curl \
wget \
git \
jq \
gnupg \
build-essential \
tesseract-ocr \
vim
# Install libraries.
RUN pip install autogluon==1.0.0
COPY model_oss/autogluon /autogluon
WORKDIR /autogluon
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
ENTRYPOINT ["python", "train.py"]
@@ -0,0 +1,87 @@
r"""AutoGluon serving binary.
This module sets up a Flask web server for serving predictions from a
trained AutoGluon model. The server exposes two endpoints:
1. `/ping`: A health check endpoint that returns "pong" to
indicate that the server is running.
2. `/predict`: An endpoint that accepts POST requests with JSON content.
Each request should contain one or more instances for which the
predictions are desired. The endpoint returns the predictions and
associated probabilities in a JSON response.
The server expects an environment variable `model_path` that points to
the directory where the AutoGluon model artifacts are
stored. If `model_path` is not provided, it defaults to '/autogluon/models'.
"""
import json
import logging
import os
from autogluon.tabular import TabularPredictor
import flask
import pandas as pd
from util import constants
from util import fileutils
_SUCCESS_STATUS = 200
_ERROR_STATUS = 500
_PORT = 8501
app = flask.Flask(__name__)
# Check the environment variables.
model_dir = os.getenv('model_path', '/autogluon/models')
logging.info('Model directory passed by the user is: %s', model_dir)
# If the model is on GCS then copy it to a local folder first.
if model_dir.startswith(constants.GCS_URI_PREFIX):
gcs_path = model_dir[len(constants.GCS_URI_PREFIX) :]
local_model_dir = os.path.join(constants.LOCAL_MODEL_DIR, gcs_path)
logging.info('Download %s to %s', model_dir, local_model_dir)
fileutils.download_gcs_dir_to_local(model_dir, local_model_dir)
model_dir = local_model_dir
logging.info('Local model directory is: %s', model_dir)
# Load the predictor at startup.
predictor = TabularPredictor.load(model_dir)
@app.route('/ping', methods=['GET'])
def ping() -> flask.Response:
"""Health check route."""
return flask.Response('pong', status=_SUCCESS_STATUS)
@app.route('/predict', methods=['POST'])
def predict() -> flask.Response:
"""Prediction route."""
try:
# Extract JSON content from the POST request.
data = flask.request.get_json(force=True)
instances = data.get('instances', [])
# Convert instances to DataFrame.
df_to_predict = pd.DataFrame(instances)
# Perform prediction.
predictions = predictor.predict(df_to_predict).tolist()
response = {'predictions': predictions}
return flask.Response(
json.dumps(response),
status=_SUCCESS_STATUS,
mimetype='application/json',
)
except Exception as e: # pylint: disable=broad-exception-caught
return flask.Response(
json.dumps({'error': str(e)}),
status=_ERROR_STATUS,
mimetype='application/json',
)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=_PORT)
@@ -0,0 +1,144 @@
"""AutoGluon training binary. """
import argparse
import json
from typing import Any
from autogluon.tabular import TabularPredictor
import pandas as pd
class BaseConfig:
def to_dict(self) -> dict[str, Any]:
return {
key: value for key, value in self.__dict__.items() if value is not None
}
class DataConfig(BaseConfig):
def __init__(self, train_data_path: Any) -> None:
self.train_data_path = train_data_path
class ProblemConfig(BaseConfig):
def __init__(self, label: Any, problem_type: Any) -> None:
self.label = label
self.problem_type = problem_type
class EvaluationConfig(BaseConfig):
def __init__(self, eval_metric: Any) -> None:
self.eval_metric = eval_metric
class TrainingConfig(BaseConfig):
"""Config for training."""
def __init__(
self,
time_limit: Any,
presets: Any,
hyperparameters: Any,
model_save_path: str,
) -> None:
self.time_limit = time_limit
self.hyperparameters = hyperparameters
self.presets = presets
self.model_save_path = model_save_path
def parse_args() -> (
tuple[DataConfig, ProblemConfig, EvaluationConfig, TrainingConfig]
):
"""Parse command line arguments."""
parser = argparse.ArgumentParser(description="AutoGluon Tabular Predictor")
# Add arguments for each config class
parser.add_argument(
"--train_data_path",
type=str,
required=True,
help="Path to the input data CSV file.",
)
parser.add_argument(
"--label", type=str, required=True, help="Target variable column name."
)
parser.add_argument(
"--problem_type",
type=str,
choices=["binary", "multiclass", "regression", "quantile"],
default=None,
help="Problem type.",
)
parser.add_argument(
"--eval_metric", type=str, default=None, help="Evaluation metric to use."
)
# Add arguments for TrainingConfig if needed
parser.add_argument(
"--time_limit",
type=int,
default=None,
help="Time limit in seconds for training.",
)
parser.add_argument(
"--presets",
type=str,
default="medium_quality",
help="Presets used for training ",
)
parser.add_argument(
"--hyperparameters",
type=json.loads,
default=None,
help="Hyperparameter dictionary in JSON format.",
)
parser.add_argument(
"--model_save_path",
type=str,
default=None,
help="Path to save the trained model.",
)
args = parser.parse_args()
data_config = DataConfig(train_data_path=args.train_data_path)
problem_config = ProblemConfig(
label=args.label, problem_type=args.problem_type
)
eval_config = EvaluationConfig(eval_metric=args.eval_metric)
training_config = TrainingConfig(
time_limit=args.time_limit,
presets=args.presets,
hyperparameters=args.hyperparameters,
model_save_path=args.model_save_path,
)
return data_config, problem_config, eval_config, training_config
def main() -> None:
data_config, problem_config, eval_config, training_config = parse_args()
# Load the training data.
data = pd.read_csv(data_config.train_data_path)
# Create a TabularPredictor.
predictor = TabularPredictor(
label=problem_config.label,
eval_metric=eval_config.eval_metric,
path=training_config.model_save_path,
)
# Fit the model
predictor.fit(
data,
presets=training_config.presets,
time_limit=training_config.time_limit,
hyperparameters=training_config.hyperparameters,
)
if __name__ == "__main__":
main()
@@ -0,0 +1,25 @@
# The provided content is a configuration file for the ZipNeRF
# PyTorch implementation.
# Sets the name of the experiment to 'test'.
Config.exp_name = 'test'
# Specifies the dataset loader, in this case, 'llff' for light field.
Config.dataset_loader = 'llff'
# Defines the near and far clipping planes for the camera view.
Config.near = 0.2
Config.far = 1e6
# Image downsampling.
Config.factor = 4
# For the model configurations.
Model.raydist_fn = 'power_transformation'
Model.opaque_background = True
# Disables the computation of density normals and RGB values, and sets
# the grid level dimension to 1 for PropMLP.
PropMLP.disable_density_normals = True
PropMLP.disable_rgb = True
PropMLP.grid_level_dim = 1
# Disable density normals for NerfMLP
NerfMLP.disable_density_normals = True
@@ -0,0 +1,21 @@
# The provided content is a configuration file for Generative
# Latent Optimization (GLO) vectors in the Pytorch implemnetation of ZipNeRF.
# Specifies the dataset loader, in this case, 'llff' for light field.
Config.dataset_loader = 'llff'
# Defines the near and far clipping planes for the camera view.
Config.near = 0.2
Config.far = 1e6
# Image downsampling.
Config.factor = 4
# For the model configurations.
Model.raydist_fn = 'power_transformation'
Model.num_glo_features = 128
Model.opaque_background = True
PropMLP.disable_density_normals = True
PropMLP.disable_rgb = True
PropMLP.grid_level_dim = 1
NerfMLP.disable_density_normals = True
@@ -0,0 +1,18 @@
# The provided content is a configuration file running ZipNeRF
# training on 8 gpu machine.
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: MULTI_GPU
downcast_bf16: 'no'
gpu_ids: all
machine_rank: 0
main_training_function: main
mixed_precision: fp16
num_machines: 1
num_processes: 8
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false
@@ -0,0 +1,120 @@
# Dockerfile for ZipNeRF base image.
#
# To build:
# docker build -f model_oss/cloudnerf/dockerfile/pytorch_cloudnerf_base.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel
USER root
ARG COLMAP_GIT_COMMIT=main
ARG CUDA_ARCHITECTURES=60;70;75;80;86
# Prevent stop building ubuntu at time zone selection.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y --allow-releaseinfo-change && apt-get -y upgrade && apt-get install -y --no-install-recommends \
curl \
g++ \
wget \
vim \
bash \
cmake \
imagemagick \
ninja-build \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-system-dev \
libeigen3-dev \
libflann-dev \
libfreeimage-dev \
libmetis-dev \
libgoogle-glog-dev \
libgtest-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libceres-dev \
git \
git-lfs \
python3-cffi \
python3-cryptography \
libffi-dev \
python-dev
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Install google cloud CLI.
RUN wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-430.0.0-linux-x86.tar.gz
RUN tar xzf google-cloud-cli-430.0.0-linux-x86.tar.gz
RUN ./google-cloud-sdk/install.sh -q
# Make sure gsutil will use the default service account.
RUN echo '[GoogleCompute]\nservice_account = default' > /etc/boto.cfg
# Install deps and install gsutil.
RUN pip install gsutil==5.27
# When building colmap in colab, the link error "undefined reference.
# to '_glapi_tls_Current'" happens. A solution is to install "libglvnd"
# as described in this page https://github.com/colmap/colmap/issues/1271.
RUN git clone --depth 1 --branch v1.7.0 https://github.com/NVIDIA/libglvnd && \
apt-get install -y libxext-dev libx11-dev x11proto-gl-dev && \
cd libglvnd/ && \
apt-get install -y autoconf automake libtool && \
apt-get install -y libffi-dev && \
./autogen.sh && \
./configure && \
make -j4 && \
make install
RUN apt remove nvidia-cuda-toolkit -y \
nvidia-cuda-toolkit \
nvidia-cuda-toolkit-gcc
# Install libraries.
ENV PIP_ROOT_USER_ACTION=ignore
RUN python3 -m pip install --upgrade pip
ENV CUDA_HOME=/usr/local/cuda
RUN git clone --branch main https://github.com/SuLvXiangXin/zipnerf-pytorch.git
# Set current directory to the downloaded 'zipnerf-pytorch' repository.
WORKDIR ./zipnerf-pytorch
# Using git reset command to pin it down to a specific version.
RUN git reset --hard 4de3d21ebb9e15412d36951b56e2d713fddd812b
COPY model_oss/cloudnerf/requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Install gridencoder extensions and nvdiffrast (for textured mesh).
RUN cd .. && \
TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6+PTX" CXX=g++ pip install ./zipnerf-pytorch/gridencoder
# Install cuda version of torch_scatter.
RUN pip install torch-scatter==2.1.2 -f https://data.pyg.org/whl/torch-2.0.1+cu118.html
RUN pip install google-cloud-aiplatform==1.25.0
RUN pip install google-cloud-storage==2.9.0
# Build and install COLMAP.
RUN git clone --depth 1 --branch 3.8 https://github.com/colmap/colmap.git
RUN cd colmap && \
git fetch https://github.com/colmap/colmap.git ${COLMAP_GIT_COMMIT} && \
mkdir build && \
cd build && \
cmake .. -GNinja -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} && \
ninja && \
ninja install && \
cd .. && rm -rf colmap
RUN git clone --depth 1 --branch v1.0.2 https://github.com/dranjan/python-plyfile.git
RUN sed -i "20 i\sys.path.append('/workspace/zipnerf-pytorch/internal/pycolmap')" /workspace/zipnerf-pytorch/internal/datasets.py
RUN sed -i "21 i\sys.path.append('/workspace/zipnerf-pytorch/internal/pycolmap/pycolmap')" /workspace/zipnerf-pytorch/internal/datasets.py
@@ -0,0 +1,16 @@
# Dockerfile for ZipNeRF COLMAP image calibration.
#
# To build:
# docker build -f model_oss/cloudnerf/dockerfile/cloudnerf_pytorch_calibrate.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-cloudnerf-base:20231206_0923_RC00
COPY model_oss/cloudnerf/local_colmap_and_resize.sh /workspace/zipnerf-pytorch/scripts/local_colmap_and_resize.sh
WORKDIR /workspace/zipnerf-pytorch/
ENTRYPOINT ["bash","scripts/local_colmap_and_resize.sh"]
@@ -0,0 +1,22 @@
# Dockerfile for ZipNeRF rendering.
#
# To build:
# docker build -f model_oss/cloudnerf/dockerfile/pytorch_cloudnerf_render.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-cloudnerf-base:20231206_0923_RC00
COPY model_oss/cloudnerf/render.sh /workspace/zipnerf-pytorch/scripts/render.sh
COPY model_oss/cloudnerf/configs/360.gin /workspace/zipnerf-pytorch/configs/360.gin
COPY model_oss/cloudnerf/configs/360_glo.gin /workspace/zipnerf-pytorch/configs/360_glo.gin
COPY model_oss/cloudnerf/configs/accelerate_config.yaml /root/.cache/huggingface/accelerate/default_config.yaml
RUN sed -i '324s/.*/ keyframe_names = fp.read().splitlines()/' /workspace/zipnerf-pytorch/internal/camera_utils.py
ENV PYTHONPATH "${PYTHONPATH}:/workspace/zipnerf-pytorch/util"
WORKDIR /workspace/zipnerf-pytorch/
ENTRYPOINT ["bash", "scripts/render.sh"]
@@ -0,0 +1,21 @@
# Dockerfile for ZipNeRF training.
#
# To build:
# docker build -f model_oss/cloudnerf/dockerfile/pytorch_cloudnerf_train.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM us-docker.pkg.dev/vertex-ai/vertex-vision-model-garden-dockers/pytorch-cloudnerf-base:20231206_0923_RC00
COPY model_oss/cloudnerf/train.sh /workspace/zipnerf-pytorch/scripts/train.sh
COPY model_oss/cloudnerf/configs/360.gin /workspace/zipnerf-pytorch/configs/360.gin
COPY model_oss/cloudnerf/configs/360_glo.gin /workspace/zipnerf-pytorch/configs/360_glo.gin
COPY model_oss/cloudnerf/configs/accelerate_config.yaml /root/.cache/huggingface/accelerate/default_config.yaml
ENV PYTHONPATH "${PYTHONPATH}:/workspace/zipnerf-pytorch/util"
WORKDIR /workspace/zipnerf-pytorch/
ENTRYPOINT ["bash", "scripts/train.sh"]
@@ -0,0 +1,144 @@
#!/bin/bash
# This script runs colmap for scale invariant feature (SIFT) extraction and
# matching to map camera extrinsics and intrinsics values for ZipNeRF,
# given a folder of images and videos
# from a GCS bucket. It uses ffmepg to extract an image from a video at
# 1fps. The folder can contain images or videos. If both images and videos
# are present, the extracted frames from the videos is added to the images
# to create the final combined image dataset.
# vv-docker:google3-begin(internal)
# TODO(b/314042136): Specify cloudnerf colmap fps.
# vv-docker:google3-end
# Initialize variables.
use_gpu=1 # Default to 1 (assuming the docker is run on a machine with GPU)
gcs_dataset_path=""
gcs_experiment_path=""
camera=""
# This loop processes command-line arguments for configuring the container.
# It supports arguments for GPU usage, dataset and experiment paths,
# and camera type.
while [[ $# -gt 0 ]]; do
case $1 in
-use_gpu)
use_gpu="$2"
if ! [[ $use_gpu =~ ^[0-9]+$ ]]; then
echo "Error: -use_gpu must be an integer."
exit 1
fi
shift # past argument
shift # past value
;;
-gcs_dataset_path)
gcs_dataset_path="$2"
shift # past argument
shift # past value
;;
-gcs_experiment_path)
gcs_experiment_path="$2"
shift # past argument
shift # past value
;;
-camera)
camera="$2"
if [[ $camera != "OPENCV" && $camera != "OPENCV_FISHEYE" ]]; then
echo "Error: -camera must be either 'OPENCV' or 'OPENCV_FISHEYE'."
exit 1
fi
shift # past argument
shift # past value
;;
*) # unknown option
echo "Unknown option: $1" >&2
exit 1
;;
esac
done
local_folder="dataset_content"
images_folder="dataset_images"
images_subfolder="images"
output_folder="$images_folder/$images_subfolder"
# Create the local folder if it doesn't exist
mkdir -p "$local_folder"
mkdir -p "$output_folder"
# Download the content from the GCS URI
gsutil -m cp -r "$gcs_dataset_path"/* "$local_folder/"
# Process files in the local folder
for file in "$local_folder"/*; do
if [[ -f "$file" ]]; then
# Check if the file is an image (e.g., jpg, png, etc.)
if file --mime-type "$file" | grep -q "image"; then
# Copy the image to the "images" subfolder within the "dataset_images" folder
cp "$file" "$output_folder/$(basename "$file")"
elif file --mime-type "$file" | grep -q "video"; then
# Use FFmpeg to extract an image every 30 frames from the video
ffmpeg -i "$file" -vf "select='not(mod(n,30))'" "$output_folder/$(basename "$file" ."${file##*.}")_%03d.jpg"
else
echo "Skipping unsupported file: $file"
fi
fi
done
# Run COLMAP Feature extraction
colmap feature_extractor \
--database_path "$local_folder"/database.db \
--image_path "$output_folder" \
--ImageReader.single_camera 1 \
--ImageReader.camera_model "$camera" \
--SiftExtraction.use_gpu "$use_gpu"
# Run COLMAP Feature matching
colmap exhaustive_matcher \
--database_path "$local_folder"/database.db \
--SiftMatching.use_gpu "$use_gpu"
# Bundle adjustment. The default Mapper tolerance is unnecessarily large,
# decreasing it speeds up bundle adjustment steps.
mkdir -p "$local_folder"/sparse
colmap mapper \
--database_path "$local_folder"/database.db \
--image_path "$output_folder" \
--output_path "$local_folder"/sparse \
--Mapper.ba_global_function_tolerance=0.000001
# Downsample images at 1/2, 1/4, 1/8 scales. Save feature matching to
# sqlite database.
# All input and output images:
# $gcs_dataset_path
# $gcs_experiment_path/data/images
# Downsampled output images:
# $gcs_experiment_path/data/images_2/
# $gcs_experiment_path/data/images_4/
# $gcs_experiment_path/data/images_8/
# COLMAP sparse reconstruction files: project.ini, images.bin,
# cameras.bin, points3D.bin
# $gcs_experiment_path/data/sparse/0/
cp -r "$output_folder" "$images_folder"/images_2
pushd "$images_folder"/images_2
ls | xargs -P 8 -I {} mogrify -resize 50% {}
popd
gsutil -m cp -r "$images_folder"/images_2/* "$gcs_experiment_path"/data/images_2
cp -r "$output_folder" "$images_folder"/images_4
pushd "$images_folder"/images_4
ls | xargs -P 8 -I {} mogrify -resize 25% {}
popd
gsutil -m cp -r "$images_folder"/images_4/* "$gcs_experiment_path"/data/images_4
cp -r "$output_folder" "$images_folder"/images_8
pushd "$images_folder"/images_8
ls | xargs -P 8 -I {} mogrify -resize 12.5% {}
popd
gsutil -m cp "$images_folder"/images_8/* "$gcs_experiment_path"/data/images_8
# Copy images and sparse reconstruction files to gcs experiment folder.
gsutil -m cp "$images_folder"/images/* "$gcs_experiment_path"/data/images
gsutil -m cp -r "$local_folder"/sparse "$gcs_experiment_path"/data
gsutil -m cp "$local_folder"/database.db "$gcs_experiment_path"/data
echo "Processing complete."
@@ -0,0 +1,117 @@
#!/bin/bash
# This script runs rendering for ZipNeRF given an experiment folder
# from a GCS bucket with colmap dataset.
# Initialize associative array for arguments.
declare -A args
# vv-docker:google3-begin(internal)
# TODO(b/311468174): Pass gin config file from gcs bucket.
# vv-docker:google3-end
# Function to parse named arguments.
parse_args() {
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-gcs_experiment_path|-gin_config_file|-gcs_keyframes_file)
args[$key]="$2"
shift # past argument
shift # past value
;;
-training_job_name)
training_job_name="$2"
shift # past argument
shift # past value
;;
-rendering_job_name)
rendering_job_name="$2"
shift # past argument
shift # past value
;;
-render_path_frames|-factor|-render_video_fps)
args[$key]="$2"
if ! [[ ${args[$key]} =~ ^[0-9]+$ ]]; then
echo "Error: $key must be an integer."
exit 1
fi
shift # past argument
shift # past value
;;
*)
echo "Unknown option: $1" >&2
exit 1
;;
esac
done
}
# Function to create a directory if it doesn't exist.
create_dir_if_not_exists() {
local dir_path=$1
if [[ ! -d "$dir_path" ]]; then
echo "Creating folder: $dir_path"
mkdir "$dir_path"
else
echo "Folder $dir_path already exists."
fi
}
# Function to launch rendering.
launch_rendering() {
local keyframes_file=$1
local render_bindings=(
"--gin_configs=${args[-gin_config_file]}"
"--gin_bindings=Config.data_dir='${DATASET_PATH}'"
"--gin_bindings=Config.exp_name='${EXPERIMENT}'"
"--gin_bindings=Config.render_path=True"
"--gin_bindings=Config.render_path_frames=${args[-render_path_frames]}"
"--gin_bindings=Config.render_video_fps=${args[-render_video_fps]}"
"--gin_bindings=Config.factor=${args[-factor]}"
)
if [[ -n $keyframes_file ]]; then
render_bindings+=("--gin_bindings=Config.render_spline_keyframes='${keyframes_file}'")
fi
accelerate launch render.py "${render_bindings[@]}"
}
# Parse arguments.
parse_args "$@"
# Extract folder names and paths.
scene_folder_name=$(basename "${args[-gcs_experiment_path]}")
local_dataset_path="local_dataset"
local_experiment_path="exp"
exp_folder_name=$(basename "${args[-gcs_experiment_path]}")
DATASET_PATH="$local_experiment_path/$exp_folder_name/data"
CHECKPOINTS_PATH="$local_experiment_path/$exp_folder_name/checkpoints"
OUTPUT_RENDER_PATH="$local_experiment_path/$scene_folder_name/render"
EXPERIMENT=$exp_folder_name
# Create necessary directories.
create_dir_if_not_exists "$local_dataset_path"
create_dir_if_not_exists "$local_experiment_path"
create_dir_if_not_exists "$local_experiment_path/$exp_folder_name"
create_dir_if_not_exists "$CHECKPOINTS_PATH"
# Create the file log_render.txt in the exp folder.
touch "$local_experiment_path/$exp_folder_name/log_render.txt"
# Copy experiment from GCS bucket to local
gsutil -m cp -r "${args[-gcs_experiment_path]}/data" "$local_experiment_path/$exp_folder_name" || exit 1
gsutil -m cp -r "${args[-gcs_experiment_path]}/checkpoints/${training_job_name}/*" "$CHECKPOINTS_PATH" || exit 1
# Check and copy keyframes file.
if [[ -n ${args[-gcs_keyframes_file]} ]]; then
keyframes_file_basename=$(basename "${args[-gcs_keyframes_file]}")
local_keyframes_file="$local_dataset_path/$keyframes_file_basename"
gsutil cp "${args[-gcs_keyframes_file]}" "$local_keyframes_file" || exit 1
echo "Local keyframe file: $local_keyframes_file"
launch_rendering "$local_keyframes_file"
else
launch_rendering ""
fi
# Copy rendered data back to GCS.
gsutil -m cp -r "$OUTPUT_RENDER_PATH" "${args[-gcs_experiment_path]}/render/${rendering_job_name}"
@@ -0,0 +1,24 @@
--find-links https://download.pytorch.org/whl/torch_stable.html
torch==2.0.1+cu118
numpy==1.26.1
absl_py==2.0.0
accelerate==0.24.0
gin_config==0.5.0
imageio==2.31.6
imageio-ffmpeg==0.4.9
matplotlib==3.8.0
mediapy==1.1.9
ninja==1.11.1.1
opencv_contrib_python==4.8.1.78
opencv_python==4.8.1.78
Pillow==10.3.0
rawpy==0.18.1
scipy==1.11.3
scikit-image==0.22.0
scikit-learn==1.5.0
tensorboard==2.15.0
tensorboardX==2.6.2.2
tqdm==4.66.3
trimesh==4.0.1
xatlas==0.0.8
@@ -0,0 +1,94 @@
#!/bin/bash
# Initialize variables.
training_job_name=""
gcs_experiment_path=""
gin_config_file="configs/360.gin"
factor=4
max_training_steps=25000
# Parse named arguments.
while [[ $# -gt 0 ]]; do
case $1 in
-training_job_name)
training_job_name="$2"
shift # past argument
shift # past value
;;
-gcs_experiment_path)
gcs_experiment_path="$2"
shift # past argument
shift # past value
;;
-gin_config_file)
gin_config_file="$2"
shift # past argument
shift # past value
;;
-factor)
factor="$2"
if ! [[ $factor =~ ^[0-9]+$ ]]; then
echo "Error: -factor must be an integer."
exit 1
fi
shift # past argument
shift # past value
;;
-max_training_steps)
max_training_steps="$2"
if ! [[ $max_training_steps =~ ^[0-9]+$ ]]; then
echo "Error: -max_training_steps must be an integer."
exit 1
fi
shift # past argument
shift # past value
;;
*) # unknown option
echo "Unknown option: $1" >&2
exit 1
;;
esac
done
# Function to create a directory if it doesn't exist.
create_dir_if_not_exists() {
local dir_path=$1
if [[ ! -d "$dir_path" ]]; then
echo "Creating folder: $dir_path"
mkdir "$dir_path"
else
echo "Folder $dir_path already exists."
fi
}
# Extract folder names and paths.
scene_folder_name=$(basename "${gcs_experiment_path}")
local_dataset_path="local_dataset"
local_experiment_path="exp"
DATASET_PATH="$local_experiment_path/$scene_folder_name/data"
EXPERIMENT=$scene_folder_name
# Create necessary directories.
create_dir_if_not_exists "$local_dataset_path"
create_dir_if_not_exists "$local_experiment_path"
create_dir_if_not_exists "$local_experiment_path/$scene_folder_name"
# Copy experiment from GCS bucket to local.
gsutil -m cp -r "${gcs_experiment_path}/data" "$local_experiment_path/$scene_folder_name" || exit 1
echo "GCS Experiment: $gcs_experiment_path"
echo "Gin Config File: $gin_config_file"
echo "Factor: $factor"
echo "Scene: $scene_folder_name"
echo "Local Dataset: $DATASET_PATH"
echo "Local Experiment: $EXPERIMENT"
accelerate launch train.py --gin_configs="$gin_config_file" \
--gin_bindings="Config.data_dir = '${DATASET_PATH}'" \
--gin_bindings="Config.exp_name = '${EXPERIMENT}'" \
--gin_bindings="Config.factor = ${factor}" \
--gin_bindings="Config.max_steps = ${max_training_steps}"
gsutil -m rm -r "${gcs_experiment_path}/checkpoints/${training_job_name}"
gsutil -m cp -r "$local_experiment_path/$scene_folder_name/config.gin" "${gcs_experiment_path}/${training_job_name}_config.gin"
gsutil -m cp -r "$local_experiment_path/$scene_folder_name/checkpoints/*/*" "${gcs_experiment_path}/checkpoints/${training_job_name}"
@@ -0,0 +1,90 @@
# Dockerfile for Detectron2 serving.
#
# To build:
# docker build -f model_oss/detectron2/dockerfile/serving.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM pytorch/torchserve:0.7.0-cpu
USER root
# Install tools.
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
wget \
vim
# run and update some basic packages software packages, including security libs
RUN apt-get update && apt-get install -y \
software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && apt-get install -y \
gcc-9 g++-9 apt-transport-https ca-certificates gnupg curl
# Install gcloud tools for gsutil as well as debugging
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && apt-get install google-cloud-sdk -y
USER model-server
# install detectron2 dependencies
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --user numpy==1.24.2
RUN python3 -m pip install --user opencv-python==4.7.0.72
RUN python3 -m pip install --user 'git+https://github.com/facebookresearch/detectron2.git@v0.6'
# Install GCS storage library.
RUN pip install google-cloud-storage==2.6.0
# For mask encoding.
RUN pip install --upgrade pycocotools==2.0.6
ARG MODEL_NAME=detectron2_serving
ENV MODEL_NAME="${MODEL_NAME}"
# health and prediction listener ports
ARG AIP_HTTP_PORT=7080
ENV AIP_HTTP_PORT="${AIP_HTTP_PORT}"
ARG MODEL_MGMT_PORT=7081
# expose health and prediction listener ports from the image
EXPOSE "${AIP_HTTP_PORT}"
EXPOSE "${MODEL_MGMT_PORT}"
EXPOSE 8080 8081 8082 7070 7071
# create torchserve configuration file
USER root
RUN echo "service_envelope=json\n" \
"inference_address=http://0.0.0.0:${AIP_HTTP_PORT}\n" \
"management_address=http://0.0.0.0:${MODEL_MGMT_PORT}" >> /home/model-server/config.properties
USER model-server
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Copy model artifacts.
COPY ./model_oss/detectron2/handler.py /home/model-server/handler.py
WORKDIR /home/model-server/
# Create model archive file packaging model artifacts and dependencies.
# Note(lavrai): The model `.pth` file and `cfg.yaml` file will be set by the
# customer as an environment variable and will be later loaded by the
# `handler.py` file.
RUN torch-model-archiver \
--model-name="${MODEL_NAME}" \
--version=1.0 \
--handler=/home/model-server/handler.py \
--export-path=/home/model-server/model-store \
-f
# run Torchserve HTTP serve to respond to prediction requests
CMD ["ls", "-ltr", "/home/model-server/model-store/", ";", \
"torchserve", "--start", "--ts-config=/home/model-server/config.properties", \
"--models", "${MODEL_NAME}=${MODEL_NAME}.mar", \
"--model-store", "/home/model-server/model-store"]
@@ -0,0 +1,100 @@
# Dockerfile for Detectron2 training.
#
# To build:
# docker build -f model_oss/detectron2/dockerfile/train.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04
# Using an older system (18.04) to avoid opencv incompatibility (issue#3524).
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
python3.7 python3.7-dev python3.7-distutils \
python3-opencv ca-certificates git wget sudo ninja-build \
curl wget vim
# Make python3 available for python3.7.
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
RUN update-alternatives --config python3
# Make python available for python3.7.
RUN ln -sv /usr/bin/python3.7 /usr/bin/python
# Create a non-root user.
ARG USER_ID=1000
RUN useradd -m --no-log-init --system --uid ${USER_ID} appuser -g sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER appuser
WORKDIR /home/appuser
ENV PATH="/home/appuser/.local/bin:${PATH}"
RUN wget https://bootstrap.pypa.io/pip/get-pip.py && \
python3.7 get-pip.py --user && \
rm get-pip.py
# Important! Otherwise, it uses existing numpy from host-modules
# which throws error.
RUN pip install --user numpy==1.20.3
# Install dependencies:
# See https://pytorch.org/ for other options if you use
# a different version of CUDA.
RUN pip install --user tensorboard==2.11.0
# cmake from apt-get is too old.
RUN pip install --user cmake==3.25.2
RUN pip install --user torch==1.10.0+cu111 torchvision==0.11.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install --user setuptools==59.5.0
RUN pip install --user opencv-python==4.7.0.72
RUN pip install --user cloudml-hypertune==0.1.0.dev6
RUN pip install --user fvcore==0.1.5.post20221221
# Install detectron2.
RUN git clone -b v0.6 https://github.com/facebookresearch/detectron2 detectron2_repo
# Set FORCE_CUDA because during `docker build` cuda is not accessible.
ENV FORCE_CUDA="1"
# This will by default build detectron2 for all common cuda
# architectures and take a lot more time,
# because inside `docker build`, there is no way to tell
# which architecture will be used.
ARG TORCH_CUDA_ARCH_LIST="Kepler;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;Volta;Turing"
ENV TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
RUN pip install --user -e detectron2_repo
# Set a fixed model cache directory.
ENV FVCORE_CACHE="/tmp"
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Copy model-garden detectron2 files to '/home/appuser/trainer' folder.
ADD ./model_oss/detectron2 /home/appuser/trainer
################ Copy plain_train_net.py to task.py and
# then modify it using sed commands. ###################
# Src: https://github.com/facebookresearch/detectron2/blob/v0.6/tools/plain_train_net.py
RUN sudo cp /home/appuser/detectron2_repo/tools/plain_train_net.py /home/appuser/trainer/task.py
# Make additional changes to task.py.
# Note(lavrai): Start adding SED commands from end of file towards the top
# so that the line numbers do not keep changing for the source file.
# For entry-point:
RUN sudo sed -i "214 d" /home/appuser/trainer/task.py
RUN sudo sed -i "213 a\ default_arg_parser = default_argument_parser()" /home/appuser/trainer/task.py
RUN sudo sed -i "214 a\ extended_parser = trainer_utils.extend_parser_arguments(default_arg_parser)" /home/appuser/trainer/task.py
RUN sudo sed -i "215 a\ args = extended_parser.parse_args()" /home/appuser/trainer/task.py
# For main() function:
RUN sudo sed -i "192 a\ trainer_utils.register_dataset(args)" /home/appuser/trainer/task.py
# For setup() function:
RUN sudo sed -i "184 a\ cfg.SOLVER.BASE_LR = args.lr" /home/appuser/trainer/task.py
RUN sudo sed -i "185 a\ cfg.OUTPUT_DIR = args.output_dir" /home/appuser/trainer/task.py
RUN sudo sed -i "186 a\ cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(config_file_copy)" /home/appuser/trainer/task.py
RUN sudo sed -i "182 a\ config_file_copy = args.config_file" /home/appuser/trainer/task.py
RUN sudo sed -i "183 a\ args.config_file = model_zoo.get_config_file(args.config_file)" /home/appuser/trainer/task.py
# For new import:
RUN sudo sed -i "27 a\from detectron2 import model_zoo" /home/appuser/trainer/task.py
RUN sudo sed -i "21 a\import trainer_utils" /home/appuser/trainer/task.py
ENV PYTHONPATH /home/appuser/trainer
ENTRYPOINT ["python", "-m", "trainer.task"]
@@ -0,0 +1,154 @@
"""Custom handler for Detectron2 serving."""
import io
import json
import os
from typing import Any, List, Tuple
import cv2
from detectron2.config import get_cfg
from detectron2.engine import DefaultPredictor
from google.cloud import storage
import numpy as np
import pycocotools.mask as mask_util
import torch
def get_bucket_and_blob_name(gcs_filepath: str) -> Tuple[str, str]:
"""Gets bucket and blob name from gcs path."""
# The gcs path is of the form gs://<bucket-name>/<blob-name>
gs_suffix = gcs_filepath.split("gs://", 1)[1]
return tuple(gs_suffix.split("/", 1))
def download_gcs_file(src_file_path: str, dst_file_path: str):
"""Downloads gcs-file to local folder."""
src_bucket_name, src_blob_name = get_bucket_and_blob_name(src_file_path)
client = storage.Client()
src_bucket = client.get_bucket(src_bucket_name)
src_blob = src_bucket.blob(src_blob_name)
src_blob.download_to_filename(dst_file_path)
class ModelHandler:
"""Custom model handler for Detectron2."""
def __init__(self):
self.error = None
self._batch_size = 0
self.initialized = False
self.predictor = None
self.test_threshold = 0.5
def initialize(self, context: Any):
"""Initialize."""
print("context.system_properties: ", context.system_properties)
print("context.manifest: ", context.manifest)
self.manifest = context.manifest
properties = context.system_properties
# Get threshold from environment variable.
# This will be set by customer.
self.test_threshold = float(os.environ.get("TEST_THRESHOLD"))
print("test_threshold: ", self.test_threshold)
# Get model and config file location from environment variables.
# These will be set by customer when doing model upload.
gcs_model_file = os.environ["MODEL_PTH_FILE"]
gcs_config_file = os.environ["CONFIG_YAML_FILE"]
print("Copying gcs_model_file: ", gcs_model_file)
print("Copying gcs_config_file: ", gcs_config_file)
# Copy these files from GCS location to local file.
# Note(lavrai): GCSFuse path does not seem to work here for now.
model_file = "./model.pth"
config_file = "./cfg.yaml"
download_gcs_file(src_file_path=gcs_model_file, dst_file_path=model_file)
if not os.path.exists(model_file):
raise RuntimeError("Missing model_file: %s" % model_file)
download_gcs_file(src_file_path=gcs_config_file, dst_file_path=config_file)
if not os.path.exists(config_file):
raise RuntimeError("Missing config_file: %s" % config_file)
# Set up config file.
cfg = get_cfg()
cfg.merge_from_file(config_file)
cfg.MODEL.WEIGHTS = model_file
cfg.MODEL.DEVICE = (
cfg.MODEL.DEVICE + str(properties.get("gpu_id"))
if torch.cuda.is_available()
else "cpu"
)
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = self.test_threshold
# Build predictor from config.
self.predictor = DefaultPredictor(cfg)
self._batch_size = context.system_properties["batch_size"]
self.initialized = True
def preprocess(self, batch: List[Any]) -> List[Any]:
"""Preprocess raw input and return as list of images."""
print("Running pre-processing.")
images = []
for request in batch:
request_data = request.get("data")
input_bytes = io.BytesIO(request_data)
img = cv2.imdecode(np.fromstring(input_bytes.read(), np.uint8), 1)
images.append(img)
return images
def inference(self, model_input: List[Any]) -> List[Any]:
"""Runs inference."""
print("Running model-inference.")
return [self.predictor(image) for image in model_input]
def postprocess(self, inference_result: List[Any]) -> List[Any]:
"""Post process inference result."""
response_list = []
print("Num inference_items are:", len(inference_result))
for inference_item in inference_result:
predictions = inference_item["instances"].to("cpu")
print("Predictions are:", predictions)
boxes = None
if predictions.has("pred_boxes"):
boxes = predictions.pred_boxes.tensor.numpy().tolist()
scores = None
if predictions.has("scores"):
scores = predictions.scores.numpy().tolist()
classes = None
if predictions.has("pred_classes"):
classes = predictions.pred_classes.numpy().tolist()
masks_rle = None
if predictions.has("pred_masks"):
# Do run length encoding, else the mask output becomes huge.
masks_rle = [
mask_util.encode(np.asfortranarray(mask))
for mask in predictions.pred_masks
]
for rle in masks_rle:
rle["counts"] = rle["counts"].decode("utf-8")
response = {
"classes": classes,
"scores": scores,
"boxes": boxes,
"masks_rle": masks_rle,
}
response_list.append(json.dumps(response))
print("response_list: ", response_list)
return response_list
def handle(self, data: Any, context: Any) -> List[Any]: # pylint: disable=unused-argument
"""Runs preprocess, inference, and post-processing."""
model_input = self.preprocess(data)
model_out = self.inference(model_input)
output = self.postprocess(model_out)
print("Done handling input.")
return output
_service = ModelHandler()
def handle(data: Any, context: Any) -> List[Any]:
if not _service.initialized:
_service.initialize(context)
if data is None:
return None
return _service.handle(data, context)
@@ -0,0 +1,97 @@
"""Detectron2 trainer helper functions."""
import argparse
from detectron2.data.datasets import register_coco_instances
def extend_parser_arguments(
parser: argparse.ArgumentParser,
) -> argparse.ArgumentParser:
"""Adds additional model-garden related arguments."""
parser.add_argument(
"--train_dataset_name",
required=False,
default="",
type=str,
help=(
"The training dataset name for registration. "
"For example: 'balloon_train'."
),
)
parser.add_argument(
"--train_coco_json_file",
required=False,
default="",
type=str,
help="The path to the training coco-json format file.",
)
parser.add_argument(
"--train_image_root",
required=False,
default="",
type=str,
help="The path to the root folder containing the training images.",
)
parser.add_argument(
"--val_dataset_name",
required=False,
default="",
type=str,
help=(
"The validation dataset name for registration. "
"For example: 'balloon_val'."
),
)
parser.add_argument(
"--val_coco_json_file",
required=False,
default="",
type=str,
help="The path to the validation coco-json format file.",
)
parser.add_argument(
"--val_image_root",
required=False,
default="",
type=str,
help="The path to the root folder containing the validation images.",
)
parser.add_argument(
"--output_dir",
required=True,
type=str,
help="The path to the output directory.",
)
# Add hyper-parameter tuning related variables.
parser.add_argument(
"--lr",
type=float,
default=0.00025,
help="The learning rate to be tuned.",
)
parser.add_argument(
"--hp_eval_task",
type=str,
choices=["bbox", "segm"],
default="bbox",
help="The task choice for HP tuning.",
)
return parser
def register_dataset(args: argparse.Namespace):
"""Register the input dataset in Detectron2 Coco format."""
if args.train_dataset_name:
register_coco_instances(
name=args.train_dataset_name,
metadata={},
json_file=args.train_coco_json_file,
image_root=args.train_image_root,
)
if args.val_dataset_name:
register_coco_instances(
name=args.val_dataset_name,
metadata={},
json_file=args.val_coco_json_file,
image_root=args.val_image_root,
)
@@ -0,0 +1,83 @@
# This Dockerfile converts JAX vision transformer model to
# tensorflow saved model format.
# Here is an example to build this dockerfile:
# PROJECT="your gcp project"
# IMAGE_TAG="jax-f-vlm-model-conversion:${USER}-test"
# docker build -f model_oss/fvlm/dockerfile/jax_fvlm_model_conversion.Dockerfile . -t "${IMAGE_TAG}"
# docker tag "${IMAGE_TAG}" "gcr.io/${PROJECT}/${IMAGE_TAG}"
# docker push "gcr.io/${PROJECT}/${IMAGE_TAG}"
# See https://cloud.google.com/tensorflow-enterprise/docs/overview for details.
FROM gcr.io/deeplearning-platform-release/tf2-gpu.2-12.py310:m110
ENV DEBIAN_FRONTEND=noninteractive
# Install basic libs
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
curl \
wget \
sudo \
gnupg \
libsm6 \
libxext6 \
libxrender-dev \
lsb-release \
ca-certificates \
build-essential \
git \
libgl1
# Copy Apache license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Install required libs
RUN pip install --upgrade pip
# Using the commit 6712c224985c694001ba8ee68697bbf4dcb32edb on Jan 4th, 2024.
ARG COMMIT_ID=6712c224985c694001ba8ee68697bbf4dcb32edb
RUN git clone -c \
remote.origin.fetch=+${COMMIT_ID}:refs/remotes/origin/${COMMIT_ID} \
https://github.com/google-research/google-research --no-checkout --progress \
--depth 1
WORKDIR ./google-research
RUN git sparse-checkout init --cone
RUN git sparse-checkout set fvlm
RUN git checkout ${COMMIT_ID}
# The following pip installs are pinned down versions satisfying
# fvlm/requirements.txt file.
# NOTE: Using `no-deps` flag to avoid overwriting of dependent library
# versions. For example, both `chex` and `jax` can overwrite each other's
# `jax-lib` version.
# Note: The following libraries are pinned down versions of:
# https://github.com/google-research/google-research/blob/master/fvlm/requirements.txt
RUN pip install --no-cache-dir tensorflow==2.12.0
RUN pip install --no-cache-dir tensorflow-datasets==4.9.2
RUN pip install --no-cache-dir numpy==1.23.5
RUN pip install --no-cache-dir torch==2.0.1
RUN pip install --no-cache-dir torchvision==0.15.2
RUN pip install --no-cache-dir opencv-python==4.7.0.72
RUN pip install --no-cache-dir tqdm==4.65.0
RUN pip install --no-cache-dir git+https://github.com/openai/CLIP.git@a1d071733d7111c9c014f024669f959182114e33
RUN pip install --no-cache-dir Pillow==9.5.0
RUN pip install --no-cache-dir orbax-checkpoint==0.3.3
RUN pip install --no-cache-dir gin-config==0.5.0
RUN pip install --no-cache-dir pycocotools==2.0.6
RUN pip install --no-cache-dir contextlib2==21.6.0
RUN pip install --no-cache-dir ml-collections==0.1.1
RUN pip install --no-cache-dir chex==0.1.7
RUN pip install --no-cache-dir optax==0.1.5
# Dependencies already included. Use no-deps to not update numpy.
RUN pip install --no-cache-dir --no-deps flax==0.7.2
RUN pip install --no-cache-dir --no-deps clu==0.0.9
RUN pip install --no-cache-dir jax[cuda11_cudnn86]==0.4.9 \
--find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
RUN pip install --no-cache-dir ml-dtypes==0.2.0
RUN pip install --no-cache-dir tensorflow_text==2.12.0
WORKDIR ./fvlm
ENV PYTHONPATH ./
ENTRYPOINT ["python", "export_saved_model.py"]
@@ -0,0 +1,78 @@
# This Dockerfile trains the F-VLM model on GPU.
# Here is an example to build this dockerfile:
# PROJECT="your gcp project"
# IMAGE_TAG="jax-f-vlm-train:${USER}-test"
# docker build -f model_oss/fvlm/dockerfile/jax_fvlm_train_gpu.Dockerfile . -t "${IMAGE_TAG}"
# docker tag "${IMAGE_TAG}" "gcr.io/${PROJECT}/${IMAGE_TAG}"
# docker push "gcr.io/${PROJECT}/${IMAGE_TAG}"
# See https://cloud.google.com/tensorflow-enterprise/docs/overview for details.
FROM gcr.io/deeplearning-platform-release/tf2-gpu.2-12.py310:m110
ENV DEBIAN_FRONTEND=noninteractive
# Install basic libs
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
curl \
wget \
sudo \
gnupg \
libsm6 \
libxext6 \
libxrender-dev \
lsb-release \
ca-certificates \
build-essential \
git
# Copy Apache license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Install required libs
RUN pip install --upgrade pip
# The following pip installs are pinned down versions satisfying
# fvlm/requirements.txt file.
# Get F-VLM repository by using git sparse-checkout to avoid downloading entire
# google-research repository.
# Using the commit 6712c224985c694001ba8ee68697bbf4dcb32edb on Jan 4th, 2024.
ARG COMMIT_ID=6712c224985c694001ba8ee68697bbf4dcb32edb
RUN git clone -c \
remote.origin.fetch=+${COMMIT_ID}:refs/remotes/origin/${COMMIT_ID} \
https://github.com/google-research/google-research --no-checkout --progress \
--depth 1
WORKDIR ./google-research
RUN git sparse-checkout init --cone
RUN git sparse-checkout set fvlm
RUN git checkout ${COMMIT_ID}
# Note: The following libraries are pinned down versions of:
# https://github.com/google-research/google-research/blob/master/fvlm/requirements.txt
RUN pip install --no-cache-dir tensorflow==2.12.0
RUN pip install --no-cache-dir tensorflow-datasets==4.9.2
RUN pip install --no-cache-dir numpy==1.23.5
RUN pip install --no-cache-dir torch==2.0.1
RUN pip install --no-cache-dir torchvision==0.15.2
RUN pip install --no-cache-dir opencv-python==4.7.0.72
RUN pip install --no-cache-dir tqdm==4.65.0
RUN pip install --no-cache-dir git+https://github.com/openai/CLIP.git@a1d071733d7111c9c014f024669f959182114e33
RUN pip install --no-cache-dir Pillow==9.5.0
RUN pip install --no-cache-dir orbax-checkpoint==0.3.3
RUN pip install --no-cache-dir gin-config==0.5.0
RUN pip install --no-cache-dir pycocotools==2.0.6
RUN pip install --no-cache-dir contextlib2==21.6.0
RUN pip install --no-cache-dir ml-collections==0.1.1
RUN pip install --no-cache-dir chex==0.1.7
RUN pip install --no-cache-dir optax==0.1.5
# Dependencies already included. Use no-deps to not update numpy.
RUN pip install --no-cache-dir --no-deps flax==0.7.2
RUN pip install --no-cache-dir --no-deps clu==0.0.9
# Installing jax at the very end with GPU support.
# NOTE: Not using `no-deps` flag here because we need CUDA support.
RUN pip install --no-cache-dir jax[cuda11_cudnn86]==0.4.9 \
--find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
WORKDIR ./fvlm
ENV PYTHONPATH ./
ENTRYPOINT ["python", "train_and_eval.py"]
@@ -0,0 +1,138 @@
# This Dockerfile trains the F-VLM model on TPU.
# Here is an example to build this dockerfile:
# PROJECT="your gcp project"
# IMAGE_TAG="jax-f-vlm-train-tpu:${USER}-test"
# docker build -f model_oss/fvlm/dockerfile/jax_fvlm_train_tpu.Dockerfile . -t "${IMAGE_TAG}"
# docker tag "${IMAGE_TAG}" "gcr.io/${PROJECT}/${IMAGE_TAG}"
# docker push "gcr.io/${PROJECT}/${IMAGE_TAG}"
FROM python:3.11
# Get libtpu shared library. See go/what-is-libtpu.
RUN curl -L https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/libtpu/1.6.0/libtpu.so -o /lib/libtpu.so
ENV DEBIAN_FRONTEND=noninteractive
# Install basic libs
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
curl \
wget \
sudo \
gnupg \
libsm6 \
libxext6 \
libxrender-dev \
lsb-release \
ca-certificates \
build-essential \
git \
libgl1
# Copy Apache license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Install required libs
RUN pip install --upgrade pip
# Get F-VLM repository by using git sparse-checkout to avoid downloading entire
# google-research repository.
# Using the commit 05ece4b1c97285b48b51fa44321ccb2cb347406a on Dec 11th, 2023.
ARG COMMIT_ID=05ece4b1c97285b48b51fa44321ccb2cb347406a
RUN git clone -c \
remote.origin.fetch=+${COMMIT_ID}:refs/remotes/origin/${COMMIT_ID} \
https://github.com/google-research/google-research --no-checkout --progress \
--depth 1
WORKDIR ./google-research
RUN git sparse-checkout init --cone
RUN git sparse-checkout set fvlm
RUN git checkout ${COMMIT_ID}
# Note: The following libraries are pinned down versions of:
# https://github.com/google-research/google-research/blob/master/fvlm/requirements.txt
RUN pip install --no-cache-dir ml_dtypes==0.3.1
RUN pip install --no-cache-dir tensorstore==0.1.51
RUN pip install --no-cache-dir MarkupSafe==2.1.3
RUN pip install --no-cache-dir Pillow==9.5.0
RUN pip install --no-cache-dir PyYAML==6.0.1
RUN pip install --no-cache-dir absl_py==1.4.0
RUN pip install --no-cache-dir array_record==0.4.1
RUN pip install --no-cache-dir astunparse==1.6.3
RUN pip install --no-cache-dir cachetools==5.3.1
RUN pip install --no-cache-dir certifi==2023.7.22
RUN pip install --no-cache-dir charset_normalizer==3.3.0
RUN pip install --no-cache-dir chex==0.1.83
RUN pip install --no-cache-dir click==8.1.7
RUN pip install --no-cache-dir clip==0.2.0
RUN pip install --no-cache-dir clu==0.0.9
RUN pip install --no-cache-dir contourpy==1.1.1
RUN pip install --no-cache-dir cycler==0.12.1
RUN pip install --no-cache-dir dm_tree==0.1.8
RUN pip install --no-cache-dir etils==1.5.1
RUN pip install --no-cache-dir filelock==3.12.4
RUN pip install --no-cache-dir flatbuffers==23.5.26
RUN pip install --no-cache-dir flax==0.7.4
RUN pip install --no-cache-dir fonttools==4.43.1
RUN pip install --no-cache-dir fsspec==2023.9.2
RUN pip install --no-cache-dir ftfy==6.1.1
RUN pip install --no-cache-dir gast==0.5.4
RUN pip install --no-cache-dir gin_config==0.5.0
RUN pip install --no-cache-dir google_auth==2.23.3
RUN pip install --no-cache-dir google_auth_oauthlib==1.0.0
RUN pip install --no-cache-dir google_pasta==0.2.0
RUN pip install --no-cache-dir googleapis_common_protos==1.61.0
RUN pip install --no-cache-dir grpcio==1.59.0
RUN pip install --no-cache-dir h5py==3.10.0
RUN pip install --no-cache-dir importlib_resources==6.1.0
RUN pip install --no-cache-dir 'jax[tpu]==0.4.18' \
-f https://storage.googleapis.com/jax-releases/libtpu_releases.html
RUN pip install --no-cache-dir jaxlib==0.4.18
RUN pip install --no-cache-dir jinja2==3.1.2
RUN pip install --no-cache-dir keras==2.14.0
RUN pip install --no-cache-dir kiwisolver==1.4.5
RUN pip install --no-cache-dir libclang==16.0.6
RUN pip install --no-cache-dir markdown==3.5
RUN pip install --no-cache-dir matplotlib==3.8.0
RUN pip install --no-cache-dir mpmath==1.3.0
RUN pip install --no-cache-dir networkx==3.1
RUN pip install --no-cache-dir numpy==1.26.0
RUN pip install --no-cache-dir nvidia_cublas_cu12==12.1.3.1
RUN pip install --no-cache-dir nvidia_cuda_cupti_cu12==12.1.105
RUN pip install --no-cache-dir nvidia_cuda_nvrtc_cu12==12.1.105
RUN pip install --no-cache-dir nvidia_cuda_runtime_cu12==12.1.105
RUN pip install --no-cache-dir nvidia_cudnn_cu12==8.9.2.26
RUN pip install --no-cache-dir nvidia_cufft_cu12==11.0.2.54
RUN pip install --no-cache-dir nvidia_curand_cu12==10.3.2.106
RUN pip install --no-cache-dir nvidia_cusolver_cu12==11.4.5.107
RUN pip install --no-cache-dir nvidia_cusparse_cu12==12.1.0.106
RUN pip install --no-cache-dir nvidia_nccl_cu12==2.18.1
RUN pip install --no-cache-dir nvidia_nvjitlink_cu12==12.2.140
RUN pip install --no-cache-dir nvidia_nvtx_cu12==12.1.105
RUN pip install --no-cache-dir opencv_python==4.8.1.78
RUN pip install --no-cache-dir orbax_checkpoint==0.4.1
RUN pip install --no-cache-dir promise==2.3
RUN pip install --no-cache-dir protobuf==3.20.3
RUN pip install --no-cache-dir psutil==5.9.5
RUN pip install --no-cache-dir pyasn1==0.5.0
RUN pip install --no-cache-dir pycocotools==2.0.7
RUN pip install --no-cache-dir pygments==2.16.1
RUN pip install --no-cache-dir regex==2023.10.3
RUN pip install --no-cache-dir rich==13.6.0
RUN pip install --no-cache-dir scipy==1.11.3
RUN pip install --no-cache-dir sympy==1.12
RUN pip install --no-cache-dir tensorboard==2.14.1
RUN pip install --no-cache-dir tensorboard_data_server==0.7.1
RUN pip install --no-cache-dir tensorflow==2.14.0
RUN pip install --no-cache-dir tensorflow_datasets==4.9.3
RUN pip install --no-cache-dir torch==2.1.0
RUN pip install --no-cache-dir torchvision==0.16.0
RUN pip install --no-cache-dir urllib3==2.0.6
RUN pip install --no-cache-dir wcwidth==0.2.8
RUN pip install --no-cache-dir werkzeug==3.0.0
RUN pip install --no-cache-dir wheel==0.41.2
RUN pip install --no-cache-dir tensorflow_text==2.14.0
WORKDIR ./fvlm
ENV PYTHONPATH ./
ENTRYPOINT ["python", "train_and_eval.py"]
@@ -0,0 +1,21 @@
number_of_netty_threads=32
job_queue_size=1000
model_store=/home/model-server/model-store
workflow_store=/home/model-server/wf-store
default_response_timeout=1800
service_envelope=json
inference_address=http://0.0.0.0:7080
management_address=http://0.0.0.0:7081
metrics_address=http://0.0.0.0:7082
models={\
"imagebind_serving": {\
"1.0": {\
"defaultVersion": true,\
"marName": "imagebind_serving.mar",\
"minWorkers": 1,\
"maxWorkers": 1,\
"batchSize": 1\
}\
}\
}
@@ -0,0 +1,74 @@
# Dockerfile for the serving docker for ImageBind.
#
# To build:
# docker build -f model_oss/imagebind/dockerfile/serve.Dockerfile . -t ${YOUR_IMAGE_TAG}
#
# To push to gcr:
# docker tag ${YOUR_IMAGE_TAG} gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
# docker push gcr.io/${YOUR_PROJECT}/${YOUR_IMAGE_TAG}
FROM pytorch/torchserve:0.7.0-gpu
USER root
ENV infer_port=7080
ENV mng_port=7081
ENV model_name="imagebind_serving"
ENV PATH="/home/model-server/:${PATH}"
# Install tools.
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
curl \
wget \
vim \
git \
libgeos-dev
# Install libraries.
ENV PIP_ROOT_USER_ACTION=ignore
RUN python3 -m pip install --upgrade pip
RUN pip install absl-py==1.4.0
RUN pip install google-cloud-storage==2.7.0
# Install ImageBind and dependencies.
RUN git clone https://github.com/facebookresearch/ImageBind.git
WORKDIR ImageBind
# Pin the commit at 07/14/2023.
RUN git reset --hard 95d27c7fd5a8362f3527e176c3a80ae5a4d880c0
# Modify tokenizer file path from ImageBind repo to work with the server.
RUN sed -i '25d' imagebind/data.py
RUN sed -i '25 i\BPE_PATH = "/home/model-server/ImageBind/bpe/bpe_simple_vocab_16e6.txt.gz"' imagebind/data.py
RUN pip install .
WORKDIR /home/model-server
# Copy license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Copy model artifacts.
COPY model_oss/imagebind/handler.py /home/model-server/handler.py
COPY model_oss/imagebind/config.properties /home/model-server/config.properties
COPY model_oss/util/ /home/model-server/util/
ENV PYTHONPATH /home/model-server/
# Expose ports.
EXPOSE ${infer_port}
EXPOSE ${mng_port}
# Archive model artifacts and dependencies.
# Do not set --model-file and --serialized-file because model and checkpoint
# will be dynamically loaded in handler.py.
RUN torch-model-archiver \
--model-name=${model_name} \
--version=1.0 \
--handler=/home/model-server/handler.py \
--runtime=python3 \
--export-path=/home/model-server/model-store \
--archive-format=default \
--force
# Run Torchserve HTTP serve to respond to prediction requests.
CMD ["torchserve", "--start", \
"--ts-config", "/home/model-server/config.properties", \
"--models", "${model_name}=${model_name}.mar", \
"--model-store", "/home/model-server/model-store"]
@@ -0,0 +1,277 @@
"""Custom handler for the ImageBind model."""
import logging
import os
from typing import Any, Dict, List
from imagebind import data as data_util
from imagebind.models import imagebind_model
from imagebind.models.imagebind_model import ModalityType
from PIL import Image
import torch
from torchvision import transforms
from ts.torch_handler import base_handler
from util import constants
from util import fileutils
_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE = "video"
class ImageBindHandler(base_handler.BaseHandler):
"""Custom handler for the ImageBind model.
Attributes:
map_location: Mapping storage location.
device: Device on which to run inference.
manifest: TorchServe manifest.
task: Task for which to run the ImageBind model.
model: ImageBind model instance.
"""
def initialize(self, context: Any) -> None:
"""Initializes the ImageBind model handler.
Args:
context: TorchServe context, which contains system information and the
manifest.
Raises:
ValueError: A task that is unsupported by the handler.
"""
properties = context.system_properties
self.map_location = (
"cuda"
if torch.cuda.is_available() and properties.get("gpu_id") is not None
else "cpu"
)
self.device = torch.device(
self.map_location + ":" + str(properties.get("gpu_id"))
if torch.cuda.is_available() and properties.get("gpu_id") is not None
else self.map_location
)
self.manifest = context.manifest
self.task = os.environ.get("TASK", constants.FEATURE_EMBEDDING_GENERATION)
if self.task not in [
constants.FEATURE_EMBEDDING_GENERATION,
constants.ZERO_SHOT_CLASSIFICATION,
]:
raise ValueError(f"Invalid task: {self.task}.")
logging.info(
"Handler initializing ImageBind pretrained model for task %s.",
self.task,
)
self.model = imagebind_model.imagebind_huge(pretrained=True)
self.model.eval()
self.model.to(self.device)
logging.info("Initialized ImageBind pretrained model.")
self.initialized = True
def preprocess(self, data: Any) -> List[Dict[str, Any]]:
"""Preprocesses input data, including text, image, audio and video data.
Args:
data: Input data.
Returns:
A list of processed data samples, with each sample being a dictionary of
modality (key): input (value) pairs.
"""
logging.info("Preprocessing: %d instances received.", len(data))
preprocessed_sample_list = []
for item in data:
preprocessed_sample = {}
if ModalityType.TEXT in item:
preprocessed_sample[ModalityType.TEXT] = (
data_util.load_and_transform_text(
item[ModalityType.TEXT], self.device
)
)
for image_modality in [
ModalityType.VISION,
ModalityType.DEPTH,
ModalityType.THERMAL,
]:
if image_modality in item:
image_paths = item[image_modality]
local_image_paths = fileutils.download_gcs_file_list_to_local(
image_paths, constants.LOCAL_DATA_DIR
)
is_depth_or_thermal = image_modality in [
ModalityType.DEPTH,
ModalityType.THERMAL,
]
preprocessed_sample[image_modality] = (
self._load_and_transform_image_data(
local_image_paths,
self.device,
is_depth_or_thermal=is_depth_or_thermal,
)
)
if ModalityType.AUDIO in item:
audio_paths = item[ModalityType.AUDIO]
local_audio_paths = fileutils.download_gcs_file_list_to_local(
audio_paths, constants.LOCAL_DATA_DIR
)
preprocessed_sample[ModalityType.AUDIO] = (
data_util.load_and_transform_audio_data(
local_audio_paths, self.device
)
)
if _VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE in item:
video_paths = item[_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE]
local_video_paths = fileutils.download_gcs_file_list_to_local(
video_paths, constants.LOCAL_DATA_DIR
)
preprocessed_sample[_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE] = (
data_util.load_and_transform_video_data(
local_video_paths, self.device
)
)
if ModalityType.IMU in item:
# Input data in the IMU modality are expected in shape [B, 6, 2000].
preprocessed_sample[ModalityType.IMU] = torch.tensor(
item[ModalityType.IMU], dtype=torch.float32, device=self.device
)
if preprocessed_sample:
preprocessed_sample_list.append(preprocessed_sample)
return preprocessed_sample_list
def _load_and_transform_image_data(
self,
image_paths: List[str],
device: torch.device,
is_depth_or_thermal: bool = False,
) -> torch.Tensor:
"""Loads and transforms 3-channel images, depth images and thermal images.
Args:
image_paths: A list of image paths.
device: Device onto which to load images.
is_depth_or_thermal: Whether the images are depth or thermal images.
Returns:
A list of processed tensors corresponding to the input images.
Raises:
ValueError: The input image_paths is None.
"""
if image_paths is None:
raise ValueError("image_paths must not be None.")
image_outputs = []
for image_path in image_paths:
transforms_list = [
transforms.Resize(
224, interpolation=transforms.InterpolationMode.BICUBIC
),
transforms.CenterCrop(224),
transforms.ToTensor(),
]
if not is_depth_or_thermal:
transforms_list.append(
transforms.Normalize(
mean=(0.48145466, 0.4578275, 0.40821073),
std=(0.26862954, 0.26130258, 0.27577711),
)
)
data_transform = transforms.Compose(transforms_list)
with open(image_path, "rb") as fopen:
if is_depth_or_thermal:
image = Image.open(fopen).convert("L")
else:
image = Image.open(fopen).convert("RGB")
image = data_transform(image).to(device)
image_outputs.append(image)
return torch.stack(image_outputs, dim=0)
def inference(
self, data: List[Dict[str, Any]], *args, **kwargs
) -> List[Dict[str, Any]]:
"""Runs inference using the ImageBind model.
Args:
data: A list of processed data samples, with each sample being a
dictionary of modality (key): input (value) pairs.
*args: Additional inference args.
**kwargs: Additional inference kwargs.
Returns:
A list of model outputs, with each output being a dictionary of
modality (key): embedding (value) pairs.
"""
output_list = []
with torch.no_grad():
for inputs in data:
if _VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE in inputs:
# Allows inference on both image and video data, which both fall under
# ModalityType.VISION.
video_inputs = {
ModalityType.VISION: inputs[
_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE
]
}
video_embeddings = self.model(video_inputs)
video_embeddings[_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE] = (
video_embeddings[ModalityType.VISION]
)
del video_embeddings[ModalityType.VISION]
del inputs[_VIDEO_KEY_TO_AVOID_CONFLICT_WITH_IMAGE]
else:
video_embeddings = {}
embeddings = self.model(inputs)
embeddings.update(video_embeddings)
output_list.append(embeddings)
return output_list
def postprocess(self, output_list: List[Dict[str, Any]]) -> List[Any]:
"""Postprocesses model outputs for the task of interest.
For feature embedding generation, returns the embeddings for each modality
for each input.
For zero-shot classification, generates classification probabilities
between the inputs of a pair of modalities for all possible pairings.
Args:
output_list: A list of model outputs, with each output being a dictionary
of modality (key): embedding (value) pairs.
Returns:
A list of postprocessed model outputs for the task of interest, with each
output corresponding to an input.
Raises:
ValueError: Fewer than two modalities are provided for zero-shot
classification, or the task is not supported.
"""
preds = []
if self.task == constants.FEATURE_EMBEDDING_GENERATION:
for item in output_list:
preds.append({k: v.tolist() for k, v in item.items()})
elif self.task == constants.ZERO_SHOT_CLASSIFICATION:
for item in output_list:
modalities = list(item.keys())
if len(modalities) < 2:
raise ValueError(
"Two or more modalities are needed for task"
f" {constants.ZERO_SHOT_CLASSIFICATION}."
)
pairwise_probs = {}
for m1 in modalities:
for m2 in modalities:
if m1 == m2:
continue
probs = torch.softmax(item[m1] @ item[m2].T, dim=-1)
pairwise_probs[
f"Classify each input in {m1} (row) against inputs in"
f" {m2} (column)"
] = probs.tolist()
preds.append(pairwise_probs)
else:
raise ValueError(f"Task {self.task} is not supported by the handler.")
return preds
@@ -0,0 +1,151 @@
# This Dockerfile converts JAX vision transformer model to
# tensorflow saved model format.
# Here is an example to build this dockerfile:
# PROJECT="your gcp project"
# IMAGE_TAG="jax-vit-model-conversion:${USER}-test"
# docker build -f model_oss/jax_vision_transformer/dockerfile/jax_vit_model_conversion.Dockerfile . -t "${IMAGE_TAG}"
# docker tag "${IMAGE_TAG}" "gcr.io/${PROJECT}/${IMAGE_TAG}"
# docker push "gcr.io/${PROJECT}/${IMAGE_TAG}"
FROM tensorflow/tensorflow:2.12.0-gpu
ENV DEBIAN_FRONTEND=noninteractive
# Install basic libs
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
curl \
wget \
sudo \
gnupg \
libsm6 \
libxext6 \
libxrender-dev \
lsb-release \
ca-certificates \
build-essential \
git
# Copy Apache license.
RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/vertex-ai-samples/main/LICENSE
# Get 'vision_transformer' repository from github.
RUN git clone https://github.com/google-research/vision_transformer
# Set current directory to the downloaded 'vision_transformer' repository.
WORKDIR ./vision_transformer
# Using git reset command to pin it down to a specific version.
RUN git reset --hard e66b4732d44504251197a3da3f5949f3f3ce9ca6
# Install required libs
RUN pip install --upgrade pip
# The following pip installs are pinned down versions of those inside
# vit_jax/requirements.txt file.
# NOTE: Using `no-deps` flag to avoid overwriting of
# dependent library versions. For example,
# both `chex` and `jax` can overwrite each others
# `jax-lib` version.
RUN pip install --no-deps absl-py==1.4.0
RUN pip install --no-deps aqtp==0.0.10
RUN pip install --no-deps array-record==0.2.0
RUN pip install --no-deps astunparse==1.6.3
RUN pip install --no-deps cached-property==1.5.2
RUN pip install --no-deps cachetools==5.3.0
RUN pip install --no-deps certifi==2019.11.28
RUN pip install --no-deps chardet==3.0.4
RUN pip install --no-deps chex==0.1.7
RUN pip install --no-deps click==8.1.3
RUN pip install --no-deps cloudpickle==2.2.1
RUN pip install --no-deps clu==0.0.9
RUN pip install --no-deps contextlib2==21.6.0
RUN pip install --no-deps dacite==1.8.1
RUN pip install --no-deps dbus-python==1.2.16
RUN pip install --no-deps decorator==5.1.1
RUN pip install --no-deps dm-tree==0.1.8
RUN pip install --no-deps einops==0.6.1
RUN pip install --no-deps etils==1.3.0
RUN pip install --no-deps flatbuffers==23.3.3
RUN pip install --no-deps flax==0.6.10
RUN pip install --no-deps git+https://github.com/google/flaxformer@9adaa4467cf17703949b9f537c3566b99de1b416
RUN pip install --no-deps gast==0.4.0
RUN pip install --no-deps google-auth==2.16.2
RUN pip install --no-deps google-auth-oauthlib==0.4.6
RUN pip install --no-deps google-pasta==0.2.0
RUN pip install --no-deps googleapis-common-protos==1.59.0
RUN pip install --no-deps grpcio==1.51.3
RUN pip install --no-deps h5py==3.8.0
RUN pip install --no-deps idna==2.8
RUN pip install --no-deps importlib-metadata==6.1.0
RUN pip install --no-deps importlib-resources==5.12.0
RUN pip install --no-deps keras==2.12.0
RUN pip install --no-deps libclang==16.0.0
RUN pip install --no-deps Markdown==3.4.3
RUN pip install --no-deps markdown-it-py==2.2.0
RUN pip install --no-deps MarkupSafe==2.1.2
RUN pip install --no-deps mdurl==0.1.2
RUN pip install --no-deps ml-collections==0.1.1
RUN pip install --no-deps msgpack==1.0.5
RUN pip install --no-deps nest-asyncio==1.5.6
RUN pip install --no-deps numpy==1.23.5
RUN pip install --no-deps oauthlib==3.2.2
RUN pip install --no-deps opt-einsum==3.3.0
RUN pip install --no-deps optax==0.1.5
RUN pip install --no-deps orbax-checkpoint==0.1.6
RUN pip install --no-deps packaging==23.0
RUN pip install --no-deps pandas==2.0.1
RUN pip install --no-deps pip==23.1.2
RUN pip install --no-deps promise==2.3
RUN pip install --no-deps protobuf==4.22.1
RUN pip install --no-deps psutil==5.9.5
RUN pip install --no-deps pyasn1==0.4.8
RUN pip install --no-deps pyasn1-modules==0.2.8
RUN pip install --no-deps Pygments==2.15.1
RUN pip install --no-deps PyGObject==3.36.0
RUN pip install --no-deps python-apt==2.0.1+ubuntu0.20.4.1
RUN pip install --no-deps python-dateutil==2.8.2
RUN pip install --no-deps pytz==2023.3
RUN pip install --no-deps PyYAML==6.0
RUN pip install --no-deps requests==2.22.0
RUN pip install --no-deps requests-oauthlib==1.3.1
RUN pip install --no-deps requests-unixsocket==0.2.0
RUN pip install --no-deps rich==13.3.5
RUN pip install --no-deps rsa==4.9
RUN pip install --no-deps scipy==1.10.1
RUN pip install --no-deps setuptools==67.6.0
RUN pip install --no-deps six==1.14.0
RUN pip install --no-deps tensorboard==2.12.0
RUN pip install --no-deps tensorboard-data-server==0.7.0
RUN pip install --no-deps tensorboard-plugin-wit==1.8.1
RUN pip install --no-deps tensorflow==2.12.0
RUN pip install --no-deps tensorflow-cpu==2.12.0
RUN pip install --no-deps tensorflow-datasets==4.9.2
RUN pip install --no-deps tensorflow-estimator==2.12.0
RUN pip install --no-deps tensorflow-hub==0.13.0
RUN pip install --no-deps tensorflow-io-gcs-filesystem==0.31.0
RUN pip install --no-deps tensorflow-metadata==1.13.1
RUN pip install --no-deps tensorflow-probability==0.20.0
RUN pip install --no-deps tensorflow-text==2.12.1
RUN pip install --no-deps tensorstore==0.1.36
RUN pip install --no-deps termcolor==2.2.0
RUN pip install --no-deps toml==0.10.2
RUN pip install --no-deps toolz==0.12.0
RUN pip install --no-deps tqdm==4.65.0
RUN pip install --no-deps typing_extensions==4.5.0
RUN pip install --no-deps tzdata==2023.3
RUN pip install --no-deps urllib3==1.25.8
RUN pip install --no-deps Werkzeug==2.2.3
RUN pip install --no-deps wheel==0.40.0
RUN pip install --no-deps wrapt==1.14.1
RUN pip install --no-deps zipp==3.15.0
# Installing jax at the very end with GPU support.
# NOTE: Not using `no-deps` flag here because
# we need CUDA support.
RUN pip install jax[cuda11_cudnn82]==0.4.6 \
--find-links https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
ENV PYTHONPATH ./vit_jax
COPY ./model_oss/jax_vision_transformer/vit_jax2tf.py ./
COPY ./model_oss/jax_vision_transformer/vit_config_without_data.py vit_jax/configs/vit.py
ENTRYPOINT ["python", "vit_jax2tf.py"]

Some files were not shown because too many files have changed in this diff Show More