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

MNIST Tutorial hangs on mnist_clf.run on macOS #850

Open
p-i- opened this issue Apr 20, 2024 · 1 comment
Open

MNIST Tutorial hangs on mnist_clf.run on macOS #850

p-i- opened this issue Apr 20, 2024 · 1 comment
Labels
0-needs-review For all new issues 1-bug Something isn't working

Comments

@p-i-
Copy link

p-i- commented Apr 20, 2024

In lava/tutorials/end_to_end/tutorial01_mnist_digit_classification.ipynb:

    # Run each image-inference for fixed number of steps
    mnist_clf.run(
        condition=RunSteps(num_steps=num_steps_per_image),
        run_cfg=Loihi1SimCfg(select_sub_proc_model=True,
                             select_tag='fixed_pt'))

... hangs.

#312 references exactly the same line of code, though states different symptoms. I've nevertheless implemented the suggested fix (and it doesn't make any difference).

Two students reported fail on macOS. Two on macOS using miniconda reported success. Students on Windows report success.

It seems there's a bug in the repo!

@p-i- p-i- added the 1-bug Something isn't working label Apr 20, 2024
@github-actions github-actions bot added the 0-needs-review For all new issues label Apr 20, 2024
@p-i-
Copy link
Author

p-i- commented Apr 21, 2024

I put debug-statements in lava/src/lava/magma/runtime/runtime.py:

class Runtime:
    def initialize(self, node_cfg_idx: int = 0):
        """Initializes the runtime"""
        self._build_watchdog_manager()
        print('🔸1a')
        self._build_message_infrastructure()
        print('🔸1b')
        self._build_channels()
        print('🔸1c')
        self._build_sync_channels()
        print('🔸1d')
        self._build_processes()
        print('🔸1e')
        self._build_runtime_services()
        print('🔸1f')
        self._start_ports()
        print('🔸1g')

        # Check if any exception was thrown
        for i, q in enumerate(self.exception_q):
            print(f'🟠{i}')
            e = q.get()
            if e:
                print('🟠 🟠')
                print(str(e), e.trace)
                raise(e)
        print('🟢')

Output from notebook cell:

🔸1a
🔸1b
🔸1c
🔸1d
🔸1e
objc[9426]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[9426]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
🔸1f
🔸1g
🟠0
🟠1
🟠2
🟠3
🟠4
🟠5
🟠6
🟠7

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

No branches or pull requests

1 participant