mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 11:56:45 +00:00
Pickle support: dig within the _rebuild_parameter calls. (#1681)
This commit is contained in:
@ -217,6 +217,13 @@ impl Object {
|
||||
let args = args.remove(1);
|
||||
(callable, args)
|
||||
}
|
||||
Object::Class {
|
||||
module_name,
|
||||
class_name,
|
||||
} if module_name == "torch._utils" && class_name == "_rebuild_parameter" => {
|
||||
let mut args = args.tuple()?;
|
||||
args.remove(0).reduce()?
|
||||
}
|
||||
_ => (callable, args),
|
||||
};
|
||||
match callable {
|
||||
|
Reference in New Issue
Block a user