Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Tutorial 06 hangs #242

Closed
2 of 8 tasks
joyeshmishra opened this issue Apr 21, 2022 · 4 comments
Closed
2 of 8 tasks

Running Tutorial 06 hangs #242

joyeshmishra opened this issue Apr 21, 2022 · 4 comments
Assignees
Labels
1-bug Something isn't working

Comments

@joyeshmishra
Copy link
Contributor

joyeshmishra commented Apr 21, 2022

Objective of issue: Running Tutorial 06 hangs

Lava version:

  • 0.4.0 (feature release)
  • 0.3.1 (bug fixes)
  • 0.3.0 (current version)
  • 0.2.0
  • 0.1.2

I'm submitting a ...

  • 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 1881948 to replicate.

Other information:

@joyeshmishra
Copy link
Contributor Author

joyeshmishra commented Apr 22, 2022

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.

@mathisrichter
Copy link
Contributor

@joyeshmishra joyeshmishra added the 1-bug Something isn't working label Jul 20, 2022
@mgkwill
Copy link
Contributor

mgkwill commented Aug 5, 2022

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?

@joyeshmishra
Copy link
Contributor Author

Verified Tutorial 06 Works. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants