Running Tutorial 06 hangs
Objective of issue: Running Tutorial 06 hangs
Lava version:
- [ ] 0.4.0 (feature release)
- [ ] 0.3.1 (bug fixes)
- [x] 0.3.0 (current version)
- [ ] 0.2.0
- [ ] 0.1.2
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] documentation request
Current behavior:
- Hangs
Expected behavior:
- Should complete
Steps to reproduce:
- Just run the tutorial
Related code:
Tutorial 06 Hangs due to unhandled dangling port. Please check out commit 18819486590e97c6573b1e57fbcd58e15e55b657 to replicate.
Other information:
In builder.py::PyProcessBuilder
if issubclass(port_cls, PyInPort):
transformer = VirtualPortTransformer(
self._csp_port_map[name],
p.transform_funcs
) if p.transform_funcs else IdentityTransformer()
port_cls = ty.cast(ty.Type[PyInPort], lt.cls)
port = port_cls(csp_ports, pm, p.shape, lt.d_type, transformer)
Here, if the layer is simple, then we create an IdentityTransformer for the dangling unconnected port. If the layer is part of a hierarchical sub model, then the transform_funcs is not None and hence the code fails in self._csp_port_map[name] as there was no CSP port associated with this dangling unconnected PyInPort.
Proposal - Should check if transform_funcs exist, if so and if name does not exist in csp_port_map, log a warning that it is possibly a dangling port and return the same IdentityTransformer(). Make this in CProcessBuilder as well.
This will be fixed by https://github.com/intel-innersource/frameworks.ai.lava.lava/pull/117
This will be fixed by intel-innersource/frameworks.ai.lava.lava#117
I'm guessing this is fixed and can be closed now that the PR is merged?
Verified Tutorial 06 Works. Closing.