Skip to content

Commit abe1a92

Browse files
Merge branch 'development' of github.com:v3io/tutorials
2 parents 9d1ced4 + 76bfedd commit abe1a92

File tree

9 files changed

+1916
-306
lines changed

9 files changed

+1916
-306
lines changed

demos/README.ipynb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,15 @@
3838
"<a id=\"image-classification-demo\"></a>\n",
3939
"## Image Classification\n",
4040
"\n",
41-
"The [**image-classification**](image-classification/01-image-classification.ipynb) demo demonstrates image recognition: the application builds and trains an ML model that identifies (recognizes) and classifies images.\n",
41+
"The [**image-classification**](image-classification/01-image-classification.ipynb) 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",
42+
"The application consists of four MLRun and Nuclio functions for performing the following operations:\n",
4243
"\n",
43-
"This example is using TensorFlow, Horovod, and Nuclio demonstrating end to end solution for image classification, \n",
44-
"it consists of 4 MLRun and Nuclio functions:\n",
44+
"1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store.\n",
45+
"2. Tag the images based on their name structure.\n",
46+
"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",
47+
"4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker).\n",
4548
"\n",
46-
"1. import an image archive from S3 to the cluster file system\n",
47-
"2. Tag the images based on their name structure \n",
48-
"3. Distrubuted training using TF, Keras and Horovod\n",
49-
"4. Automated deployment of Nuclio model serving function (form [Notebook](nuclio-serving-tf-images.ipynb) and from [Dockerfile](./inference-docker))\n",
50-
"\n",
51-
"The Example also demonstrate an [automated pipeline](mlrun_mpijob_pipe.ipynb) using MLRun and KubeFlow pipelines "
49+
"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)."
5250
]
5351
},
5452
{

demos/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ The **demos** tutorials directory contains full end-to-end use-case applications
1717
<a id="image-classification-demo"></a>
1818
## Image Classification
1919

20-
The [**image-classification**](image-classification/01-image-classification.ipynb) demo demonstrates image recognition: the application builds and trains an ML model that identifies (recognizes) and classifies images.
20+
The [**image-classification**](image-classification/01-image-classification.ipynb) 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.
21+
The application consists of four MLRun and Nuclio functions for performing the following operations:
2122

22-
This example is using TensorFlow, Horovod, and Nuclio demonstrating end to end solution for image classification,
23-
it consists of 4 MLRun and Nuclio functions:
23+
1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store.
24+
2. Tag the images based on their name structure.
25+
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.
26+
4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker).
2427

25-
1. import an image archive from S3 to the cluster file system
26-
2. Tag the images based on their name structure
27-
3. Distrubuted training using TF, Keras and Horovod
28-
4. Automated deployment of Nuclio model serving function (form [Notebook](nuclio-serving-tf-images.ipynb) and from [Dockerfile](./inference-docker))
29-
30-
The Example also demonstrate an [automated pipeline](mlrun_mpijob_pipe.ipynb) using MLRun and KubeFlow pipelines
28+
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).
3129

3230
<a id="netops-demo"></a>
3331
## Predictive Infrastructure Monitoring

demos/gpu/README.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@
2525
"- A **horovod** directory with applications that use Uber's [Horovod](https://eng.uber.com/horovod/) distributed deep-learning framework, which can be used to convert a single-GPU TensorFlow, Keras, or PyTorch model-training program to a distributed program that trains the model simultaneously over multiple GPUs.\n",
2626
" The objective is to speed up your model training with minimal changes to your existing single-GPU code and without complicating the execution.\n",
2727
" Horovod code can also run over CPUs with only minor modifications.\n",
28-
" The Horovod tutorials include the following:\n",
29-
" - Benchmark tests (**benchmark-tf.ipynb**, which executes **tf_cnn_benchmarks.py**).\n",
30-
" - Note that under the demo folder you will find an image classificaiton demo that is also running with Horovod and can be set to run with GPU <br>\n",
28+
" For more information and examples, see the [Horovod GitHub repository](https://github.com/horovod/horovod).\n",
29+
" \n",
30+
" The Horovod GPU tutorials include benchmark tests (**benchmark-tf.ipynb**, which executes **tf_cnn_benchmarks.py**).<br>\n",
31+
" In addition, the image-classification demo ([**demos/image-classification/**](../image-classification/01-image-classification.ipynb)) demonstrates how to use Horovod for image recognition, and can be configured to run over GPUs.\n",
3132
"\n",
3233
"- A **rapids** directory with applications that use NVIDIA's [RAPIDS](https://rapids.ai/) open-source libraries suite for executing end-to-end data science and analytics pipelines entirely on GPUs.\n",
34+
"\n",
3335
" The RAPIDS tutorials include the following:\n",
3436
"\n",
35-
" - Demo applications that use the [cuDF](https://rapidsai.github.io/projects/cudf/en/latest/index.html) RAPIDS GPU DataFrame library to perform batching and aggregation of data that's read from a Kafaka stream, and then write the results to a Parquet file.<br>\n",
37+
" - Demo applications that use the [cuDF](https://rapidsai.github.io/projects/cudf/en/latest/index.html) RAPIDS GPU DataFrame library to perform batching and aggregation of data that's read from a Kafka stream, and then write the results to a Parquet file.<br>\n",
3638
" The **nuclio-cudf-agg.ipynb** demo implements this by using a Nuclio serverless function while the **python-agg.ipynb** demo implements this by using a standalone Python function.\n",
3739
" - Benchmark tests that compare the performance of RAPIDS cuDF to pandas DataFrames (**benchmark-cudf-vs-pd.ipynb**)."
3840
]

demos/gpu/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ The **demos/gpu** directory includes the following:
1616
Horovod code can also run over CPUs with only minor modifications.
1717
For more information and examples, see the [Horovod GitHub repository](https://github.com/horovod/horovod).
1818

19-
The Horovod tutorials include the following:
20-
21-
- An image-recognition demo application for execution over GPUs (**image-classification**).
22-
- A slightly modified version of the GPU image-classification demo application for execution over CPUs (**cpu/image-classification**).
23-
- Benchmark tests (**benchmark-tf.ipynb**, which executes **tf_cnn_benchmarks.py**).
19+
The Horovod GPU tutorials include benchmark tests (**benchmark-tf.ipynb**, which executes **tf_cnn_benchmarks.py**).<br>
20+
In addition, the image-classification demo ([**demos/image-classification/**](../image-classification/01-image-classification.ipynb)) demonstrates how to use Horovod for image recognition, and can be configured to run over GPUs.
2421

2522
- A **rapids** directory with applications that use NVIDIA's [RAPIDS](https://rapids.ai/) open-source libraries suite for executing end-to-end data science and analytics pipelines entirely on GPUs.
2623

2724
The RAPIDS tutorials include the following:
2825

29-
- Demo applications that use the [cuDF](https://rapidsai.github.io/projects/cudf/en/latest/index.html) RAPIDS GPU DataFrame library to perform batching and aggregation of data that's read from a Kafaka stream, and then write the results to a Parquet file.<br>
26+
- Demo applications that use the [cuDF](https://rapidsai.github.io/projects/cudf/en/latest/index.html) RAPIDS GPU DataFrame library to perform batching and aggregation of data that's read from a Kafka stream, and then write the results to a Parquet file.<br>
3027
The **nuclio-cudf-agg.ipynb** demo implements this by using a Nuclio serverless function while the **python-agg.ipynb** demo implements this by using a standalone Python function.
3128
- Benchmark tests that compare the performance of RAPIDS cuDF to pandas DataFrames (**benchmark-cudf-vs-pd.ipynb**).
3229

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Image Classification Using Distributed Training\n",
8+
"\n",
9+
"- [Overview](#image-classif-demo-overview)\n",
10+
"- [Notebooks and Code](#image-classif-demo-nbs-n-code)"
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"metadata": {},
16+
"source": [
17+
"<a id=\"image-classif-demo-overview\"></a>\n",
18+
"## Overview\n",
19+
"\n",
20+
"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",
21+
"The application consists of four MLRun and Nuclio functions for performing the following operations:\n",
22+
"\n",
23+
"1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store.\n",
24+
"2. Tag the images based on their name structure.\n",
25+
"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",
26+
"4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker).\n",
27+
"\n",
28+
"<br><p align=\"center\"><img src=\"workflow.png\" width=\"600\"/></p><br>\n",
29+
"\n",
30+
"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)."
31+
]
32+
},
33+
{
34+
"cell_type": "markdown",
35+
"metadata": {},
36+
"source": [
37+
"<a id=\"image-classif-demo-nbs-n-code\"></a>\n",
38+
"## Notebooks and Code\n",
39+
"\n",
40+
"- [**01-image-classification.ipynb**](01-image-classification.ipynb) &mdash; all-in-one: import, tag, launch train, deploy, and serve\n",
41+
"- [**horovod-training.py**](horovod-training.py) &mdash; train function code\n",
42+
"- [**nuclio-serving-tf-images.ipynb**](nuclio-serving-tf-images.ipynb) &mdash; serve function development and test\n",
43+
"- [**02-create_pipeline.ipynb**](02-create_pipeline.ipynb) &mdash; auto-generate a Kubeflow pipeline workflow\n",
44+
"- **inference-docker/** &mdash; build and serve functions using a Dockerfile:\n",
45+
" - [**main.py**](./inference-docker/main.py) &mdash; function code\n",
46+
" - [**Dockerfile**](./inference-docker/Dockerfile) &mdash; a Dockerfile"
47+
]
48+
}
49+
],
50+
"metadata": {
51+
"kernelspec": {
52+
"display_name": "Python 3",
53+
"language": "python",
54+
"name": "python3"
55+
},
56+
"language_info": {
57+
"codemirror_mode": {
58+
"name": "ipython",
59+
"version": 3
60+
},
61+
"file_extension": ".py",
62+
"mimetype": "text/x-python",
63+
"name": "python",
64+
"nbconvert_exporter": "python",
65+
"pygments_lexer": "ipython3",
66+
"version": "3.6.8"
67+
}
68+
},
69+
"nbformat": 4,
70+
"nbformat_minor": 4
71+
}
Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
# Image Classification Using Distributed Training
22

3-
This example is using TensorFlow, Horovod, and Nuclio demonstrating end to end solution for image classification,
4-
it consists of 4 MLRun and Nuclio functions:
3+
- [Overview](#image-classif-demo-overview)
4+
- [Notebooks and Code](#image-classif-demo-nbs-n-code)
55

6-
1. import an image archive from S3 to the cluster file system
7-
2. Tag the images based on their name structure
8-
3. Distrubuted training using TF, Keras and Horovod
9-
4. Automated deployment of Nuclio model serving function (form [Notebook](nuclio-serving-tf-images.ipynb) and from [Dockerfile](./inference-docker))
6+
<a id="image-classif-demo-overview"></a>
7+
## Overview
108

11-
<br><p align="center"><img src="workflow.png" width="600"/></p><br>
9+
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.
10+
The application consists of four MLRun and Nuclio functions for performing the following operations:
11+
12+
1. Import an image archive from from an Amazon Simple Storage (S3) bucket to the platform's data store.
13+
2. Tag the images based on their name structure.
14+
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.
15+
4. Automatically deploy a Nuclio model-serving function from [Jupyter Notebook](nuclio-serving-tf-images.ipynb) or from a [Dockerfile](./inference-docker).
1216

13-
The Example also demonstrate an [automated pipeline](mlrun_mpijob_pipe.ipynb) using MLRun and KubeFlow pipelines
17+
<br><p align="center"><img src="workflow.png" width="600"/></p><br>
1418

15-
## Notebooks & Code
19+
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).
1620

17-
* [All-in-one: Import, tag, launch training, deploy serving](01-image-classification.ipynb)
18-
* [Training function code](horovod-training.py)
19-
* [Serving function development and testing](nuclio-serving-tf-images.ipynb)
20-
* [Auto generation of KubeFlow pipelines workflow](02-create_pipeline.ipynb)
21-
* [Building serving function using Dockerfile](./inference-docker)
22-
* [function code](./inference-docker/main.py)
23-
* [Dockerfile](./inference-docker/Dockerfile)
21+
<a id="image-classif-demo-nbs-n-code"></a>
22+
## Notebooks and Code
2423

24+
- [**01-image-classification.ipynb**](01-image-classification.ipynb) &mdash; all-in-one: import, tag, launch train, deploy, and serve
25+
- [**horovod-training.py**](horovod-training.py) &mdash; train function code
26+
- [**nuclio-serving-tf-images.ipynb**](nuclio-serving-tf-images.ipynb) &mdash; serve function development and test
27+
- [**02-create_pipeline.ipynb**](02-create_pipeline.ipynb) &mdash; auto-generate a Kubeflow pipeline workflow
28+
- **inference-docker/** &mdash; build and serve functions using a Dockerfile:
29+
- [**main.py**](./inference-docker/main.py) &mdash; function code
30+
- [**Dockerfile**](./inference-docker/Dockerfile) &mdash; a Dockerfile

0 commit comments

Comments
 (0)