Handling of pretty-printing methods (#14378)
authorZachary DeVito <zdevito@fb.com>
Wed, 28 Nov 2018 01:08:09 +0000 (17:08 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 28 Nov 2018 01:10:23 +0000 (17:10 -0800)
commit226a01e5a18b041809a33c379710ff7326402663
tree37db901d43ebb1cd31f391c9ebeb7264f40e9de8
parent75bac5ab32e6f0ed934370830a67f76b4285ef54
Handling of pretty-printing methods (#14378)

Summary:
Stacked on #14176, review only the last commit.
* Print parameters to methods as self.weight rather than as extra inputs.
* Print entire set of methods out as a single string
* Update test code to test the module-at-a-time export/import
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14378

Differential Revision: D13198463

Pulled By: zdevito

fbshipit-source-id: 3fab02e8239cfd6f40d6ab6399047bd02cf0a8c8
test/test_jit.py
torch/csrc/jit/import_method.cpp
torch/csrc/jit/import_method.h
torch/csrc/jit/passes/python_print.cpp
torch/csrc/jit/passes/python_print.h
torch/csrc/jit/script/compiler.cpp
torch/csrc/jit/script/init.cpp
torch/csrc/jit/script/module.h