GithubHelp home page GithubHelp logo

imransalam / gcp-ai-platform-hyperparameter-tuning-tf2 Goto Github PK

View Code? Open in Web Editor NEW
5.0 6.0 1.0 22 KB

Perform Hyperparameter tuning on a small Regression problem using TensorFlow 2

Dockerfile 11.29% Python 88.71%
hyperparameter-tuning tensorflow2 tutorial gcp aiplatform

gcp-ai-platform-hyperparameter-tuning-tf2's Introduction

gcp-ai-platform-hyperparameter-tuning-tf2

Perform Hyperparameter tuning on a small Regression problem using TensorFlow 2

Run with Docker image on Vertex AI

  • Setup environment variables
export REGION=us-central1
export PROJECT_ID=$(gcloud config list project --format "value(core.project)")
export IMAGE_REPO_NAME=gcp-vertex-ai-hyperparameter-tuning-tf
export IMAGE_NAME=gcp-vertex-ai-hyperparameter-tuning-tf
export IMAGE_TAG=latest
export IMAGE_URI=$REGION-docker.pkg.dev/$PROJECT_ID/$IMAGE_REPO_NAME/$IMAGE_NAME:$IMAGE_TAG
gcloud auth configure-docker $REGION-docker.pkg.dev
  • Build Docker image
docker build -f Dockerfile -t $IMAGE_URI ./
  • Push the Docker image to GCP artifacts registry
docker push $IMAGE_URI
  • Prepare hyperparameter tuning config file

In the hptuning_config.yaml you add the parameters to optimize with your hyperparameter tuning and provide arguments to your code as hyperparameters that will be used to optimize. You can also specify the job submission details like parallel jobs to run and how many jobs to run.

  • Training with hyperparameter tuning on the Vertex AI platform from Docker image

Initialize input variables

export JOB_NAME=hyperparameter_tuning_example

Submit the jobs


gcloud ai hp-tuning-jobs create --region $REGION --config hptuning_config.yaml --project=$PROJECT_ID --display-name=$JOB_NAME

gcp-ai-platform-hyperparameter-tuning-tf2's People

Contributors

imransalam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hafsajabeen30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.