-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:v3io/tutorials
- Loading branch information
Showing
9 changed files
with
1,916 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Image Classification Using Distributed Training\n", | ||
"\n", | ||
"- [Overview](#image-classif-demo-overview)\n", | ||
"- [Notebooks and Code](#image-classif-demo-nbs-n-code)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<a id=\"image-classif-demo-overview\"></a>\n", | ||
"## Overview\n", | ||
"\n", | ||
"This demo demonstrates an end-to-end solution for image recognition: the application uses TensorFlow, Keras, Horovod, and Nuclio to build and train an ML model that identifies (recognizes) and classifies images. \n", | ||
"The application consists of four MLRun and Nuclio functions for performing the following operations:\n", | ||
"\n", | ||
"1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store.\n", | ||
"2. Tag the images based on their name structure.\n", | ||
"3. Train the image-classification ML model by using [TensorFlow](https://www.tensorflow.org/) and [Keras](https://keras.io/); use [Horovod](https://eng.uber.com/horovod/) to perform distributed training over either GPUs or CPUs.\n", | ||
"4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker).\n", | ||
"\n", | ||
"<br><p align=\"center\"><img src=\"workflow.png\" width=\"600\"/></p><br>\n", | ||
"\n", | ||
"This demo also provides an example of an [automated pipeline](image-classification/02-create_pipeline.ipynb) using [MLRun](https://github.com/mlrun/mlrun) and [Kubeflow pipelines](https://github.com/kubeflow/pipelines)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<a id=\"image-classif-demo-nbs-n-code\"></a>\n", | ||
"## Notebooks and Code\n", | ||
"\n", | ||
"- [**01-image-classification.ipynb**](01-image-classification.ipynb) — all-in-one: import, tag, launch train, deploy, and serve\n", | ||
"- [**horovod-training.py**](horovod-training.py) — train function code\n", | ||
"- [**nuclio-serving-tf-images.ipynb**](nuclio-serving-tf-images.ipynb) — serve function development and test\n", | ||
"- [**02-create_pipeline.ipynb**](02-create_pipeline.ipynb) — auto-generate a Kubeflow pipeline workflow\n", | ||
"- **inference-docker/** — build and serve functions using a Dockerfile:\n", | ||
" - [**main.py**](./inference-docker/main.py) — function code\n", | ||
" - [**Dockerfile**](./inference-docker/Dockerfile) — a Dockerfile" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.6.8" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
# Image Classification Using Distributed Training | ||
|
||
This example is using TensorFlow, Horovod, and Nuclio demonstrating end to end solution for image classification, | ||
it consists of 4 MLRun and Nuclio functions: | ||
- [Overview](#image-classif-demo-overview) | ||
- [Notebooks and Code](#image-classif-demo-nbs-n-code) | ||
|
||
1. import an image archive from S3 to the cluster file system | ||
2. Tag the images based on their name structure | ||
3. Distrubuted training using TF, Keras and Horovod | ||
4. Automated deployment of Nuclio model serving function (form [Notebook](nuclio-serving-tf-images.ipynb) and from [Dockerfile](./inference-docker)) | ||
<a id="image-classif-demo-overview"></a> | ||
## Overview | ||
|
||
<br><p align="center"><img src="workflow.png" width="600"/></p><br> | ||
This demo demonstrates an end-to-end solution for image recognition: the application uses TensorFlow, Keras, Horovod, and Nuclio to build and train an ML model that identifies (recognizes) and classifies images. | ||
The application consists of four MLRun and Nuclio functions for performing the following operations: | ||
|
||
1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store. | ||
2. Tag the images based on their name structure. | ||
3. Train the image-classification ML model by using [TensorFlow](https://www.tensorflow.org/) and [Keras](https://keras.io/); use [Horovod](https://eng.uber.com/horovod/) to perform distributed training over either GPUs or CPUs. | ||
4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker). | ||
|
||
The Example also demonstrate an [automated pipeline](mlrun_mpijob_pipe.ipynb) using MLRun and KubeFlow pipelines | ||
<br><p align="center"><img src="workflow.png" width="600"/></p><br> | ||
|
||
## Notebooks & Code | ||
This demo also provides an example of an [automated pipeline](image-classification/02-create_pipeline.ipynb) using [MLRun](https://github.com/mlrun/mlrun) and [Kubeflow pipelines](https://github.com/kubeflow/pipelines). | ||
|
||
* [All-in-one: Import, tag, launch training, deploy serving](01-image-classification.ipynb) | ||
* [Training function code](horovod-training.py) | ||
* [Serving function development and testing](nuclio-serving-tf-images.ipynb) | ||
* [Auto generation of KubeFlow pipelines workflow](02-create_pipeline.ipynb) | ||
* [Building serving function using Dockerfile](./inference-docker) | ||
* [function code](./inference-docker/main.py) | ||
* [Dockerfile](./inference-docker/Dockerfile) | ||
<a id="image-classif-demo-nbs-n-code"></a> | ||
## Notebooks and Code | ||
|
||
- [**01-image-classification.ipynb**](01-image-classification.ipynb) — all-in-one: import, tag, launch train, deploy, and serve | ||
- [**horovod-training.py**](horovod-training.py) — train function code | ||
- [**nuclio-serving-tf-images.ipynb**](nuclio-serving-tf-images.ipynb) — serve function development and test | ||
- [**02-create_pipeline.ipynb**](02-create_pipeline.ipynb) — auto-generate a Kubeflow pipeline workflow | ||
- **inference-docker/** — build and serve functions using a Dockerfile: | ||
- [**main.py**](./inference-docker/main.py) — function code | ||
- [**Dockerfile**](./inference-docker/Dockerfile) — a Dockerfile |
Oops, something went wrong.