We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code does not work:
import torch print(torch.__version__) import ignite print(ignite.__version__) from ignite.engine import Engine, Events, State def f4(): print("f4") e = Engine(lambda e, b: None) e.state = State(iteration=0, epoch=0, max_epochs=10) e.add_event_handler(Events.ITERATION_COMPLETED(every=2), f4) e.fire_event(Events.ITERATION_COMPLETED) e.fire_event(Events.ITERATION_COMPLETED)
Output
TypeErrorTraceback (most recent call last) <ipython-input-13-832efed482dd> in <module> 14 15 e.add_event_handler(Events.ITERATION_COMPLETED(every=2), f4) ---> 16 e.fire_event(Events.ITERATION_COMPLETED) 17 e.fire_event(Events.ITERATION_COMPLETED) /opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in fire_event(self, event_name) 414 415 """ --> 416 return self._fire_event(event_name) 417 418 def terminate(self) -> None: /opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in _fire_event(self, event_name, *event_args, **event_kwargs) 391 kwargs.update(event_kwargs) 392 first, others = ((args[0],), args[1:]) if (args and args[0] == self) else ((), args) --> 393 func(*first, *(event_args + others), **kwargs) 394 395 def fire_event(self, event_name: Any) -> None: /opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in wrapper(engine, *args, **kwargs) 203 event = engine.state.get_event_attrib_value(event_name) 204 if event_filter(engine, event): --> 205 return handler(engine, *args, **kwargs) 206 207 # setup input handler as parent to make has_event_handler work TypeError: f4() takes 0 positional arguments but 1 was given
@sdesrozis could you please take a look. Thanks !
The text was updated successfully, but these errors were encountered:
sdesrozis
Successfully merging a pull request may close this issue.
馃悰 Bug description
The following code does not work:
Output
Environment
@sdesrozis could you please take a look. Thanks !
The text was updated successfully, but these errors were encountered: