From c9b6150314d1eaee9c885be4b97da070bf3c7e4a Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Fri, 19 Apr 2024 14:52:53 +0000 Subject: [PATCH 1/4] title fix in colab --- docs/tutorials/pytorch-export.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/pytorch-export.ipynb b/docs/tutorials/pytorch-export.ipynb index 5026128a52..80f44eb00a 100644 --- a/docs/tutorials/pytorch-export.ipynb +++ b/docs/tutorials/pytorch-export.ipynb @@ -17,7 +17,7 @@ { "cell_type": "markdown", "source": [ - "# # Tutorial: Exporting StableHLO from PyTorch\n", + "# Tutorial: Exporting StableHLO from PyTorch\n", "\n", "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb) [![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb)\n", "\n", From f57b71e4ef24bf5df3a4ee8ace063e60d8584ee8 Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Fri, 19 Apr 2024 15:23:50 +0000 Subject: [PATCH 2/4] Link fixing --- docs/tutorials/jax-export.ipynb | 10 +++++++--- docs/tutorials/pytorch-export.ipynb | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/tutorials/jax-export.ipynb b/docs/tutorials/jax-export.ipynb index bee35587b3..f26b33df77 100644 --- a/docs/tutorials/jax-export.ipynb +++ b/docs/tutorials/jax-export.ipynb @@ -19,13 +19,17 @@ "source": [ "# Tutorial: Exporting StableHLO from JAX\n", "\n", - "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/tutorials/jax-export.ipynb) [![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/tutorials/jax-export.ipynb)\n", + "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)][jax-tutorial-colab]\n", + "[![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)][jax-tutorial-kaggle]\n", "\n", "## Tutorial Setup\n", "\n", "### Install required dependencies\n", "\n", - "We'll be using `jax` and `jaxlib` (JAX's XLA package), along with `flax` and `transformers` for some models to export." + "We'll be using `jax` and `jaxlib` (JAX's XLA package), along with `flax` and `transformers` for some models to export.\n", + "\n", + "[jax-tutorial-colab]: https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/examples/jax-export.ipynb\n", + "[jax-tutorial-kaggle]: https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/examples/jax-export.ipynb" ], "metadata": { "id": "_TuAgGNKt5HO" @@ -308,7 +312,7 @@ "\n", "It is common to want to export a StableHLO model to SavedModel for interop with existing compilation pipelines, existing TF tooling, or serving via [TF Serving](https://github.com/tensorflow/serving).\n", "\n", - "It is easy to pack StableHLO into a SavedModel, and load that SavedModel in the future. For this section we'll be using our dynamic model from the previous section." + "JAX makes it easy to pack StableHLO into a SavedModel, and load that SavedModel in the future. For this section we'll be using our dynamic model from the previous section." ], "metadata": { "id": "xFU5M6Xm1U8_" diff --git a/docs/tutorials/pytorch-export.ipynb b/docs/tutorials/pytorch-export.ipynb index 80f44eb00a..8de116c9e7 100644 --- a/docs/tutorials/pytorch-export.ipynb +++ b/docs/tutorials/pytorch-export.ipynb @@ -19,7 +19,8 @@ "source": [ "# Tutorial: Exporting StableHLO from PyTorch\n", "\n", - "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb) [![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb)\n", + "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)][pytorch-tutorial-colab] [![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)][pytorch-tutorial-kaggle]\n", + "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)]() ", "\n", "_Intro to the [`torch_xla.stablehlo`](https://github.com/pytorch/xla/blob/main/docs/stablehlo.md) module._\n", "\n", @@ -27,7 +28,10 @@ "\n", "### Install required dependencies\n", "\n", - "We'll be using `torch` and `torchvision` to get a `resnet18` model, and `torch_xla` to export to StableHLO." + "We'll be using `torch` and `torchvision` to get a `resnet18` model, and `torch_xla` to export to StableHLO.", + "\n", + "[pytorch-tutorial-colab]: https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb\n", + "[pytorch-tutorial-kaggle]: https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb" ], "metadata": { "id": "42_6VTj7l_xS" From 1ce3b76c5c074ea2df34c4b5a66c24e8a1fd8f9e Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Fri, 19 Apr 2024 15:43:29 +0000 Subject: [PATCH 3/4] link fix --- docs/tutorials/pytorch-export.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/pytorch-export.ipynb b/docs/tutorials/pytorch-export.ipynb index 8de116c9e7..3013973e27 100644 --- a/docs/tutorials/pytorch-export.ipynb +++ b/docs/tutorials/pytorch-export.ipynb @@ -28,7 +28,7 @@ "\n", "### Install required dependencies\n", "\n", - "We'll be using `torch` and `torchvision` to get a `resnet18` model, and `torch_xla` to export to StableHLO.", + "We'll be using `torch` and `torchvision` to get a `resnet18` model, and `torch_xla` to export to StableHLO.\n", "\n", "[pytorch-tutorial-colab]: https://colab.research.google.com/github/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb\n", "[pytorch-tutorial-kaggle]: https://kaggle.com/kernels/welcome?src=https://github.com/openxla/stablehlo/blob/main/docs/tutorials/pytorch-export.ipynb" From 45869a5b61123a7c21a0e32f40a91ed3e075b52e Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Fri, 19 Apr 2024 15:44:33 +0000 Subject: [PATCH 4/4] remove extra link --- docs/tutorials/pytorch-export.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/pytorch-export.ipynb b/docs/tutorials/pytorch-export.ipynb index 3013973e27..d2a4412977 100644 --- a/docs/tutorials/pytorch-export.ipynb +++ b/docs/tutorials/pytorch-export.ipynb @@ -19,8 +19,8 @@ "source": [ "# Tutorial: Exporting StableHLO from PyTorch\n", "\n", - "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)][pytorch-tutorial-colab] [![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)][pytorch-tutorial-kaggle]\n", - "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)]() ", + "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)][pytorch-tutorial-colab]\n", + "[![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)][pytorch-tutorial-kaggle]\n", "\n", "_Intro to the [`torch_xla.stablehlo`](https://github.com/pytorch/xla/blob/main/docs/stablehlo.md) module._\n", "\n",