From 2617126fe3e32488cabe3d1cd16e46431e883ff4 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Thu, 12 Oct 2023 14:10:25 -0700 Subject: [PATCH] Rename Colab notebooks to highlight frameworks used. (#15162) Also adjusted descriptions. skip-ci: pure rename / comment changes --- .../docs/guides/ml-frameworks/tensorflow.md | 8 ++++---- samples/colab/README.md | 14 +++++++------- ...ction.ipynb => tensorflow_edge_detection.ipynb} | 2 +- ...ining.ipynb => tensorflow_mnist_training.ipynb} | 2 +- .../{resnet.ipynb => tensorflow_resnet.ipynb} | 2 +- samples/models/mnist.mlir | 2 +- tests/e2e/models/edge_detection.mlir | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) rename samples/colab/{edge_detection.ipynb => tensorflow_edge_detection.ipynb} (99%) rename samples/colab/{mnist_training.ipynb => tensorflow_mnist_training.ipynb} (99%) rename samples/colab/{resnet.ipynb => tensorflow_resnet.ipynb} (99%) diff --git a/docs/website/docs/guides/ml-frameworks/tensorflow.md b/docs/website/docs/guides/ml-frameworks/tensorflow.md index 2e487200efc9..1e8753fad885 100644 --- a/docs/website/docs/guides/ml-frameworks/tensorflow.md +++ b/docs/website/docs/guides/ml-frameworks/tensorflow.md @@ -146,10 +146,10 @@ supported targets by following one of the | Colab notebooks | | | -- | -- | -Training an MNIST digits classifier | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/mnist_training.ipynb) -Edge detection module | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/edge_detection.ipynb) -Pretrained ResNet50 inference | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/resnet.ipynb) -TensorFlow Hub Import | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_hub_import.ipynb) +Training an MNIST digits classifier | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_mnist_training.ipynb) +Edge detection | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_edge_detection.ipynb) +Pretrained ResNet50 inference | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_resnet.ipynb) +TensorFlow Hub import | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_hub_import.ipynb) End-to-end execution tests can be found in IREE's [integrations/tensorflow/e2e/](https://github.com/openxla/iree/tree/main/integrations/tensorflow/e2e) diff --git a/samples/colab/README.md b/samples/colab/README.md index 4c986169d30b..4a855e9df76e 100644 --- a/samples/colab/README.md +++ b/samples/colab/README.md @@ -7,13 +7,13 @@ applications using IREE's Python bindings and ML framework integrations. Framework | Notebook file | Description | Link -------- | ------------- | ----------- | ---- -Generic | [low_level_invoke_function\.ipynb](low_level_invoke_function.ipynb) | Shows off some concepts of the low level IREE python bindings | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/low_level_invoke_function.ipynb) -PyTorch | [pytorch_jit\.ipynb](pytorch_jit.ipynb) | Uses [SHARK-Turbine](https://github.com/nod-ai/SHARK-Turbine) for eager execution in a PyTorch session | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/pytorch_jit.ipynb) -TensorFlow | [edge_detection\.ipynb](edge_detection.ipynb) |Performs image edge detection using TF and IREE | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/edge_detection.ipynb) -TensorFlow | [mnist_training\.ipynb](mnist_training.ipynb) | Compile, train, and execute a neural network with IREE | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/mnist_training.ipynb) -TensorFlow | [resnet\.ipynb](resnet.ipynb) | Loads a pretrained [ResNet50](https://www.tensorflow.org/api_docs/python/tf/keras/applications/ResNet50) model and runs it using IREE | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/resnet.ipynb) -TensorFlow | [tensorflow_hub_import\.ipynb](tensorflow_hub_import.ipynb) | Runs a pretrained [MobileNet V2](https://tfhub.dev/google/tf2-preview/mobilenet_v2/classification) model using IREE | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_hub_import.ipynb) -TFLite | [tflite_text_classification\.ipynb](tflite_text_classification.ipynb) | Runs a pretrained [text classification](https://www.tensorflow.org/lite/examples/text_classification/overview) model using IREE | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tflite_text_classification.ipynb) +Generic | [low_level_invoke_function](low_level_invoke_function.ipynb) | Shows low level IREE python binding concepts | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/low_level_invoke_function.ipynb) +PyTorch | [pytorch_jit](pytorch_jit.ipynb) | Uses [SHARK-Turbine](https://github.com/nod-ai/SHARK-Turbine) for eager execution in a PyTorch session | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/pytorch_jit.ipynb) +TensorFlow | [tensorflow_edge_detection](tensorflow_edge_detection.ipynb) |Performs image edge detection | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_edge_detection.ipynb) +TensorFlow | [tensorflow_hub_import](tensorflow_hub_import.ipynb) | Imports a [MobileNet V2](https://tfhub.dev/google/tf2-preview/mobilenet_v2/classification) model from [TensorFlow Hub](https://tfhub.dev/) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_hub_import.ipynb) +TensorFlow | [tensorflow_mnist_training](tensorflow_mnist_training.ipynb) | Compiles, trains, and executes a neural network | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_mnist_training.ipynb) +TensorFlow | [tensorflow_resnet](tensorflow_resnet.ipynb) | Compiles and runs a pretrained [ResNet50](https://www.tensorflow.org/api_docs/python/tf/keras/applications/ResNet50) model | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tensorflow_resnet.ipynb) +TFLite | [tflite_text_classification](tflite_text_classification.ipynb) | Compiles and runs a pretrained [text classification](https://www.tensorflow.org/lite/examples/text_classification/overview) model | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/iree/blob/main/samples/colab/tflite_text_classification.ipynb) ## Working with GitHub diff --git a/samples/colab/edge_detection.ipynb b/samples/colab/tensorflow_edge_detection.ipynb similarity index 99% rename from samples/colab/edge_detection.ipynb rename to samples/colab/tensorflow_edge_detection.ipynb index 17f8e983f112..7c76acc1a92c 100644 --- a/samples/colab/edge_detection.ipynb +++ b/samples/colab/tensorflow_edge_detection.ipynb @@ -3,7 +3,7 @@ "nbformat_minor": 0, "metadata": { "colab": { - "name": "edge_detection.ipynb", + "name": "tensorflow_edge_detection.ipynb", "provenance": [], "collapsed_sections": [ "FH3IRpYTta2v" diff --git a/samples/colab/mnist_training.ipynb b/samples/colab/tensorflow_mnist_training.ipynb similarity index 99% rename from samples/colab/mnist_training.ipynb rename to samples/colab/tensorflow_mnist_training.ipynb index f7d3fab65c9c..de2ef3e619d9 100644 --- a/samples/colab/mnist_training.ipynb +++ b/samples/colab/tensorflow_mnist_training.ipynb @@ -3,7 +3,7 @@ "nbformat_minor": 0, "metadata": { "colab": { - "name": "mnist_training.ipynb", + "name": "tensorflow_mnist_training.ipynb", "provenance": [] }, "kernelspec": { diff --git a/samples/colab/resnet.ipynb b/samples/colab/tensorflow_resnet.ipynb similarity index 99% rename from samples/colab/resnet.ipynb rename to samples/colab/tensorflow_resnet.ipynb index fe7e1dcc35c6..da8d6c107430 100644 --- a/samples/colab/resnet.ipynb +++ b/samples/colab/tensorflow_resnet.ipynb @@ -3,7 +3,7 @@ "nbformat_minor": 0, "metadata": { "colab": { - "name": "resnet.ipynb", + "name": "tensorflow_resnet.ipynb", "provenance": [], "collapsed_sections": [ "FH3IRpYTta2v" diff --git a/samples/models/mnist.mlir b/samples/models/mnist.mlir index 98a2190a868f..6d01a02c33f9 100644 --- a/samples/models/mnist.mlir +++ b/samples/models/mnist.mlir @@ -1,5 +1,5 @@ // Trained MNIST model generated by -// https://github.com/openxla/iree/blob/main/samples/colab/mnist_training.ipynb. +// https://github.com/openxla/iree/blob/main/samples/colab/tensorflow_mnist_training.ipynb. // // Model structure is from tf.keras: // diff --git a/tests/e2e/models/edge_detection.mlir b/tests/e2e/models/edge_detection.mlir index 862b26bea1b0..59726ba2e0d5 100644 --- a/tests/e2e/models/edge_detection.mlir +++ b/tests/e2e/models/edge_detection.mlir @@ -4,7 +4,7 @@ // RUN: [[ $IREE_METAL_DISABLE == 1 ]] || (iree-run-mlir --Xcompiler,iree-input-type=stablehlo --Xcompiler,iree-hal-target-backends=metal-spirv %s --input=1x128x128x1xf32 | FileCheck %s) // Image edge detection module generated by. -// https://github.com/openxla/iree/blob/main/samples/colab/edge_detection.ipynb. +// https://github.com/openxla/iree/blob/main/samples/colab/tensorflow_edge_detection.ipynb. // // Input : a single 128x128 pixel image as a tensor<1x128x128x1xf32>, with pixels in [0.0, 1.0] // Output: a single image in the same format after running edge detection