Skip to content

Introduced EventsDriven #2107

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

Merged
merged 26 commits into from
Jul 16, 2021
Merged

Conversation

KickItLikeShika
Copy link
Contributor

@KickItLikeShika KickItLikeShika commented Jul 14, 2021

As explained here: https://github.com/pytorch/ignite/wiki/Roadmap#refactor-engine
This PR will separate the events registration code from the other code.

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Code adapted from https://github.com/vfdev-5/ignite/tree/eventdriven

@github-actions github-actions bot added docs module: base Base module module: engine Engine module labels Jul 14, 2021
@KickItLikeShika
Copy link
Contributor Author

Please review this as soon as you have time, @sdesrozis @trsvchn @vfdev-5. Thanks.

@KickItLikeShika KickItLikeShika changed the base branch from master to refactor-engine July 14, 2021 14:48
@sdesrozis
Copy link
Contributor

@KickItLikeShika Thanks for this PR! It's a tricky part, and good for you for being comfortable enough with it!

I left a few comments and some tests must be fixed.

@KickItLikeShika
Copy link
Contributor Author

KickItLikeShika commented Jul 14, 2021

@sdesrozis can you please point out to the tests that should be fixed? only the there are two failing unit test that should be fixed, usually it was working fine without any updates, see here #2106

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Jul 14, 2021

@KickItLikeShika there are many failing tests (13) which should be fixed before merging.

@KickItLikeShika
Copy link
Contributor Author

@vfdev-5 Yes I mean just 2 unit tests should be fixed

raise TypeError(
"Argument event_name should not be a filtered event, " "please use event without any event filtering"
)
return super(Engine, self).add_event_handler(event_name, handler, *args, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KickItLikeShika you resolved the comment, yet you didn’t answer.

Copy link
Contributor Author

@KickItLikeShika KickItLikeShika Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very sorry about that, but I answered your question here #2107 (comment), I thought you saw it and agreed so I resolved the comment, again sorry.
I think keeping the full docs in the Engine docs and minimized docs in the base class is something nice, what do you think?

@sdesrozis
Copy link
Contributor

sdesrozis commented Jul 15, 2021

@KickItLikeShika error in the docstring of EventDriver.

one comment left.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Jul 15, 2021

@KickItLikeShika I thought we agreed on the first PR to do only:

  • introducing EventsDriven and other mixins classes without changing anything in Engine

Here you are already modifying Engine.

@KickItLikeShika
Copy link
Contributor Author

@vfdev-5 can you please point out to which modification in the engine you mean? I haven't changed anything in the engine except the necessary for introducing EventsDriven

@KickItLikeShika KickItLikeShika changed the title Split Engine Introduced EventsDriven Jul 16, 2021
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KickItLikeShika Thanks for the updates. Remains few things and we can merge it

@KickItLikeShika KickItLikeShika requested a review from vfdev-5 July 16, 2021 12:54
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KickItLikeShika !

Codecov failure can be ignore now.

@vfdev-5 vfdev-5 merged commit cf8ff70 into pytorch:refactor-engine Jul 16, 2021
@KickItLikeShika KickItLikeShika deleted the split-engine branch July 16, 2021 14:54
vfdev-5 pushed a commit that referenced this pull request Jul 1, 2022
* Updates

* update docs

* update docs

* update docs

* update docstring

* update docstring

* update docstring

* revert

* split events_driven + other updates

* fix docstring

* fixed deterministic issue + udpate EventsDriven

* ignore type in _handler_wrapper

* revert tpu-test

* Revert "Removed temporary fix with mkl (#2110)"

This reverts commit de4cff3.

* Revert "revert tpu-test"

This reverts commit 82a8d7a.

* revert

* Revert "revert"

This reverts commit 99c3921.

* revert

* reverted engine + added docs for EventsDriven + fixed broken docs

* updated base docs

* fixed broken docs

* reverted state

* revert test_mixins

* added tests

* fixed typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module: base Base module module: engine Engine module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants