Struct Package¶
Defined in File deploy.h
Struct Documentation¶
-
struct Package¶
Package is a wrapper around
torch.package
which allows loading a PyTorch model and its dependencies from a package.Public Functions
-
inline ReplicatedObj loadPickle(const std::string &module, const std::string &file)¶
shorthand for getting the object as a pickle resource in the package
-
inline InterpreterSession acquireSession()¶
Allocates an
InterpreterSession
and load the appropriate torch.package with it.
-
inline ReplicatedObj createMovable(Obj obj, InterpreterSession *I)¶
Converts an
Obj
fromInterpreterSession
I
into aReplicatedObj
.
-
inline ReplicatedObj loadPickle(const std::string &module, const std::string &file)¶