From 165ba5c16234bbc0e14ea2a0c9e62f7d31b0e661 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Wed, 12 Jun 2024 14:05:19 -0700 Subject: [PATCH] [docs] Fix model path in IR getting started (#1604) Fixes https://github.com/microsoft/onnxscript/issues/1600 by using a relative path. Validated with sphinx. --- .../intermediate_representation/getting_started.ipynb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/intermediate_representation/getting_started.ipynb b/docs/intermediate_representation/getting_started.ipynb index 83e3dc7e1..b69be897b 100644 --- a/docs/intermediate_representation/getting_started.ipynb +++ b/docs/intermediate_representation/getting_started.ipynb @@ -18,19 +18,12 @@ "metadata": {}, "outputs": [], "source": [ - "import pathlib\n", - "\n", "import onnx\n", "\n", "from onnxscript import ir\n", "\n", "# Load the model as onnx.ModelProto\n", - "model_proto = onnx.load(\n", - " pathlib.Path(ir.__file__).parent.parent.parent\n", - " / \"testdata\"\n", - " / \"dort_models\"\n", - " / \"llama_forward.onnx\"\n", - ")\n", + "model_proto = onnx.load(\"../../testdata/dort_models/llama_forward.onnx\")\n", "\n", "# Create an IR object from the model\n", "model = ir.serde.deserialize_model(model_proto)" @@ -1479,7 +1472,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.11.9" } }, "nbformat": 4,