* feat: Add sample for Vertex distributed training
* refactor: Move distributed training to community content and add job config
* fix: Address review comments and update files
* minor fixes in the script
* updated codeowners
- `get_deployment_pod_name` now extract the app selector to query the pods
- remove dependency to service, using instead pod port instead
- adds a `POD_PORT` as template variable to allow to pass the port from the UI
PiperOrigin-RevId: 771205143
* upgraded spark on ray on vertex ai notebook to 2.42.0 version
* upgraded spark on ray on vertex ai notebook to 2.42.0 version
* upgraded spark on ray on vertex ai notebook to 2.42.0 version
* upgraded spark on ray on vertex ai notebook to 2.42.0 version
* refactor: Use raw string in regex
* np.NaN was removed in the NumPy 2.0
* Move default python version to 3.10
* Move back default python version to 3.9
* Remove version mistmatched tes notebooks
The current version was causing a the below error when executing on xgboost_training component on vertex.
```
numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
```
Updating the pandas version as shown [here](https://github.com/numpy/numpy/issues/26710) resolved the issue
* fix: Update model path of model_monitoring_for_custom_model_online_prediction.ipynb
Update the unavailable model path for model_monitoring_for_custom_model_online_prediction.ipynb
* Update model_monitoring_for_custom_model_online_prediction.ipynb
Update the bq dataset uri
* Upload pipeline job example
* Upload pipeline example which can combine other pipeline examples.
* Upload xgbranker predictor example
This example uses aiplatform and xgboost to provide a xgbranker predictor.
* feat: adding support for Mistral Large 24.11 part2
* feat: adding support for Mistral Large 24.11 part2
---------
Co-authored-by: denisj3030 <denisj@google.com>
* feat: NVIDIA NIM on Vertex Ai walkthrough
* fix: PR comments resolved
* fix: PR comments resolved#2
* fix: excep handling
* fix: handle if model not uploaded
* feat: mistral ai sdk support fro vertexai
* feat: mistral ai sdk support fro vertexai, token fix
* feat: mistral ai sdk support fro vertexai, excep handling
Updated branding/name of Vertex AI Workbench, added "Overview" heading.
Why? Not having an "Overview" heading prevents this notebook from getting picked up in our notebook list output.
* 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
* added command to install JDK
* Update fraud-detection-model.ipynb
update url to avoid redirect.
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
Co-authored-by: Ravi Dalal <ravidalal@google.com>
* 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
* added command to install JDK
* Update predictive_maintenance_usecase.ipynb
updated URL to avoid redirect
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
Co-authored-by: Ravi Dalal <ravidalal@google.com>
* 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
* added command to install JDK
* Update sdk-hyperparameter-tuning.ipynb
update url to avoid redirect. Made other edits, as well.
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
Co-authored-by: Ravi Dalal <ravidalal@google.com>
* 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
* added command to install JDK
* Update training-multi-class-classification-model-for-ads-targeting-usecase.ipynb
update url to avoid redirect
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
Co-authored-by: Ravi Dalal <ravidalal@google.com>
* chore, refactor: edits made according to the template
* chore: lint run
* fix: remove ray version
* fix: made dataset url to http to deal with job failure error
* chore: lint run
* chore: fixes markdown as per guide
* chore: lint
* chore, fix: adds testing code and also fix the error
* chore, fix: clear outputs adds retries and adds http dataset path in testing
* chore: review comment addressed
* chore: lint run
* refactor: removes IS_TESTING flag
* chore, fix: Removes IS_TESTING, fixes packages installations, runs end to end
* chore: lint run
* chore,refactor(egen): hardcoded the version of tensorflow, added comments in the cleanup code, modified cleanup code, changed region variable name to location, replaced uuid with _unique and removed the code of uuid generation, refactored code according to template guidelines and performed linter test.
* fix(egen): added code for copying from one bucket to other for importing datset
* chore(egen): modified the markdowns of copying data between google cloud storage buckets step and performed linter test.
* chore(egen): Added gcsfs package in the installation step and performed linter test.
* fix(egen): defined the model display name variable and performed the linter test.
* chore(egen): Done changes according to @kittyabs review and performed linter test.
---------
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
* Add learning_rate_multiplier and output_dimensionality to embedding tuning notebook.
* Reformat
* Add parameter descriptions to text embedding tuning sample Colab.
* Run formatter
* 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 spark_on_ray_on_vertex_ai.ipynb
Edited link text and added another link to relevant documentation
* added command to install JDK
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
Co-authored-by: Ravi Dalal <ravidalal@google.com>
* chore, refactor: refactors and edits according to the template.
* chore: lint
* chore: update objective and other verbiage
* chore: edits title of the notebook
* 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 tensorboard_profiler_custom_training.ipynb
Added reference to "Vertex AI TensorBoard" so the notebook will show up in the Notebook Tutorials page when filtering for Vertex AI TensorBoard.
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
* 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 tensorboard_profiler_custom_training_with_prebuilt_container.ipynb
Added reference to "Vertex AI TensorBoard" so the notebook will show up in the Notebook Tutorials page when filtering for Vertex AI TensorBoard.
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
* chore, refactor: removes boiler plate, adds colab enterprise, changes region to location
* refactor: adds testing code and variables
* chore: adds test code and runs end to end
* chore: end to end test and remove testing code
* chore: lint test
* chore: rectify parameter explanation
* fix: adds code and relevant markdown to copy dataset to the project's bucket for dealing with access issue
* chore: removes code font for Dataset
* chore: lint
* chore: address review comments
* adds gcfs to the installation
* fix, refactor, chore: follows new template, replaces K80 with T4, replace docker steps with cloud build, reorganize the sections, heading corrections
* chore: remove will and contracts 'do not'
* fix: replace K80 with T4
* feat: adds step to remove the training folder in the cleaning up section
* fix, chore: adds worker-pool-specs back in the pipeline as a global var, adds comments
* feat: adds a cleaning up step for artifact registry
* fix, chore: addresses the review comments, removes the mention of experimental feature in the markdown, replaces TPU_V3 with TPU_V2(not found error)
* chore: addresses review comments
* fix, chore, refactor: updates tensorflow version to 2.13, updates TPU driver libs, elaborates some steps, refactors the pipeline creation and run step to parameterize the arguments instead of using global vars
---------
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
* <refactor, chore> updates gcr to artifact registry, package version upgrades, updates prebuilt docker container image to 2.13, refactores notebook according to the template
* <refactor, chore> updates gcr to artifact registry, package version upgrades, updates prebuilt docker container image to 2.13, refactores notebook according to the template
* updated pip install statements
* Colab enterprise link fix
* Colab enterprise link fix
* Colab enterprise link fix
* markdown edits
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* chore: remove boiler plate, add colab enterprise, and format according to the template
* chore, refactor: test end to end
* chore: lint test
* chore, fix: removes force protobuf for package compatibility issue and removes testing variable reference
* fix: changes import statement for execution
* adds protobuf in install to deal with build error
* fix: changes protobuf installation version
* chore: lint run
* Adds tensorflow in install, other fixes from template
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* Adapted notebook with new notebook template
* Added variable value which is used in further steps
* Added required permissions for service account
* chore, refactor: Follows new template, removes future tense, restricted links, refactors the cleaning up section
* feat: adds '-m' while deleting the cloud storage bucket
* chore: addresses the review comments
* chore: removes version mention for bison models and adds references to model versions and supported rlhf models
---------
Co-authored-by: nileshspringml <nilesh.mahajan@egen.ai>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
* chore: adds Colab Enterprise link
* fix, refactor, chore: Fixes the docker container image creation steps and predictions step, refactors the code to skip unnecessary steps and markdown text correction and simplification
* fix, chore: fixes typos in serving script, markdown text corrections, adds custom folder removal step in the cleanup section
* fix: adds --project for Colab steps and replaces the docker build and docker push with gcloud builds submit command for Colab
---------
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
* feat: Add Slack and Jira source file imports and Endpoint resource embedding model configuration for corpus creation
* docs: Link reference to deploying 3P models to endpoint
* fix: update linting
Updates objectives to eliminate nested bullets (those didn't get rendered in our docs) and removes some bolding that wasn't rendering properly in our docs
* chore: reformats the copyright and run buttons. adds colab enterprise
* chore: reorders and formats markdown sections and removes boilerplate
* chore: remove boilerplate and reformats based on template
* chore,refactor: adds colab enterprise and refactors the cells according to template
* fix: rectifies issue with testing
* chore,refactor(egen): Changed REGION variable name to LOCATION, defined two variables to get the pipelines names to be used in cleanup section, added cleanup code for deletion of pipelines and models, replaced uuid with unique,removed os.getenv(IS_TESTING) from the cleanup section, refactored code according to the template guidelines and performed linter test.
* fix(egen): changed the version of google-cloud-pipeline-components and performed linter test.
* chore(egen): changed the version of google cloud pipeline components package in installation step and performed linter test.
* fix(egen): changed the model-evaluation parameter to model-evaluation-2 in get_evaluation_metrics function and performed linter test.
* fix(egen): modified the code in get_feature_attributions helper function and performed linter test.
* fix(egen): modified code in cleanup section to delete pipeline jobs and performed linter test.
* fix(egen): renamed model-upload-2 to model-upload in cleanup code of automl tabular architecture pipeline and performed linter test.
* chore(egen): changed the colab enterprise link by renaming automml to automl in link and performed linter test.
---------
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
* chore: adds colab enterprise, removes boilerplate and edits according to template
* chore: run end to end notebook
* chore, refactor: formats, runs end to end
* chore: lint
* chore: addresses comments and changes headers according to guidelines
* chore:review comments addressed
* chore: addresses review comments
* chore: lint run pass
* refactor, chore(egen): Removes boilerplate, heading fixes, and other corrections from template
* Updated minor template related issue
* Change variable name from REGION to LOCATION
* removed unated variable
* Made variable values more redable
* Removed unwated commentes from header
* fix, chore: replaces test sample file with eval sample file, adds comments to the cleaning up section
* fix: replaces text-bison@001 with tex-bison@002, reverts the post-tuning data sample to test sample
---------
Co-authored-by: Krishna Chaithanya Movva <krishna.movva@springml.com>
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
* <refactor, chore> data is copied to project's own bucket for importing into the dataset, added gcfs library, other corrections from template
* <refactor, chore> data is copied to project's own bucket for importing into the dataset, added gcfs library, other corrections from template
* markdown edits
* markdown edits
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* Upload torch transformers predictor sample
This sample uses the aiplatform SDK and torch library to implement transformers predictor.
* Linear regression predictor using sklearn
Upload a linear regression predictor sample using scikit-learn lib.
* <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
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* 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 distillation.ipynb
update url to point to /vertex-ai/generative-ai/docs
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
* fix, refactor, chore(egen): adds matplotlib library in installation step, adds code to delete locally generated files, refactors code as per new template guidelines, contraction of words, performs linter test
* fix, refactor, chore(egen): adds matplotlib library in installation step, adds code to delete locally generated files, refactors code as per new template guidelines, contraction of words, performs linter test
* Adds deprecation note for user managed instances
* chore, feat, refactor: Remove future tense, follows new notebook template, adds cleanup step for deleting the pipelines and models created, refactors the utility functions to fetch model resource
* fix: corrects the notebook name in the links
* chore: addresses review comments
* fix: loads the model from resource name before deletion
---------
Co-authored-by: krishr2d2 <krishna.movva@egen.ai>
* chore: adds the colab enterprise and formates all open in tabs
* chore: changes 'Run in colab' to 'Open in Colab'
* chore: splits content of first cell for formatting
* refactor: fixes pip install and rectifies disable_early_stopping parameter description
* fix: image dataset csv is changed because of permission issue when importing from the content of the csv
* chore: running end to end notebook
* chore: removes testing variables and lints
* chore: markdown edits and end to end test
* chore: lint changes
* refactor: adds try except block following all the other cell codes
* chore, refactor: removes boilerplate, adds colab enterprise and makes changes according to template and authoring guide
* chore: lint
* fix: adds dataset copying code to fix data access issue
* chore: lint
* fix: adds gcsfs package to deal with the check error
* chore: clears outputs
* <refactor, chore> xgboost package version set to 1.7.1, updates serving continer image to 1.7, deletes intermediate files, other fixes from template
* <refactor, chore> xgboost package version set to 1.7.1, updates serving continer image to 1.7, deletes intermediate files, other fixes from template
* <refactor, chore> xgboost package version set to 1.7.1, updates serving continer image to 1.7, deletes intermediate files, other fixes from template
* Colab logo fix
* Colab logo fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* refactor,chore(egen): refactored code as per template guidelines
* refactor,chore(egen): fix region variable
* refactor(egen): refactored notebook as per template guielines
* refactor,chore(egen): performed linter test
---------
Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
* 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 tune_peft.ipynb
“fix: update links in notebook”
* Update tune_peft.ipynb
add colab enterprise link
* Update tune_peft.ipynb
removed link
* Update tune_peft.ipynb
updated the link to /generative-ai/docs/tune_peft.ipynb and other edits
* fix: linter errors
---------
Co-authored-by: Katie Nguyen <21978337+katiemn@users.noreply.github.com>
* <fix, refactor> fixed and refactored notebook according to the template
* Apply suggested edits from @kittyabs
* Apply suggested edits from @kittyabs
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* <refactore, chore>refactored notebook according to the template
* refactor: Apply markdown text edit
* source distribution fix
* source distribution fix
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* feat: Mistral AI colab notebook; new examples for Code Gen (FIM), Function calling
* feat: Mistral AI colab notebook; new examples for Code Gen (FIM), Function calling, Value error fix
* feat: Mistral AI colab notebook; Additional examples minor updates / fixes
* feat: Mistral AI colab notebook;
* feat: Mistral AI colab notebook; Chat completion*s* fix
* <Refactor, Chore> Refactored the notebook according to the template, updated and added new package.
* numpy version conflict
* Added numpy.
---------
Co-authored-by: UBhavani <bhavani.ummadi@egen.ai>
* fix,chore,refactor(egen): Changed REGION variable name to LOCATION, modified the import file of flowers dataset, added comments in cleanup section, removed os.getenv(IS_TESTING) from the cleanup section, refactored code according to template guidelines and performed linter test.
* chore(egen): Done changes according to @kittylabs and performed linter test.
---------
Co-authored-by: sriramya2610 <sriramya.peddapally@egen.ai>
* chore, refactor: adds colab enterprise, removes boiler plate, refactors according to template
* chore: run end to end and lint
* chore: addresses reviw comments
* <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
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* <refactor>: refactored code according to notebook template
* <refactor> refactored notebook according to template
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
* refactor,chore(egen) : refactored code according to template guidelines and removed unused imports
* refactor(egen) : removed hardcoded values
* refactor(egen) : performed linter test
* refcator(egen) : refcatored according to template guidelines
* refactor,chore(egen): refactored code as per guidelines
* refactor,chore(egen): refactored code as per guidelines
---------
Co-authored-by: Jayakrishna2801 <jayakrishna.rajaboina@egen.ai>
* <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
* Colab enterprise link fix
* Colab enterprise link fix
---------
Co-authored-by: SumanthKasula99 <sumanth.kasula@egen.ai>
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.
* 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>
* <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>
* refactor, chore(egen): replaces region with location, adds additional parameters in dataset_delete() function inside cleanup cell
* wording changes
* wording and case change
* 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>
* 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
* 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]
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* <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>
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.
* 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
* <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>
* 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)
* 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>
* chore, refactor: adds colab enterprise, remove boiler plate
* refactor: changes REGION to LOCATION
* chore: run end to end and remove testing variable
* chore: lint
* [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.
* 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>
* 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>
* 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
* 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>
* 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
* 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>
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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
* <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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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
* 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>
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.
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 &&\
RUN pip install --no-cache-dir -r requirements.txt
ENTRYPOINT["python","-m","task"]
# Stage 2: Runtime Environment
FROMpytorch/pytorch:1.8.1-cuda11.1-cudnn8-runtime
# Install Google Cloud SDK
RUN apt-get update &&\
apt-get install -y curl gnupg &&\
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 &&\
# Vertex AI Training: Llama 3.1 8B pre-training using Nvidia A3 Mega VMs (H100)
This document provides a step-by-step guide for pre-training a Llama 3.1 8B model on the `en-wiki` dataset using multiple [Vertex AI Custom Training](https://cloud.google.com/vertex-ai/docs/training/overview) `a3-megagpu-8g` nodes.
We will use a custom container based on NVIDIA's [NeMo Framework](https://docs.nvidia.com/nemo-framework/user-guide/24.07/overview.html) to demonstrate a scalable, multi-node training workflow. All required artifacts and commands are included.
## 1. Prerequisites
### 1.1. Google Cloud Project setup
- **Enable APIs:** Ensure the Vertex AI API is [enabled for your project](http://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).
- **H100 Mega Quota:** A3 Mega VMs are powered by H100 GPUs. Request quota for `custom_model_training_nvidia_h100_mega_gpus` in one of the [supported regions](https://cloud.google.com/vertex-ai/docs/general/locations#accelerator_support). If using Spot VMs, request `custom_model_training_preemptible_nvidia_h100_mega_gpus` quota instead.
- **Reservations (Optional but recommended):** For guaranteed capacity, [create a reservation](https://cloud.google.com/compute/docs/instances/reservations-shared) and ensure the reservation is shared with the Vertex AI service account. This guide requires a minimum of **16 H100 GPUs** (2 full A3 Mega nodes).
### 1.2. GCS bucket
Create a [Cloud Storage bucket](https://cloud.google.com/storage/docs/creating-buckets) in the same region where you have quota. If you're using Hierarchical Namespace for your bucket, you may need to update permissions of the Vertex AI Custom Code Service Agent .
This bucket is used for:
- Staging the training application.
- Storing model checkpoints and logs.
- Storing data if you use your own data.
## 2. Setup & configuration
### 2.1. Clone the repo
First clone the repo into your development environment.
## 3. Build and push a docker container image to Artifact Registry
Normally, you can use any custom training container on Vertex AI Training. In this example you build a NeMo Docker image that is based on the [Nvidia’s NeMo 24.09](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nemo/tags) image. Use Cloud Build to build and push the container image.
This document picked NeMo as the demonstrating container since it’s a widely adopted GPU LLM training framework providing high performance and versatile training functionalities.
In addition to the base image, some customizations are included to form the final prebuilt image:
- Some dependencies are installed to integrate with Vertex AI Training.
- An entrypoint script that sets up required environments and calls the training job.
- Some patches are applied to the NeMo code to let it load the dataset from a GCS bucket.
Run this command to build the container and push the container into the Google Artifact Registry.
# Makes tensor parallelism more memory efficient for LLMs (20B+) by parallelizing layer norms and dropout sequentially
# See Reducing Activation Recomputation in Large Transformer Models: https://arxiv.org/abs/2205.05198 for more details.
sequence_parallel:false
fsdp:false
fsdp_cpu_offload:true
fsdp_sharding_strategy:"full"# Method to shard model states. Available options are 'full', 'hybrid', and 'grad'.
fsdp_grad_reduce_dtype:"16"# Gradient reduction data type.
fsdp_sharded_checkpoint:false# Store and load FSDP shared checkpoint.
fsdp_use_orig_params:false# Set to True to use FSDP for specific peft scheme.
# Distributed checkpoint setup
dist_ckpt_format:"torch_dist"# Set to 'torch_dist' to use PyTorch distributed checkpoint format.
dist_ckpt_load_on_device:true# whether to load checkpoint weights directly on GPU or to CPU
dist_ckpt_parallel_save:true# if true, each worker will write its own part of the dist checkpoint
dist_ckpt_parallel_save_within_dp:false# if true, save will be parallelized only within a DP group (whole world otherwise), which might slightly reduce the save overhead
dist_ckpt_parallel_load:false# if true, each worker will load part of the dist checkpoint and exchange with NCCL. Might use some extra GPU memory
dist_ckpt_torch_dist_multiproc:2# number of extra processes per rank used during ckpt save with PyTorch distributed format
dist_ckpt_assume_constant_structure:false# set to True only if the state dict structure doesn't change within a single job. Allows caching some computation across checkpoint saves.
dist_ckpt_parallel_dist_opt:true# parallel save/load of a DistributedOptimizer. 'True' allows performant save and reshardable checkpoints. Set to 'False' only in order to minimize the number of checkpoint files.
dist_ckpt_load_strictness:null# defines checkpoint keys mismatch behavior (only during dist-ckpt load). Choices: assume_ok_unexpected (default - try loading without any check), log_all (log mismatches), raise_all (raise mismatches)
openai_gelu:false# Use OpenAI's GELU instead of the default GeLU
normalize_attention_scores:true# Whether to scale the output Q * K^T by 1 / sqrt(hidden_size_per_head). This arg is provided as a configuration option mostly for compatibility with models that have been weight-converted from HF. You almost always want to se this to True.
position_embedding_type:'rope'# Position embedding type. Options ['learned_absolute', 'rope']
rotary_percentage:1.0# If using position_embedding_type=rope, then the per head dim is multiplied by this.
fp8_amax_history_len:1024# Number of steps for which amax history is recorded per tensor
fp8_amax_compute_algo:'max'# 'most_recent' or 'max'. Algorithm for computing amax from history
ub_tp_comm_overlap:false# do not turn on because of b/397797926
use_flash_attention:true
gc_interval:100
## Offloading Activations/Weights to CPU
cpu_offloading:false
cpu_offloading_num_layers:${sum:${.num_layers},-1} # This value should be between [1,num_layers-1] as we don't want to offload the final layer's activations and expose any offloading duration for the final layer
cpu_offloading_activations:true
cpu_offloading_weights:true
data:
# Path to data must be specified by the user.
# Supports List, String and Dictionary
# List : can override from the CLI: "model.data.data_prefix=[.5,/raid/data/pile/my-gpt3_00_text_document,.5,/raid/data/pile/my-gpt3_01_text_document]",
# Or see example below:
# data_prefix:
# - .5
# - /raid/data/pile/my-gpt3_00_text_document
# - .5
# - /raid/data/pile/my-gpt3_01_text_document
# Dictionary: can override from CLI "model.data.data_prefix"={"train":[1.0, /path/to/data], "validation":/path/to/data, "test":/path/to/test}
index_mapping_dir:null# path to save index mapping .npy files, by default will save in the same location as data_prefix
data_impl:mmap
splits_string:900,50,50
seq_length:${model.encoder_seq_length}
skip_warmup:true
num_workers:2
dataloader_type:single # cyclic
reset_position_ids:false# Reset position ids after end-of-document token
reset_attention_mask:false# Reset attention mask after end-of-document token
eod_mask_loss:false# Mask loss for the end of document tokens
validation_drop_last:true# Set to false if the last partial validation samples is to be consumed
no_seqlen_plus_one_input_tokens:false# Set to True to disable fetching (sequence length + 1) input tokens, instead get (sequence length) input tokens and mask the last token
pad_samples_to_global_batch_size:false# Set to True if you want to pad the last partial batch with -1's to equal global batch size
shuffle_documents:true# Set to False to disable documents shuffling. Sample index will still be shuffled
# Nsys profiling options
nsys_profile:
enabled:false
start_step:0# Global batch to start profiling
end_step:1# Global batch to end profiling
ranks:[0]# Global rank IDs to profile
gen_shape:false# Generate model and kernel details including input shapes
memory_profile:
enabled:false
start_step:0
end_step:1
ranks:[0]
output_path:/data # Must be a dir
optim:
name:distributed_fused_adam # E.g., fused_adam or set _target_: torch.optim.AdamW field
The input column is specified with the flag `--instruct_column_in_dataset`. Used
for instruction dataset. This field is mutually exclusive with `chat_template`.
**instruction_separator**: A unique string used to indicate the start of the
instructions. If not specified, every token after response_separator will be
treated as a response, and every token before the first response_separator will
be treated as instruction.
**response_separator**: A unique string used to indicate the start of the
response. This field is required if `--completion_only` flag is set to `True`.
## Example templates
- See the list of all supported templates [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/community-content/vertex_model_garden/model_oss/peft/train/vmg/templates).
- For an example with `chat_template` see the JSON template below.
"prompt_input": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n",
"prompt_no_input": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:\n",
"prompt_input":"Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n",
"prompt_no_input":"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:\n",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.