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

[JOSS Review] Scheduling example not working #272

Open
gomezzz opened this issue Mar 26, 2024 · 1 comment
Open

[JOSS Review] Scheduling example not working #272

gomezzz opened this issue Mar 26, 2024 · 1 comment

Comments

@gomezzz
Copy link

gomezzz commented Mar 26, 2024

Running the scheduling example I receive the following error

Traceback (most recent call last):
  File ".../Code/amltk/ex2.py", line 48, in <module>
    scheduler.run(timeout=10)
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/scheduler.py", line 1411, in run
    return asyncio.run(
           ^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/scheduler.py", line 1580, in async_run
    stop_reason = await self._run_scheduler(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/scheduler.py", line 1200, in _run_scheduler
    self.on_start.emit()
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/events.py", line 479, in emit
    return self.emitter.emit(self.event, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/events.py", line 609, in emit
    return [(handler, handler(*args, **kwargs)) for handler in self.handlers[event]]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/events.py", line 609, in <listcomp>
    return [(handler, handler(*args, **kwargs)) for handler in self.handlers[event]]
                      ^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/events.py", line 526, in __call__
    first_response = next(responses)
                     ^^^^^^^^^^^^^^^
  File ".../mambaforge-pypy3/envs/amltk/lib/python3.11/site-packages/amltk/scheduling/events.py", line 524, in <genexpr>
    responses = iter(self.callback(*args, **kwargs) for _ in range(self.repeat))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../Code/amltk/ex2.py", line 24, in on_start
    n = next(numbers)
        ^^^^^^^^^^^^^
TypeError: 'range' object is not an iterator

(opened as part of JOSS Review openjournals/joss-reviews#6367 )

@eddiebergman
Copy link
Contributor

eddiebergman commented May 28, 2024

Hi @gomezzz, sorry to get back to this so late, which example was it that you were trying to run? Was it this one?

https://automl.github.io/amltk/latest/examples/dask-jobqueue/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants