Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Error with Hierarchical intent and slot filling sample #1311

Open
deepali-c opened this issue Apr 9, 2020 · 0 comments
Open

Error with Hierarchical intent and slot filling sample #1311

deepali-c opened this issue Apr 9, 2020 · 0 comments

Comments

@deepali-c
Copy link

deepali-c commented Apr 9, 2020

Steps to reproduce

  1. Execute the Hierarchical intent and slot filling sample with smaller dataset with PyTorch v1.4.0 and Pytext v0.3.1

Observed Results

Observed the following error:

=== Saving model to: <mydir>/pytext/model.pt
Saving pytorch model to: <mydir>/pytext/model.pt
Exporting metrics
Tracer cannot infer type of (tensor([[ 2,  3,  4,  5,  6,  7,  8,  9, 10,  7, 11]]), tensor([11]), None, [[0, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 3]], None)
:Cannot infer type of a None value (toTraceableIValue at <mypytorchwork>/torch/csrc/jit/pybind_utils.h:286)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xbc (0x7fff38247b9c in 
...
...
Error occurs, No graph saved
WARNING: Unable to export neural network graph to TensorBoard.
Traceback (most recent call last):
  File "<myenv>/lib/python3.6/site-packages/pytext/metric_reporters/channel.py", line 312, in export
    self.summary_writer.add_graph(model, input_to_model, **kwargs)
  File "<myenv>/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 682, in add_graph
    self._get_file_writer().add_graph(graph(model, input_to_model, verbose))
  File "<myenv>/lib/python3.6/site-packages/torch/utils/tensorboard/_pytorch_graph.py", line 239, in graph
    raise e
  File "<myenv>/lib/python3.6/site-packages/torch/utils/tensorboard/_pytorch_graph.py", line 234, in graph
    trace = torch.jit.trace(model, args)
  File "<myenv>/lib/python3.6/site-packages/torch/jit/__init__.py", line 858, in trace
    check_tolerance, _force_outplace, _module_class)
  File "<myenv>/lib/python3.6/site-packages/torch/jit/__init__.py", line 997, in trace_module
    module._c._create_method_from_trace(method_name, func, example_inputs, var_lookup_fn, _force_outplace)
RuntimeError: Tracer cannot infer type of (tensor([[ 2,  3,  4,  5,  6,  7,  8,  9, 10,  7, 11]]), tensor([11]), None, [[0, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 4, 1, 3, 1, 5, 1, 3, 3]], None)
:Cannot infer type of a None value (toTraceableIValue at <mypytorchwork/torch/csrc/jit/pybind_utils.h:286)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xbc (0x7fff38247b9c in 

Expected Results

The sample should sucessfully run.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant