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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

β“πŸ§ Improve automatic memory optimization parameter handling #404

Merged
merged 2 commits into from Apr 26, 2021

Conversation

lvermue
Copy link
Member

@lvermue lvermue commented Apr 26, 2021

Currently, the pipeline re-uses derived optimal parameter settings from the automatic memory optimization.
This can lead to issues, because these parameters are derived from using the validation dataset. In cases where the test dataset is bigger than the validation dataset, these re-used parameter are overly optimistic and can lead to crashes. Furthermore, in the light of #398 this issue is significantly increased.

Therefore, this PR will mitigate this issue by making the re-usage of the parameters depending on whether the validation dataset is also used for the final evaluation.

@lvermue lvermue changed the title WIP: Improve automatic memory optimization parameter handling β“πŸ§WIP: Improve automatic memory optimization parameter handling Apr 26, 2021
@cthoyt cthoyt changed the title β“πŸ§WIP: Improve automatic memory optimization parameter handling β“πŸ§ WIP: Improve automatic memory optimization parameter handling Apr 26, 2021
@@ -1000,8 +1000,8 @@ def pipeline( # noqa: C901
mapped_triples = validation.mapped_triples

# Evaluate
# Reuse optimal evaluation parameters from training if available
if evaluator_instance.batch_size is not None or evaluator_instance.slice_size is not None:
# Reuse optimal evaluation parameters from training if available, only if the validation triples are used again
Copy link
Member

Choose a reason for hiding this comment

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

when this says training, it's because it runs a fake "training" with the mapped triples for the evaluation data?

Copy link
Member Author

Choose a reason for hiding this comment

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

No

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see what's going on then

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.

Makes sense to me

@lvermue lvermue marked this pull request as ready for review April 26, 2021 13:18
@lvermue lvermue changed the title β“πŸ§ WIP: Improve automatic memory optimization parameter handling β“πŸ§ Improve automatic memory optimization parameter handling Apr 26, 2021
@lvermue
Copy link
Member Author

lvermue commented Apr 26, 2021

@PyKEEN-bot Please test this!

@lvermue lvermue merged commit 2bfdc7a into master Apr 26, 2021
@lvermue lvermue deleted the improve_automatic_memory_optimization branch April 26, 2021 13:32
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