mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
15 lines
432 B
Rust
15 lines
432 B
Rust
/// Regression test for pth files not loading on Windows.
|
|
#[test]
|
|
fn test_pth() {
|
|
let tensors = candle_core::pickle::PthTensors::new("tests/test.pt", None).unwrap();
|
|
tensors.get("test").unwrap().unwrap();
|
|
}
|
|
|
|
#[test]
|
|
fn test_pth_with_key() {
|
|
let tensors =
|
|
candle_core::pickle::PthTensors::new("tests/test_with_key.pt", Some("model_state_dict"))
|
|
.unwrap();
|
|
tensors.get("test").unwrap().unwrap();
|
|
}
|