I updated Cargo.toml to 0.14 and all the examples are working.
For this Win64 install, a bump of torch-sys and tch were required for me.
cargo run --example --example conversation
Updating crates.io index
Downloaded torch-sys v0.14.0
Downloaded tch v0.14.0
Downloaded 2 crates (1.7 MB) in 0.97s (largest was `tch` at 1.4 MB)
Compiling torch-sys v0.14.0
Compiling tch v0.14.0
Compiling rust-bert v0.21.0 (C:\working\rust\rust-bert)
warning: call to `.borrow()` on a reference in this situation does nothing
--> src\models\mbart\mbart_model.rs:453:43
|
453 | let base_model = MBartModel::new(p.borrow() / "model", config);
| ^^^^^^^^^ help: remove this redundant call
|
= note: the type `tch::nn::Path<'_>` does not implement `Borrow`, so calling `borrow` on `&tch::nn::Path<'_>` copies the reference, which does not do anything and can be removed
= note: `#[warn(noop_method_call)]` on by default
warning: `rust-bert` (lib) generated 1 warning (run `cargo fix --lib -p rust-bert` to apply 1 suggestion)
Finished dev [unoptimized + debuginfo] target(s) in 1m 12s
Running `target\debug\examples\conversation.exe`
I was not having success with rust-bert. I tried downloading tch-rs and all the examples worked.
rust-bert was giving me the following
fatal error C1189: #error: You need C++17 to compile PyTorch
I updated Cargo.toml to 0.14 and all the examples are working. For this Win64 install, a bump of torch-sys and tch were required for me.
thanks for the code.