I am experiencing some issues with opening my nengo model in the nengo GUI. The model uses a nengo-dl simulator, but also contains a line of code that checks whether the model is run in the GUI and sets the model accordingly (using nengo simulators rather than nengo-dl). I have been trying to open the model in the nengo GUI and ran into lots of problems:
Opening the model with the nengo backend works (although it takes forever to load the model), but I cannot run the model. It throws the following error:
Traceback (most recent call last):
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo_gui/page.py", line 486, in build
self.model, progress_bar=self.locals['_viz_progress'])
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/simulator.py", line 160, in __init__
progress=pt.next_stage("Building", "Build"))
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 123, in build
built = self.builder.build(self, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 218, in build
return cls.builders[obj_cls](model, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/network.py", line 113, in build_network
model.build(conn)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 123, in build
built = self.builder.build(self, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 218, in build
return cls.builders[obj_cls](model, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/connection.py", line 305, in build_connection
model.build(r)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 123, in build
built = self.builder.build(self, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 218, in build
return cls.builders[obj_cls](model, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/learning_rules.py", line 392, in build_learning_rule
model.build(rule.learning_rule_type, rule) # updates delta
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 123, in build
built = self.builder.build(self, obj, *args, **kwargs)
File "/home/s3344282/.conda/envs/Noa_test2/lib/python3.7/site-packages/nengo/builder/builder.py", line 216, in build
"Cannot build object of type %r" % type(obj).__name__)
nengo.exceptions.BuildError: Cannot build object of type 'STP'
I think that this is related to using the nengo backend, because the model uses a custom neuron type with custom learning rules implemented in nengo-dl. Switching to the nengo-dl backend in the GUI sometimes leads to the model being loaded, sometimes not (throwing a timeout error, saying that the page has become unresponsive). If the model is loaded, I cannot continue due to the error:
finish() got an unexpected keyword argument 'dirty'
I found out that this error is related to the progressbar2 package (3.53.1), and that the bug was fixed in a newer version of nengo-dl (currently using 2.2.2). However, I cannot use a newer version due to using nengo 2.8.0, so instead I tried installing an earlier version of progressbar2 (3.47.0). With this package, the model wonāt load at all, regardless of which backend is used, and I see the āpage unresponsiveā pop-up after some time. I am not sure whether this means that using the earlier progressbar2 version fixes the finish() error or introduces another problem.
I am new to working with nengo, so please let me know whether I need to provide more specific information!
Packages: nengo 2.8.0, nengo-dl 2.2.2, nengo-ocl 1.4.0, nengo-gui 0.4.7, python 3.7.9