Pickle support: dig within the _rebuild_parameter calls. (#1681)

This commit is contained in:
Laurent Mazare
2024-02-08 13:09:49 +01:00
committed by GitHub
parent e5eb9602d0
commit cdc3823d8f

View File

@ -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 {