| Crates.io | amfiteatr_rl |
| lib.rs | amfiteatr_rl |
| version | 0.11.0 |
| created_at | 2024-01-15 18:14:09.782972+00 |
| updated_at | 2025-06-06 13:39:14.183208+00 |
| description | Extensions providing reinforcement learning implementations for `amfiteatr` |
| homepage | |
| repository | https://github.com/moroviintaas/amfiteatr |
| max_upload_size | |
| id | 1100577 |
| size | 321,320 |
Framework library for reinforcement learning using data model from amfi crate.
Crate contains traits and generic implementation.
This crate depends on tch
which requires that you have Torch installed.
Use guide provided by that crate.
For me the procedure looks like this:
torchlib for C++/Java;
You will get structure like this:/path/to/libtorch
| -- bin
| -- include
| -- lib
| ...
export LIBTORCH=/path/to/torch
export LD_LIBRARY_PATH=/path/to/libtorch/lib
This crate tries to support CUDA backed tensor operations.
It might be necessary to add following code in build.rs script in your crate:
fn main() {
let os = std::env::var("CARGO_CFG_TARGET_OS").expect("Unable to get TARGET_OS");
match os.as_str() {
"linux" | "windows" => {
if let Some(lib_path) = std::env::var_os("DEP_TCH_LIBTORCH_LIB") {
println!("cargo:rustc-link-arg=-Wl,-rpath={}", lib_path.to_string_lossy());
}
println!("cargo:rustc-link-arg=-Wl,--no-as-needed");
println!("cargo:rustc-link-arg=-Wl,--copy-dt-needed-entries");
println!("cargo:rustc-link-arg=-ltorch");
}
_ => {}
}
}
It solved CUDA backend problem for me link to source.
Examples are presented in separate crate - amfiteatr_examples