profile
viewpoint
Sreerag M Sreerag-ibtl @Vembala @InteraktionAB Kerala, India https://sreerag-ibtl.github.io/ A cunning arrangement of particles and a curious case of evolution. https://gitlab.com/sreeragibtl

Sreerag-ibtl/addons 0

Useful extra functionality for TensorFlow 2.x maintained by SIG-addons

Sreerag-ibtl/annotated_research_papers 0

This repo contains all the research papers annotated using Notability app

Sreerag-ibtl/Arduino 0

open-source electronics platform

Sreerag-ibtl/examples 0

Examples and demos built with Jina that help you onboarding

Sreerag-ibtl/hand_tracking 0

Disclaimer: I'm not the author. Please refer to the repositories listed in README for more information.

Sreerag-ibtl/jax 0

Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more

Sreerag-ibtl/jina 0

An easier way to build neural search in the cloud

Sreerag-ibtl/keras-io 0

Keras documentation, hosted live at keras.io

Sreerag-ibtl/larq 0

An Open-Source Library for Training Binarized Neural Networks

pull request commentnengo/nengo

Drop support for Python 3.5

Just the one question above, other than that fixups all look good.

drasmuss

comment created time in 8 hours

Pull request review commentnengo/nengo

Drop support for Python 3.5

 travis_yml:  ci_scripts:   - template: static+    codespell_ignore_words:+      - nin+      - nIn

I think we don't need to ignore these words any more right, after the changes here (or in the deterministic-plan PR)?

drasmuss

comment created time in 8 hours

push eventnengo/nengo

NengoBones

commit sha 8990297e88e3a9db5f892e687e858bedee7404e0

Last update at 2020-11-26 18:32:05

view details

push time in 10 hours

push eventnengo/nengo

Daniel Rasmussen

commit sha f93f91818b0f0a0ffc4cf9f55b555037c26d1d18

Update for codespell 2.0

view details

Daniel Rasmussen

commit sha 03a31b5d778f8d7f3d7de628a616a37d2b41ddd1

Ensure op graph order is deterministic

view details

push time in 11 hours

delete branch nengo/nengo

delete branch : deterministic-plan

delete time in 11 hours

PR merged nengo/nengo

Ensure op graph order is deterministic

Motivation and context: <!--- Why is this change required? What problem does it solve? --> <!--- If it addresses an open issue, please link to the issue here. -->

Rebuilding the same network multiple times could produce a different op order each time (as long as all those orders respected the constraints of the topological sort). While this doesn't have any functional impact on the model, it can be problematic for backends that are more sensitive to op order (e.g., NengoDL, where the order of operators can impact the layout of signals in memory).

This changes all the usages of set/frozenset in the builder to OrderedSet/FrozenOrderedSet (analogous to OrderedDict, these are sets that preserve their insertion order).

Interactions with other PRs: <!--- If this change depends on or conflicts with another PR please list it here. --> <!--- If this PR contains commits from another PR, describe what commits in this PR are unique. --> <!--- If this PR is independent, then remove this section. -->

https://github.com/nengo/nengo-dl/pull/187 depends on this PR

How has this been tested? <!--- Please describe in detail how you tested your changes. --> <!--- Reviewers will test your PR in at least this way. -->

See new tests in test_builder.py and test_graphs.py.

How long should this take to review? <!--- Please estimate if this PR is a quick, average, or lengthy PR. --> <!--- Take into account both the size and complexity of the changes. --> <!--- Also note if this is a timely PR that should be reviewed by a certain date. --> <!--- Leave only the line that applies below: -->

  • Quick (less than 40 lines changed or changes are straightforward)

Types of changes: <!--- What types of changes does your code introduce? --> <!--- Leave all lines that apply below: -->

  • Bug fix (non-breaking change which fixes an issue)

Checklist: <!--- Go over all the following points. Put an x in all the boxes that apply. --> <!--- If a box is not applicable, please justify below the checklist. --> <!--- If you're unsure about any of these, don't hesitate to ask. --> <!--- We're here to help! -->

  • [x] I have read the CONTRIBUTING.rst document.
  • [x] I have updated the documentation accordingly.
  • [x] I have included a changelog entry.
  • [x] I have added tests to cover my changes.
  • [x] I have run the test suite locally and all tests passed.
+182 -67

2 comments

11 changed files

drasmuss

pr closed time in 11 hours

pull request commentnengo/nengo

Ensure op graph order is deterministic

Yeah that's intentional. Because OrderedSet is slower than set, I tried to only use OrderedSet in the minimum number of places necessary to ensure determinism.

drasmuss

comment created time in 11 hours

pull request commentnengo/nengo

Ensure op graph order is deterministic

There are a couple sets in some of the other functions in graphs.py still. Should we make them OrderedSets, too? I think they're mostly used in the optimizer. I know that we're not going for full determinism in the optimizer at the moment, but if performance is similar between OrderedSet and set, then I don't see a strong reason not to. And it could avoid some bugs in the future (in general, non-determinism is annoying to debug). Or should we be doing more profiling before making that change, to ensure there's not a significant performance hit?

drasmuss

comment created time in 12 hours

Pull request review commentnengo/nengo

Ensure op graph order is deterministic

 class Test:     my_builder(1)     with pytest.warns(Warning, match="Type .* already has a builder. Overwriting"):         my_builder(1)  # repeat setup warning+++@pytest.mark.skipif(sys.version_info < (3, 6, 0), reason="requires ordered dicts")

So I looked into making this deterministic in Python 3.5, and it's actually quite difficult. There are a lot of places where dict order can randomize things, including in e.g. NeuronType.state, other parts of making the graph, etc. I haven't been able to track them all down, and I don't think it's worth putting more time into. Looking at the NengoDL PR, things might actually be deterministic enough that the previously broken functionality there is now fixed for Python 3.5 as well, even though things aren't completely deterministic.

So we'll just leave this full determinism as something we don't support in Python 3.5.

drasmuss

comment created time in 12 hours

Pull request review commentnengo/nengo

Ensure op graph order is deterministic

 class Test:     my_builder(1)     with pytest.warns(Warning, match="Type .* already has a builder. Overwriting"):         my_builder(1)  # repeat setup warning+++@pytest.mark.skipif(sys.version_info < (3, 6, 0), reason="requires ordered dicts")

Unfortunately not, there's other places that we use regular dicts within the build process that introduce non-determinism, besides sets. And fixing those didn't seem worth it, since we'll be dropping Python 3.5 support very soon.

drasmuss

comment created time in 13 hours

Pull request review commentnengo/nengo

Ensure op graph order is deterministic

 def discard(self, key):             del self._data[key]  +class FrozenOrderedSet(Set):+    """A set that preserves insertion order and is hashable."""++    def __init__(self, data=None):+        if data is None:+            data = []+        self.data = dict((d, None) for d in data)

I was thinking we'd merge this after the PR dropping Python 3.5 support, but yeah if not then we should do that.

drasmuss

comment created time in 13 hours

Pull request review commentnengo/nengo

Ensure op graph order is deterministic

 def discard(self, key):             del self._data[key]  +class FrozenOrderedSet(Set):+    """A set that preserves insertion order and is hashable."""++    def __init__(self, data=None):+        if data is None:+            data = []+        self.data = dict((d, None) for d in data)

I would use OrderedDict here for now, so that we don't have differences between Python 3.5 and 3.6+.

drasmuss

comment created time in 14 hours

Pull request review commentnengo/nengo

Ensure op graph order is deterministic

 class Test:     my_builder(1)     with pytest.warns(Warning, match="Type .* already has a builder. Overwriting"):         my_builder(1)  # repeat setup warning+++@pytest.mark.skipif(sys.version_info < (3, 6, 0), reason="requires ordered dicts")

If we use OrderedDict in OrderedSet then we shouldn't need this.

drasmuss

comment created time in 14 hours

issue closedNeuromorphicProcessorProject/snn_toolbox

Issue while creating a csv file.

I'm trying to create csv file for the MIT BIH dataset using the following code.

from IPython.display import display import matplotlib.pyplot as plt %matplotlib inline import numpy as np import os import shutil import csv import wfdb import scipy as sp from wfdb import processing from scipy import signal import heartpy as hp

name = (100,101)

with open('MIT-BIH10.csv','w') as t1: writer = csv.writer(t1, delimiter=',',lineterminator='\n') for file in name: sig,record = wfdb.rdsamp(recordname = str(file)) annotation = wfdb.rdann(recordname = str(file), extension='atr')

I'm getting and error cannot unpack non-iterable Record object at sig, record = wfdb.rdsamp(recordname= str(file)) it was working completely fine for 2 days but now the issue is srising what might be the problem. Please help.

closed time in 20 hours

ssaphale

issue commentNeuromorphicProcessorProject/snn_toolbox

Issue while creating a csv file.

Sorry, this is not related to SNN toolbox.

ssaphale

comment created time in 20 hours

push eventnengo/nengo

NengoBones

commit sha ac1b73b3d661f9c8ffa2859da823d33b4d900b0f

Documentation for branch deterministic-plan

view details

push time in a day

push eventnengo/nengo

Daniel Rasmussen

commit sha 03a31b5d778f8d7f3d7de628a616a37d2b41ddd1

Ensure op graph order is deterministic

view details

push time in a day

push eventmarcbelmont/deep-license-plate-recognition

nyaundi brian

commit sha 5d7efbd84b49e037e68b40f3fc22a16835586a2e

Dynamic Camera folders 1) Automatically process images that are under a certain folder 2) The folder name will be the camera ID the base folder to contain the cameras is specified using --cameras-root

view details

Marc Belmont

commit sha 5911f14f58cb226189eeacbbda443aea1e872ad8

Merge pull request #29 from danleyb2/cameras_root Dynamic cameras addition using a folder naming pattern

view details

push time in a day

PR merged marcbelmont/deep-license-plate-recognition

Dynamic cameras addition using a folder naming pattern
  1. Automatically process images that are under a certain folder
  2. The folder name will be the camera ID

the base folder to contain the cameras is specified using --cameras-root

+68 -12

0 comment

1 changed file

danleyb2

pr closed time in a day

push eventnengo/nengo

NengoBones

commit sha 6ac747e0731d46b34eddb02aa941ba1c12263e21

Documentation for branch deterministic-plan

view details

push time in a day

issue openedNeuromorphicProcessorProject/snn_toolbox

Issue while creating a csv file.

I'm trying to create csv file for the MIT BIH dataset using the following code.

from IPython.display import display import matplotlib.pyplot as plt %matplotlib inline import numpy as np import os import shutil import csv import wfdb import scipy as sp from wfdb import processing from scipy import signal import heartpy as hp

name = (100,101)

with open('MIT-BIH10.csv','w') as t1: writer = csv.writer(t1, delimiter=',',lineterminator='\n') for file in name: sig,record = wfdb.rdsamp(recordname = str(file)) annotation = wfdb.rdann(recordname = str(file), extension='atr')

I'm getting and error cannot unpack non-iterable Record object at sig, record = wfdb.rdsamp(recordname= str(file)) it was working completely fine for 2 days but now the issue is srising what might be the problem. Please help.

created time in a day

push eventnengo/nengo

Daniel Rasmussen

commit sha 7f375e22e01e79551adae739c9dd562547071843

fixup! Ensure op graph order is deterministic

view details

push time in a day

issue commentNeuromorphicProcessorProject/snn_toolbox

Pytorch code to Loihi

Sorry, I can't help you with this.

albertopolito

comment created time in a day

issue commentNeuromorphicProcessorProject/snn_toolbox

Pytorch code to Loihi

Thanks for your answer.

Ok, now this part work, but it doesn't recognize another module. The error is:

Traceback (most recent call last):   File "../snn_toolbox/examples/mnist_keras_loihi.py", line 161, in <module>     main(config_filepath)   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/snntoolbox/bin/run.py", line 31, in main     run_pipeline(config)   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/snntoolbox/bin/utils.py", line 56, in run_pipeline     target_sim = import_target_sim(config)   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/snntoolbox/bin/utils.py", line 244, in import_target_sim     + sim_str + code_str + '_target_sim')   File "/homes/albertoviale/.local/lib/python3.6/importlib/init.py", line 126, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 994, in _gcd_import   File "<frozen importlib._bootstrap>", line 971, in _find_and_load   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked   File "<frozen importlib._bootstrap_external>", line 678, in exec_module   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/snntoolbox/simulation/target_simulators/loihi_target_sim.py", line 10, in <module>     from nxsdk_modules_ncl.snntoolbox.nx_backend import SNN   File "/homes/albertoviale/models/nxsdk_modules_ncl/snntoolbox/nx_backend.py", line 31, in <module>     import nxsdk_modules_ncl.dnn.src.dnn_layers as nxtf   File "/homes/albertoviale/models/nxsdk_modules_ncl/dnn/init.py", line 15, in <module>     from nxsdk_modules_ncl.dnn.src.dnn_layers import
  File "/homes/albertoviale/models/nxsdk_modules_ncl/dnn/src/dnn_layers.py", line 36, in <module>     from nxsdk_modules_ncl.dnn.src.plotting import plot_multiplicity,
  File "/homes/albertoviale/models/nxsdk_modules_ncl/dnn/src/plotting.py", line 23, in <module>     from matplotlib.ticker import IndexLocator, AutoMinorLocator   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/matplotlib/init.py", line 127, in <module>     from . import cbook   File "/homes/albertoviale/python3_6_venv/lib/python3.6/site-packages/matplotlib/cbook/init.py", line 13, in <module>     import bz2   File "/homes/albertoviale/.local/lib/python3.6/bz2.py", line 23, in <module>     from _bz2 import BZ2Compressor, BZ2Decompressor ModuleNotFoundError: No module named '_bz2'

I see on the net that this can be caused by the local installation of python. But I'm a begginer and I don't know how to overcome this problem.

albertopolito

comment created time in a day

push eventnengo/nengo

NengoBones

commit sha 17ed84813dfcaab064e9f6349d57c37831945369

Documentation for branch deterministic-plan

view details

push time in a day

push eventnengo/nengo

Daniel Rasmussen

commit sha 0de7429bfedb99bede4f971153e4cec742a8cd30

fixup! Ensure op graph order is deterministic

view details

push time in 2 days

push eventnengo/nengo

NengoBones

commit sha c03a7bbc64a3a9242fd3b3edc8d71efcff68a28a

Documentation for branch deterministic-plan

view details

push time in 2 days

push eventnengo/nengo

Daniel Rasmussen

commit sha 0a750a639eaa03411e7c9b14a0fc9e425af5462c

fixup! Ensure op graph order is deterministic

view details

push time in 2 days

push eventnengo/nengo

NengoBones

commit sha 8d5ac261889fdb9ab21e08e3025d68f32f69f1e4

Documentation for branch deterministic-plan

view details

push time in 2 days

push eventnengo/nengo

Daniel Rasmussen

commit sha 2f9759f28501d5200b71242f5792ca7e9501b2cd

fixup! Ensure op graph order is deterministic

view details

push time in 2 days

more