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

Improve error message for chip -> chip error signal #209

Closed
arvoelke opened this issue Mar 28, 2019 · 1 comment
Closed

Improve error message for chip -> chip error signal #209

arvoelke opened this issue Mar 28, 2019 · 1 comment
Assignees

Comments

@arvoelke
Copy link
Collaborator

@arvoelke arvoelke commented Mar 28, 2019

Related to #208.

import nengo
import nengo_loihi

with nengo.Network() as model:
    nengo_loihi.add_params(model)

    a = nengo.Ensemble(100, 1)
    b = nengo.Ensemble(100, 1)
    error = nengo.Ensemble(100, 1)
    model.config[error].on_chip = True

    conn = nengo.Connection(a, b, learning_rule_type=nengo.PES())
    nengo.Connection(error, conn.learning_rule)
    
with nengo_loihi.Simulator(model) as sim:
    pass
~/CTN/nengo-loihi/nengo_loihi/splitter.py in split(net, precompute, node_neurons, node_tau, remove_passthrough)
    147 
    148     # Commit to the moves marked in the previous steps
--> 149     networks.finalize()
    150     if precompute:
    151         if len(networks.host_pre.all_objects) == 0:

~/CTN/nengo-loihi/nengo_loihi/splitter.py in finalize(self)
     83             if not isinstance(obj, Network):
     84                 assert obj in self, (
---> 85                     "%s not moved or explicitly removed" % (obj,))
     86 
     87         # Process moves and adds

AssertionError: <Connection from <Ensemble (unlabeled) at 0x7f820ef50278> to <LearningRule modifying <Connection from <Ensemble (unlabeled) at 0x7f820ef50400> to <Ensemble (unlabeled) at 0x7f820ef502b0>> with type PES()>> not moved or explicitly removed
@arvoelke arvoelke self-assigned this Mar 28, 2019
arvoelke added a commit that referenced this issue Mar 29, 2019
Fixes #208 and #209.
hunse added a commit that referenced this issue Apr 3, 2019
Most of the work done by the splitter is now done in the builder.
This should give more clarity and control over the mapping between
pre-build and post-build objects. The `SplitterDirective` class
takes on the organizational tasks of the old `Splitter`, giving
directives to the builder about what should be on- or off-chip.

Also:
- Add unit tests for splitter refactoring.
- Raise `BuildError` if learning objects are on_chip. Fixes #208
  and #209.
- Pass no decoder cache to sub-models. Decoder cache wasn't working
  due to lack of context manager which is normally constructed by
  the top-level network build. Fixes #207.
- Various improvements to passthrough removal, including not removing
  useful passthrough nodes.
  Outstanding issues include: #210, #212, #213
- Handle sliced probes. Closes #205.
- Check that splitter handles sliced probes. Closes #206.
- Test that splitter does not mutate network. Closes #211.
hunse added a commit that referenced this issue Apr 3, 2019
Most of the work done by the splitter is now done in the builder.
This should give more clarity and control over the mapping between
pre-build and post-build objects. The `SplitterDirective` class
takes on the organizational tasks of the old `Splitter`, giving
directives to the builder about what should be on- or off-chip.

Also:
- Add unit tests for splitter refactoring.
- Raise `BuildError` if learning objects are on_chip. Fixes #208
  and #209.
- Pass no decoder cache to sub-models. Decoder cache wasn't working
  due to lack of context manager which is normally constructed by
  the top-level network build. Fixes #207.
- Various improvements to passthrough removal, including not removing
  useful passthrough nodes.
  Outstanding issues include: #210, #212, #213
- Handle sliced probes. Closes #205.
- Check that splitter handles sliced probes. Closes #206.
- Test that splitter does not mutate network. Closes #211.
hunse added a commit that referenced this issue Apr 9, 2019
Most of the work done by the splitter is now done in the builder.
This should give more clarity and control over the mapping between
pre-build and post-build objects. The `SplitterDirective` class
takes on the organizational tasks of the old `Splitter`, giving
directives to the builder about what should be on- or off-chip.

Also:
- Add unit tests for splitter refactoring.
- Raise `BuildError` if learning objects are on_chip or learning and
  `precompute` are combined. Fixes #208 and #209.
- Pass no decoder cache to sub-models. Decoder cache wasn't working
  due to lack of context manager which is normally constructed by
  the top-level network build. Fixes #207.
- Handle sliced probes. Closes #205.
- Check that splitter handles sliced probes. Closes #206.
- Test that splitter does not mutate network. Closes #211.
- Simulation is now identical whether precompute is True or False,
  on both emulator and chip. The tolerance for test_precompute is
  now zero.
tbekolay added a commit that referenced this issue Apr 15, 2019
Most of the work done by the splitter is now done in the builder.
This should give more clarity and control over the mapping between
pre-build and post-build objects. The `SplitterDirective` class
takes on the organizational tasks of the old `Splitter`, giving
directives to the builder about what should be on- or off-chip.

Also:
- Add unit tests for splitter refactoring.
- Raise `BuildError` if learning objects are on_chip or learning and
  `precompute` are combined. Fixes #208 and #209.
- Pass no decoder cache to sub-models. Decoder cache wasn't working
  due to lack of context manager which is normally constructed by
  the top-level network build. Fixes #207.
- Handle sliced probes. Closes #205.
- Check that splitter handles sliced probes. Closes #206.
- Test that splitter does not mutate network. Closes #211.
- Simulation is now identical whether precompute is True or False,
  on both emulator and chip. The tolerance for test_precompute is
  now zero.
tbekolay added a commit that referenced this issue Apr 15, 2019
tbekolay added a commit that referenced this issue Apr 15, 2019
tbekolay added a commit that referenced this issue Apr 15, 2019
tbekolay added a commit that referenced this issue Apr 15, 2019
tbekolay added a commit that referenced this issue Apr 23, 2019
tbekolay added a commit that referenced this issue Apr 23, 2019
arvoelke added a commit that referenced this issue Apr 23, 2019
tbekolay added a commit that referenced this issue Apr 24, 2019
tbekolay added a commit that referenced this issue Apr 24, 2019
tbekolay added a commit that referenced this issue Apr 24, 2019
@tbekolay
Copy link
Member

@tbekolay tbekolay commented Apr 26, 2019

Done in #202.

@tbekolay tbekolay closed this Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants