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:
Sergii Dymchenko
2022-09-01 23:55:25 +00:00
committed by PyTorch MergeBot
parent 375d6cd5b7
commit edec9698ab

View File

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