Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web documentation + installation instructions #19342

Merged
merged 7 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/build/training.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions docs/get-started/with-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 13 additions & 0 deletions docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,19 @@ pod 'onnxruntime-training-objc'
</ul>
</td>
</tr>
<tr>
<td>Web</td>
<td> JavaScript, TypeScript</td>
<td><b></b>onnxruntime-web</td>
<td>
<pre>npm install onnxruntime-web</pre>
<ul>
<li>
Use either <code>import * as ort from 'onnxruntime-web/training';</code> or <code>const ort = require('onnxruntime-web/training');</code>
</li>
</ul>
</td>
</tr>
</table>

## Large Model Training
Expand Down
4 changes: 3 additions & 1 deletion docs/tutorials/on-device-training/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ has_children: true
nav_order: 11
---

# On-Device Training
# On-Device Training

* [Training on web demo](https://github.com/microsoft/onnxruntime-training-examples/tree/master/on_device_training/web)
29 changes: 18 additions & 11 deletions src/routes/getting-started/table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -812,7 +812,14 @@
"Follow build instructions from&nbsp;<a class='text-blue-500' href='https://onnxruntime.ai/docs/build/ios.html' target='_blank'>here</a>",

'ot_ios,ot_on_device,ot_cplusplus,ot_X64,ot_CPU,ot_nightly':
"Follow build instructions from&nbsp;<a class='text-blue-500' href='https://onnxruntime.ai/docs/build/ios.html' target='_blank'>here</a>"
"Follow build instructions from&nbsp;<a class='text-blue-500' href='https://onnxruntime.ai/docs/build/ios.html' target='_blank'>here</a>",

'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 = [
Expand Down Expand Up @@ -1978,7 +1985,7 @@
</div>
<div class="col-span-1 bg-success r-heading rounded p-2 text-xl">
<h3 id="ot_selectOS">Platform</h3>
<p id="ot_decriptionOS" class="sr-only">Platform list contains five items</p>
<p id="ot_decriptionOS" class="sr-only">Platform list contains six items</p>
</div>
<div
class="col-span-4 w-full r-content"
Expand All @@ -1987,7 +1994,7 @@
aria-labelledby="ot_selectOS"
aria-describedby="ot_decriptionOS"
>
<div class="grid grid-cols-5 gap-4 ot_os">
<div class="grid grid-cols-6 gap-4 ot_os">
{#each TrainingPlatforms as trainingplatform, i}
<a
class="r-option version join-item btn rounded"
Expand All @@ -2002,7 +2009,7 @@

<div class="col-span-1 bg-success r-heading rounded p-2 text-xl">
<h3 id="ot_selectLanguage">API</h3>
<p id="ot_decriptionLanguage" class="sr-only">API list contains six items</p>
<p id="ot_decriptionLanguage" class="sr-only">API list contains seven items</p>
</div>
<div
class="col-span-4 w-full r-content"
Expand All @@ -2011,7 +2018,7 @@
aria-labelledby="ot_selectLanguage"
aria-describedby="ot_decriptionLanguage"
>
<div class="grid grid-cols-6 gap-4 ot_language">
<div class="grid grid-cols-7 gap-4 ot_language">
{#each TrainingAPIs as trainingapi, i}
<a
class="r-option version join-item btn rounded"
Expand Down
Loading