lava icon indicating copy to clipboard operation
lava copied to clipboard

Running Tutorial 06 hangs

Open joyeshmishra opened this issue 3 years ago • 3 comments

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:

joyeshmishra avatar Apr 21 '22 16:04 joyeshmishra

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.

joyeshmishra avatar Apr 22 '22 20:04 joyeshmishra

This will be fixed by https://github.com/intel-innersource/frameworks.ai.lava.lava/pull/117

mathisrichter avatar Jun 14 '22 17:06 mathisrichter

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?

mgkwill avatar Aug 05 '22 17:08 mgkwill

Verified Tutorial 06 Works. Closing.

joyeshmishra avatar Oct 06 '22 17:10 joyeshmishra