GithubHelp home page GithubHelp logo

deep-diver / mlops-hf-tf-vision-models Goto Github PK

View Code? Open in Web Editor NEW
117.0 6.0 18.0 165 KB

MLOps for Vision Models (TensorFlow) from ๐Ÿค— Transformers with TensorFlow Extended (TFX)

License: Apache License 2.0

Jupyter Notebook 90.86% Python 9.09% Dockerfile 0.05%
computer-vision huggingface-transformers mlops tensorflow tensorflow-extended

mlops-hf-tf-vision-models's Introduction

Python TFX Hugging Face Spaces

MLOps for Vision Models (TensorFlow) from ๐Ÿค— Transformers with TensorFlow Extended (TFX)

This repository shows how to build Machine Learning pipeline for a vision model (TensorFlow) from ๐Ÿค— Transformers using the TensorFlow Ecosystem. In particular, we use TensorFlow Extended(TFX), and there are TensorFlow Data Validation(TFDV), Transform(TFT), Model Analysis(TFMA), and Serving(TF Serving) besides TensorFlow itself internally involved.

NOTE: This is a follow-up projects of "Deploying Vision Models (TensorFlow) from ๐Ÿค— Transformers" which shows how to deploy ViT model locally, on kubernetes, and on a fully managed service Vertex AI.

We will show how to build ML pipeline with TFX in a step-by-step manner:

  • Basic ( CI / Basic CD / Basic )

    • as the first step, we show how to build ML pipeline with the most basic components, which are ExampleGen, Trainer, and Pusher. These components are responsible for injecting raw dataset into the ML pipeline, training a TensorFlow model, and deploying a trained model.

  • Intermediate ( CI / Intermediate CD / Intermediate )

    • as the second step, we show how to extend the ML pipeline from the first step by adding more components, which are SchemaGen, StatisticsGen, and Transform. These components are responsible for analyzing the structures of the dataset, analyzing the statistical traits of the features in the dataset, and data pre-processing.

  • Advanced Part 1 ( CI / Advanced Part1 CD / Advanced Part1 )

    • as the third step, we show how to extend the ML pipeline from the second step by adding more components, which are Resolver and Evaluator. These components are responsible for importing existing Artifacts (such as previously trained model) and comparing the performance between two models (one from the Resolver and one from the current pipeline run).

  • Advanced Part 2 ( CI / Advanced Part2 CD / Advanced Part2 )

    • as the fourth step, we show how to extend the ML pipeline from the third step by adding one more additional component, Tuner. This component is responsible for running a set of experiments with different sets of hyperparameters with fewer epochs, and the found best hyperparameter combination will be passed to the Trainer, and Trainer will train the model longer time with that hyperparameter combinations as the starting point.

  • ๐Ÿค— Hub Integration ( CD / HF-Integration )

    • in this optional step, we show how to use custom TFX components for ๐Ÿค— Hub. In particular, we use HFModelPusher to push currently trained model to ๐Ÿค— Model Hub and HFSpacePusher to automatically deploy Gradio application to ๐Ÿค— Space Hub.

Acknowledgements

We are thankful to the ML Developer Programs team at Google that provided GCP support.

mlops-hf-tf-vision-models's People

Contributors

deep-diver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mlops-hf-tf-vision-models's Issues

advanced_part1์—์„œ model_resolver component์˜ model_blessing๊ด€๋ จ ๋ฌธ์˜์ž…๋‹ˆ๋‹ค.

์•ˆ๋…•ํ•˜์„ธ์š”
mlops๋ฅผ ํ•™์Šตํ•˜๋‹ค๊ฐ€ ์ฝ”๋“œ๋ฅผ ์ฐพ๊ฒŒ ๋˜์–ด ๊ณต๋ถ€์— ๋งŽ์€ ๋„์›€์ด ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
ํ•™์Šต ์ˆ˜์ค€๋ณ„๋กœ ์ˆœ์ฐจ์ ์œผ๋กœ local ํ™˜๊ฒฝ์—์„œ ํ…Œ์ŠคํŠธํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฌธ์˜ ์‚ฌํ•ญ์€

  1. model_blessing์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋ชจ๋ธ์ด ํ˜„์žฌ ํ›ˆ๋ จ๋œ ๋ชจ๋ธ๋ผ๋ฆฌ ๋น„๊ต๊ฐ€ ํ•˜๋Š” ๊ฒƒ ๊ฐ™์€๋ฐ ๋งž์„๊นŒ์š”??
  2. ์ด์ „์— ํ•™์Šต๋œ ๋ชจ๋ธ์„ ์–ด๋–ป๊ฒŒ model_resolver์—์„œ loadํ•˜๋Š”์ง€ ์ดํ•ด๊ฐ€ ์•ˆ๋˜์„œ์š” ํ˜น์‹œ ๋ฐฉ๋ฒ•์„ ์•Œ ์ˆ˜ ์žˆ์„๊นŒ์š”?
  3. repo ์„ค๋ช…์— ์žˆ๋Š” ๊ทธ๋ฆผ์ฒ˜๋Ÿผ test ํŒŒ์ผ์„ ์ด์šฉํ•œ ๋น„๊ต๋ฅผ ํ•  ๊ฒฝ์šฐ testํŒŒ์ผ๋งŒ ์ด์šฉํ•ด์„œ example_gen์„ ์ƒˆ๋กญ๊ฒŒ ๋งŒ๋“ค์–ด์•ผ ํ•˜๋‚˜์š”??
    ๋ฌธ์˜์ „์— ์ œ๊ณตํ•ด์ฃผ์‹  ์ฝ”๋“œ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ tensorflow document๋ฅผ ํ™•์ธํ•˜์˜€์œผ๋‚˜ ์–ด๋–ป๊ฒŒ ๋˜๋Š”์ง€ ํŒŒ์•…์ด ์–ด๋ ค์›Œ์„œ ๋ฌธ์˜๋“œ๋ฆฝ๋‹ˆ๋‹ค.

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.