From ad7d0fbc74485c6ce49bdcf74309ab35e8b8aecd Mon Sep 17 00:00:00 2001 From: Caroline Zhu Date: Wed, 31 Jan 2024 15:29:52 -0800 Subject: [PATCH] Add web documentation + installation instructions (#19342) ### Description Updated docs section with information on installation and building. Live previews of modified pages: * [Installation table](https://carzh.github.io/onnxruntime/getting-started) -- under the Optimize Training tab * [Build for training](https://carzh.github.io/onnxruntime/docs/build/training.html) * [Getting started with web](https://carzh.github.io/onnxruntime/docs/get-started/with-web.html) -- added link to E2E demo code * [Install for on-device training](https://carzh.github.io/onnxruntime/docs/install/#install-for-on-device-training) * [Tutorials page for On-device training](https://carzh.github.io/onnxruntime/docs/tutorials/on-device-training/) -- this page looks a little odd with just the link to the E2E demo. potential alternative of creating a separate page that links to the demo + mentions that a tutorial will be coming soon? ### Motivation and Context - Updating docs with information about ORT Training for Web for 1.17 release --- docs/build/training.md | 4 +++ docs/get-started/with-web.md | 1 + docs/install/index.md | 13 ++++++++++ docs/tutorials/on-device-training/index.md | 4 ++- src/routes/getting-started/table.svelte | 29 ++++++++++++++-------- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/docs/build/training.md b/docs/build/training.md index 1840a35941220..e90c283310041 100644 --- a/docs/build/training.md +++ b/docs/build/training.md @@ -49,6 +49,10 @@ redirect_from: /docs/how-to/build/training Refer to the [iOS build instructions](./ios.md) and add the ```--enable_training_apis``` build flag. + f. For web + + Refer to the [web build instructions](./web.md). + > **Note** > > - To build the C# bindings, add the ```--build_nuget``` flag to the build command above. diff --git a/docs/get-started/with-web.md b/docs/get-started/with-web.md index 5ce0d9950a833..ab757108ba9bd 100644 --- a/docs/get-started/with-web.md +++ b/docs/get-started/with-web.md @@ -18,3 +18,4 @@ ORT Web can be used in your web applications for model inferencing. * [Build from source](./../build/web.md) * [Tutorials: Deploy on web](./../tutorials/web/index.md) * [Guide: Build a web application with ONNX Runtime](./../tutorials/web/build-web-app) +* [Training on web demo](https://github.com/microsoft/onnxruntime-training-examples/tree/master/on_device_training/web) diff --git a/docs/install/index.md b/docs/install/index.md index 2ad321769a2a1..13bb63eb578df 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -406,6 +406,19 @@ pod 'onnxruntime-training-objc' + + Web + JavaScript, TypeScript + onnxruntime-web + +
npm install onnxruntime-web
+ + + ## Large Model Training diff --git a/docs/tutorials/on-device-training/index.md b/docs/tutorials/on-device-training/index.md index 20e204d13b5ff..ac38c18869f0a 100644 --- a/docs/tutorials/on-device-training/index.md +++ b/docs/tutorials/on-device-training/index.md @@ -5,4 +5,6 @@ has_children: true nav_order: 11 --- -# On-Device Training \ No newline at end of file +# On-Device Training + +* [Training on web demo](https://github.com/microsoft/onnxruntime-training-examples/tree/master/on_device_training/web) \ No newline at end of file diff --git a/src/routes/getting-started/table.svelte b/src/routes/getting-started/table.svelte index 71bb2b073f944..203b5beb1adae 100644 --- a/src/routes/getting-started/table.svelte +++ b/src/routes/getting-started/table.svelte @@ -52,12 +52,12 @@ // Training const TrainingScenarios = ['Large Model Training', 'On-Device Training']; const TrainingScenarioIds = ['ot_large_model', 'ot_on_device']; - const TrainingPlatforms = ['Linux', 'Windows', 'Mac', 'Android', 'iOS']; - const TrainingPlatformIds = ['ot_linux', 'ot_windows', 'ot_mac', 'ot_android', 'ot_ios']; - const TrainingAPIs = ['Python', 'C', 'C++', 'C#', 'Java', 'Obj-C']; - const TrainingAPIIds = ['ot_python', 'ot_c', 'ot_cplusplus', 'ot_csharp', 'ot_java', 'ot_objc']; - const TrainingVersions = ['CUDA 11.8', 'CUDA 12.2', 'ROCm', 'CPU']; - const TrainingVersionIds = ['ot_CUDA118', 'ot_CUDA122', 'ot_ROCm', 'ot_CPU']; + const TrainingPlatforms = ['Linux', 'Windows', 'Mac', 'Android', 'iOS', 'Web browser']; + const TrainingPlatformIds = ['ot_linux', 'ot_windows', 'ot_mac', 'ot_android', 'ot_ios', 'ot_web']; + const TrainingAPIs = ['Python', 'C', 'C++', 'C#', 'Java', 'Obj-C', 'JavaScript']; + const TrainingAPIIds = ['ot_python', 'ot_c', 'ot_cplusplus', 'ot_csharp', 'ot_java', 'ot_objc', 'ot_js']; + const TrainingVersions = ['CUDA 11.8', 'ROCm', 'CPU']; + const TrainingVersionIds = ['ot_CUDA118', 'ot_ROCm', 'ot_CPU']; const TrainingBuilds = ['Stable', 'Preview (Nightly)']; const TrainingBuildIds = ['ot_stable', 'ot_nightly']; const validCombos = { @@ -812,7 +812,14 @@ "Follow build instructions from here", 'ot_ios,ot_on_device,ot_cplusplus,ot_X64,ot_CPU,ot_nightly': - "Follow build instructions from here" + "Follow build instructions from here", + + 'ot_web,ot_on_device,ot_js,ot_X64,ot_CPU,ot_stable': + "npm install onnxruntime-web", + + 'ot_web,ot_on_device,ot_js,ot_X64,ot_CPU,ot_nightly': + "npm install onnxruntime-web@dev", + }; onMount(() => { var supportedOperatingSystemsNew = [ @@ -1978,7 +1985,7 @@

Platform

-

Platform list contains five items

+

Platform list contains six items

-