Skip to content

Commit

Permalink
docs: switch rustdoc links back to docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Oct 18, 2024
1 parent b1996eb commit ab13822
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ↗",
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/fundamentals/value.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/migrating/v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ let l = outputs["latents"].try_extract_tensor::<f32>()?;
```

## 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
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/perf/execution-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/setup/cargo-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ab13822

Please sign in to comment.