mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix ScripModule typo (#84444)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84444 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
375d6cd5b7
commit
edec9698ab
@ -56,7 +56,7 @@ RRefForkData fromPyTuple(const py::tuple& pyTuple) {
|
||||
TypePtr tryInferTypeWithTypeHint(
|
||||
const py::object& value,
|
||||
const py::object& type_hint) {
|
||||
// If the py::object to be contained by the RRef is a ScripModule, we enforce
|
||||
// If the py::object to be contained by the RRef is a ScriptModule, we enforce
|
||||
// users to specify its ModuleInterface type.
|
||||
if (auto module = jit::as_module(value)) {
|
||||
TORCH_CHECK(
|
||||
@ -101,7 +101,7 @@ TypePtr tryInferTypeWithTypeHint(
|
||||
}
|
||||
|
||||
// NB: `jit::tryToInferType(..)` infers types including ScriptClass, but
|
||||
// excluding ScripModule.
|
||||
// excluding ScriptModule.
|
||||
jit::InferredType type_inferred = jit::tryToInferType(value);
|
||||
if (type_inferred.success()) {
|
||||
// If we could infer the type from the pyobject, we create
|
||||
|
Reference in New Issue
Block a user