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

tutorial02_process hangs on lif.run command #247

Open
2 tasks done
jorchard opened this issue Apr 26, 2022 · 6 comments
Open
2 tasks done

tutorial02_process hangs on lif.run command #247

jorchard opened this issue Apr 26, 2022 · 6 comments
Assignees
Labels
0-needs-estimate Issue needs to be estimated with story points 1-bug Something isn't working

Comments

@jorchard
Copy link

jorchard commented Apr 26, 2022

Objective of issue:

Lava version:

  • 0.3.0 (current version)

I'm submitting a ...

  • bug report

Current behavior:

  • In the tutorial02_process.ipynb notebook, I have no problems until I reach the line
lif.run(condition=RunSteps(num_steps=1), run_cfg=Loihi1SimCfg())

which gives me the error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
AttributeError: Can't get attribute 'PyLifModel' on <module '__main__' (built-in)>

and then hangs.

Expected behavior:

  • Execution should complete (with no output). It should not hang.

Steps to reproduce:

  • On Mac OS 12.3.1, in a terminal window:
source .venv/bin/activate
jupyter notebook

Then I open tutorial02_process.ipynb, and execute the cells, one by one, from the top. They all run fine until it hangs, as described above.

Other information:

For what it's worth, some of the unit tests fail, though I'm not sure they are related.

==== 10 failed, 210 passed, 14 skipped, 2 warnings in 145.32s (0:02:25) =====
...
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/jorchard/Dropbox/research/lava/.venv/lib/python3.8/site-packages/coverage/sqldata.py", line 1063, in _connect
INTERNALERROR> sqlite3.OperationalError: unable to open database file
...
INTERNALERROR> coverage.exceptions.DataError: Couldn't use data file '/Users/jorchard/Dropbox/research/lava/.coverage.v1040-wn-rt-b-61-133.campus-dynamic.uwaterloo.ca.95589.702179': unable to open database file
@nzhang1218
Copy link

I'm having exactly the same trouble with Windows system.

@waltergallegog
Copy link

For what it is worth, that line gives me issues when I try to debug the cell in vscode.
Running the cell works fine.

You can read more abut it here:
microsoft/vscode-jupyter#9886 (comment)

In short, the line starts a new child process and currently vscode notebook debugging does not support attaching to them.

@stevenabreu7
Copy link

stevenabreu7 commented Jun 24, 2022

Still having the same issue when running the tutorial in a Jupyter notebook. Works fine if I run it as a Python file. Any progress on fixing this?

@weidel-p
Copy link
Contributor

We are aware that there are issues with running the tutorial under Windows. This is due to a problem in the combination between Windows, Jupyter notebook and the multiprocessing library. We are working on a clean solution, but I was not aware that this issue expands to Mac users.

There is an open pull request with a work-around. Please take a look at #259 , #95 and #148. Alternatively, you should be able to export the notebooks to Python scripts and run them outside of a notebook.

@joyeshmishra joyeshmishra added the 1-bug Something isn't working label Jul 20, 2022
@mathisrichter mathisrichter added the 0-needs-review For all new issues label Jan 3, 2023
@weidel-p weidel-p added 0-needs-estimate Issue needs to be estimated with story points and removed 0-needs-review For all new issues labels Jan 12, 2023
@weidel-p
Copy link
Contributor

This might be solved with the new message passing implementation which should be merged soon. I add @ysingh7 here as he might have a better overview over the current progress.

@weidel-p weidel-p assigned ysingh7 and unassigned weidel-p Jan 12, 2023
@jorchard
Copy link
Author

jorchard commented Feb 8, 2023

I don't know if this helps, but I wiped my MacBook Pro clean and did a fresh re-install of OS 13.2 (Ventura). After reinstalling Anaconda, and following the Lava install and tutorial instructions, I get the same error again. Exactly the same as in my original post. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-needs-estimate Issue needs to be estimated with story points 1-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants