diff --git a/README.md b/README.md index 75f1ba56..b8e4695a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## 📖 Documentation - [Guide](https://ort.pyke.io/) -- [API reference](https://ort.pyke.io/rustdoc/ort/) +- [API reference](https://docs.rs/ort/2.0.0-rc.7/ort/) - [Examples](https://github.com/pykeio/ort/tree/main/examples) - [Migrating from v1.x to v2.0](https://ort.pyke.io/migrating/v2) diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json index 5cc642d2..92305d12 100644 --- a/docs/pages/_meta.json +++ b/docs/pages/_meta.json @@ -10,7 +10,7 @@ }, "link-api": { "title": "API Reference ↗", - "href": "https://ort.pyke.io/rustdoc/ort/" + "href": "https://docs.rs/ort/2.0.0-rc.7/ort/" }, "link-crates": { "title": "Crates.io ↗", diff --git a/docs/pages/fundamentals/value.mdx b/docs/pages/fundamentals/value.mdx index 1f4812e6..3fd42189 100644 --- a/docs/pages/fundamentals/value.mdx +++ b/docs/pages/fundamentals/value.mdx @@ -11,7 +11,7 @@ For ONNX Runtime, a **value** represents any type that can be given to/returned In order to actually use the data in these containers, you can use the `.try_extract_*` methods. `try_extract_tensor(_mut)` extracts an `ndarray::ArrayView(Mut)` from the value if it is a tensor. `try_extract_sequence` returns a `Vec` of values, and `try_extract_map` returns a `HashMap`. -Sessions in `ort` return a map of `DynValue`s. You can determine a value's type via its `.dtype()` method. You can also use fallible methods to extract data from this value - for example, [`DynValue::try_extract_tensor`](https://ort.pyke.io/rustdoc/ort/type.DynValue.html#method.try_extract_tensor), which fails if the value is not a tensor. Often times though, you'll want to reuse the same value which you are certain is a tensor - in which case, you can **downcast** the value. +Sessions in `ort` return a map of `DynValue`s. You can determine a value's type via its `.dtype()` method. You can also use fallible methods to extract data from this value - for example, [`DynValue::try_extract_tensor`](https://docs.rs/ort/2.0.0-rc.7/ort/type.DynValue.html#method.try_extract_tensor), which fails if the value is not a tensor. Often times though, you'll want to reuse the same value which you are certain is a tensor - in which case, you can **downcast** the value. ## Downcasting **Downcasting** means to convert a `Dyn` type like `DynValue` to stronger type like `DynTensor`. Downcasting can be performed using the `.downcast()` function on `DynValue`: diff --git a/docs/pages/migrating/v2.mdx b/docs/pages/migrating/v2.mdx index 7baed098..3456d6bf 100644 --- a/docs/pages/migrating/v2.mdx +++ b/docs/pages/migrating/v2.mdx @@ -173,7 +173,7 @@ let l = outputs["latents"].try_extract_tensor::()?; ``` ## Execution providers -Execution provider structs with public fields have been replaced with builder pattern structs. See the [API reference](https://ort.pyke.io/rustdoc/ort/index.html?search=ExecutionProvider) and the [execution providers reference](/perf/execution-providers) for more information. +Execution provider structs with public fields have been replaced with builder pattern structs. See the [API reference](https://docs.rs/ort/2.0.0-rc.7/ort/index.html?search=ExecutionProvider) and the [execution providers reference](/perf/execution-providers) for more information. ```diff -// v1.x diff --git a/docs/pages/perf/execution-providers.mdx b/docs/pages/perf/execution-providers.mdx index b4070579..847d59d2 100644 --- a/docs/pages/perf/execution-providers.mdx +++ b/docs/pages/perf/execution-providers.mdx @@ -86,7 +86,7 @@ fn main() -> anyhow::Result<()> { ``` ## Configuring EPs -EPs have configuration options to control behavior or increase performance. Each `XXXExecutionProvider` struct returns a builder with configuration methods. See the [API reference](https://ort.pyke.io/rustdoc/ort/index.html?search=ExecutionProvider) for the EP structs for more information on which options are supported and what they do. +EPs have configuration options to control behavior or increase performance. Each `XXXExecutionProvider` struct returns a builder with configuration methods. See the [API reference](https://docs.rs/ort/2.0.0-rc.7/ort/index.html?search=ExecutionProvider) for the EP structs for more information on which options are supported and what they do. ```rust use ort::{CoreMLExecutionProvider, Session}; diff --git a/docs/pages/setup/cargo-features.mdx b/docs/pages/setup/cargo-features.mdx index d13679e8..68aba849 100644 --- a/docs/pages/setup/cargo-features.mdx +++ b/docs/pages/setup/cargo-features.mdx @@ -9,7 +9,7 @@ title: Cargo features - ✅ **`half`**: Enables support for float16 & bfloat16 tensors via the [`half`](https://crates.io/crates/half) crate. ONNX models that are converted to 16-bit precision will typically convert to/from 32-bit floats at the input/output, so you will likely never actually need to interact with a 16-bit tensor on the Rust side. Though, `half` isn't a heavy enough crate to worry about it affecting compile times. - ✅ **`copy-dylibs`**: In case dynamic libraries are used (like with the CUDA execution provider), creates a symlink to them in the relevant places in the `target` folder to make [compile-time dynamic linking](/setup/linking#compile-time-dynamic-linking) work. - ⚒️ **`load-dynamic`**: Enables [runtime dynamic linking](/setup/linking#runtime-loading-with-load-dynamic), which alleviates many of the troubles with compile-time dynamic linking and offers greater flexibility. -- ⚒️ **`fetch-models`**: Enables the [`SessionBuilder::commit_from_url`](https://ort.pyke.io/rustdoc/ort/struct.SessionBuilder.html#method.commit_from_url) method, allowing you to quickly download & run a model from a URL. This should only be used for quick testing. +- ⚒️ **`fetch-models`**: Enables the [`SessionBuilder::commit_from_url`](https://docs.rs/ort/2.0.0-rc.7/ort/struct.SessionBuilder.html#method.commit_from_url) method, allowing you to quickly download & run a model from a URL. This should only be used for quick testing. ## Execution providers Each [execution provider](/perf/execution-providers) is also gated behind a Cargo feature.