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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摗 鈽庯笍 Fix kwargs transmission on MultiTrainingCallback #645

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

Rodrigo-A-Pereira
Copy link
Contributor

Link to the relevant Bug(s)

This PR is linked to a bug found in a discussion on issue #643 (comment).

Description of the Change

Pass the kwargsto the registered callbacks when they are called by the MultiTrainingCallback object

Example:

   def post_epoch(self, epoch: int, epoch_loss: float, **kwargs: Any) -> None:  # noqa: D102
        for callback in self.callbacks:
            callback.post_epoch(epoch=epoch, epoch_loss=epoch_loss, **kwargs)

Possible Drawbacks

None I can think of.

Verification Process

I verified that the given kwargs were being indeed passed down, by printing the kwargs inside the registered callback function being called.

Release Notes

Fixed issue where kwargs were not being transmitted from MultiTrainingCallback object to its registered callbacks.

@cthoyt cthoyt changed the title Fixx kwargs transmition on MultiTrainingCallback Fix kwargs transmission on MultiTrainingCallback Nov 19, 2021
Copy link
Member

@cthoyt cthoyt left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks @Rodrigo-A-Pereira for looking into this.

@cthoyt
Copy link
Member

cthoyt commented Nov 19, 2021

@PyKEEN-bot test

@cthoyt cthoyt changed the title Fix kwargs transmission on MultiTrainingCallback 馃摗 鈽庯笍 Fix kwargs transmission on MultiTrainingCallback Nov 19, 2021
@cthoyt cthoyt merged commit d473afe into pykeen:master Nov 19, 2021
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.

None yet

3 participants