Skip to content

Conversation

@sdesrozis
Copy link
Contributor

@sdesrozis sdesrozis commented Apr 5, 2020

Fixes #869

Description:

First attempt to discuss

  • use of inspect to catch if engine is in signature

This is done in _fire_events. It should be better if engine was added in signature during registering. It implies a different order for arguments passed to _fire_events (basically Exception).

TODO : docs

@vfdev-5 thoughts ?

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)

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.

Some commented code to remove and add docs.
Otherwise, I tested locally and works like a charm :)

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.

LGTM! Thanks Sylvain !

@vfdev-5 vfdev-5 merged commit 67d24e2 into pytorch:master Apr 11, 2020
@sdesrozis sdesrozis deleted the issue-869 branch April 11, 2020 20:17
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

Successfully merging this pull request may close these issues.

Engine optional in signature of event function

2 participants