automl / amltk

A build-it-yourself AutoML Framework
https://automl.github.io/amltk/
BSD 3-Clause "New" or "Revised" License
56 stars 3 forks source link

[JOSS Review] Scheduling example not working #272

Open gomezzz opened 3 months ago

gomezzz commented 3 months ago

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 https://github.com/openjournals/joss-reviews/issues/6367 )

eddiebergman commented 1 month ago

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/

gomezzz commented 3 weeks ago

Hi @eddiebergman,

yes I think it was that one