DeepLearningExamples
DeepLearningExamples copied to clipboard
[FastPitch1.1/pytorch] What is the problem?
Related to FastPitch1.1/pytorch
Describe the bug
the export_torchscript.py can not run well to convert trained fastpitch model into JIT.
Because there is no polyak argument for load_and_setup_model function, so I have deleted it.
When runing under python3.8, the Exception is :
export_torchscript.py: 60
torch.jit.save(torch.jit.script(model), args.output)
File "lib/python3.8/site-packages/torch/jit/_script.py", line 1318, in script
return torch.jit._recursive.create_script_class(obj)
File "lib/python3.8/site-packages/torch/jit/_recursive.py", line 417, in create_script_class
rcb = _jit_internal.craeteResolutionCallbackForClassMethods(type(obj))
File "lib/python3.8/site-packages/torch/_jit_internal.py", line 394, in createResolutionCallbackForClassMethod
captures.up99date(get_closure(fn))
File "lib/python3.8/site-packages/torch/_jit_internal.py", line 168, in get_closure
captures.update(fn.__globals__)
AttributeError 'wrapper_descriptor' object has no attribute '__globals__'
When I use python3.6, error is
File "python3.6/site-packages/torch/jit/_script.py", line 901 in script
qualified_name = _qualified_name(obj)
File "python3.6/site-packages/torch/_jit_internal.py", line 793, in _qualified_name
raise RuntimeError("Could not get name of python class object")
To Reproduce Steps to reproduce the behavior:
- Install '...'
- Set "..."
- Launch '...'
Expected behavior
A good script to save JIT fastpitch model from trained checkpoints.
Environment Please provide at least:
- Container version (e.g. pytorch:19.05-py3):
- GPUs in the system: (e.g. 8x Tesla V100-SXM2-16GB):
- CUDA driver version (e.g. 418.67):