All Projects → Fematich → tftransform-demo

Fematich / tftransform-demo

Licence: other
tf.Transform example for building digital twin with Apache Beam and Tensorflow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tftransform-demo

gcp auth
Minimal authentication library for Google Cloud Platform (GCP)
Stars: ✭ 42 (-6.67%)
Mutual labels:  google-cloud-platform
awesome-bigquery-views
Useful SQL queries for Blockchain ETL datasets in BigQuery.
Stars: ✭ 325 (+622.22%)
Mutual labels:  google-cloud-platform
GoogleCloudLogging
Swift (Darwin) library for logging application events in Google Cloud.
Stars: ✭ 24 (-46.67%)
Mutual labels:  google-cloud-platform
cloud-speech-and-vision-demos
A set of demo applications that make use of google speech, nlp and vision apis based in angular2
Stars: ✭ 35 (-22.22%)
Mutual labels:  google-cloud-platform
gcpsamples
Simple "Hello world" samples for accessing Google Cloud APIs in (node,dotnet,java,golang,python)
Stars: ✭ 100 (+122.22%)
Mutual labels:  google-cloud-platform
deploy-cloudrun
This action deploys your container image to Cloud Run.
Stars: ✭ 238 (+428.89%)
Mutual labels:  google-cloud-platform
spannerz
Google Cloud Spanner Query Planner Visualizer
Stars: ✭ 60 (+33.33%)
Mutual labels:  google-cloud-platform
star-dabang
[번개장터 / 스트리미 입사] 스타벅스 어플을 모티브로 한 카페 서비스
Stars: ✭ 14 (-68.89%)
Mutual labels:  google-cloud-platform
qwiklabs challenges
Qwiklabs challenges helper guide
Stars: ✭ 76 (+68.89%)
Mutual labels:  google-cloud-platform
course-material
Course Material for in28minutes courses on Java, Spring Boot, DevOps, AWS, Google Cloud, and Azure.
Stars: ✭ 544 (+1108.89%)
Mutual labels:  google-cloud-platform
google-natural-language-php
PHP Client for Google Natural Language with Extras
Stars: ✭ 76 (+68.89%)
Mutual labels:  google-cloud-platform
augle
Auth + Google = Augle
Stars: ✭ 22 (-51.11%)
Mutual labels:  google-cloud-platform
spanner-bench
Google Cloud Spanner Query Planner Benchmarking
Stars: ✭ 24 (-46.67%)
Mutual labels:  google-cloud-platform
cloudenvoy
Cross-application messaging for Ruby and Rails using Google Cloud Pub/Sub
Stars: ✭ 31 (-31.11%)
Mutual labels:  google-cloud-platform
drf-angular-docker-tutorial
Dockerized Django Back-end API using DRF with Angular Front-end Tutorial
Stars: ✭ 53 (+17.78%)
Mutual labels:  google-cloud-platform
deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+308.89%)
Mutual labels:  google-cloud-platform
k8s-digester
Add digests to container and init container images in Kubernetes pod and pod template specs. Use either as a mutating admission webhook, or as a client-side KRM function with kpt or kustomize.
Stars: ✭ 65 (+44.44%)
Mutual labels:  google-cloud-platform
vertex-edge
A tool for training models to Vertex on Google Cloud Platform.
Stars: ✭ 24 (-46.67%)
Mutual labels:  google-cloud-platform
blockchain-etl-streaming
Streaming Ethereum and Bitcoin blockchain data to Google Pub/Sub or Postgres in Kubernetes
Stars: ✭ 57 (+26.67%)
Mutual labels:  google-cloud-platform
K8s-Cluster-Provisioner-GCP-Terrafrom
This repo will seamlessly setup self managed Kubernetes cluster in GCP using Terraform and Kubespray.
Stars: ✭ 17 (-62.22%)
Mutual labels:  google-cloud-platform

tf.Transform example for building digital twin

This repository is designed to quickly get you started with Machine Learning projects on Google Cloud Platform using tf.Transform. This code repository is linked to this Google Cloud blogpost

For more boilerplate examples, check: https://github.com/Fematich/mlengine-boilerplate

Functionalities

  • preprocessing pipeline using tf.Transform (with Apache Beam) that runs on Cloud Dataflow or locally
  • model training (with Tensorflow) that runs locally or on ML Engine
  • ready to deploy saved models to deploy on ML Engine
  • starter code to use the saved model on ML Engine

Install dependencies

Note You will need a Linux or Mac environment with Python 2.7.x to install the dependencies 1.

Install the following dependencies:

Getting started

You need to complete the following parts to run the code:

  • add trainer/secrets.py with your PROJECT_ID and BUCKET variable
  • upload data to your buckets, you can upload data/test.csv to test this code

Preprocess

You can run preprocess.py in the cloud using:

python preprocess.py --cloud
      

To iterate/test your code, you can also run it locally on a sample of the dataset:

python preprocess.py

Training Tensorflow model

You can submit a ML Engine training job with:

gcloud ml-engine jobs submit training my_job \
                --module-name trainer.task \
                --staging-bucket gs://<staging_bucket> \
                --package-path trainer

Testing it locally:

gcloud ml-engine local train --package-path trainer \
                           --module-name trainer.task

Deploy your trained model

To deploy your model to ML Engine

gcloud ml-engine models create digitaltwin
gcloud ml-engine versions create v1 --model=digitaltwin --origin=ORIGIN

To test the deployed model:

python predict.py

1: This code requires both Tensorflow and Apache Beam. Currently Tensorflow on Windows only supports Python 3.5.x and and Apache Beam doesn't support Python 3.x yet.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].