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

Also use all args and kwargs when computing fec cache key #272

Merged

Conversation

jakobj
Copy link
Member

@jakobj jakobj commented Jan 6, 2021

This PR fixes a bug in the fec cache where only the evaluation of the function encoded in an individual would determine the cache key, while all other (keyword)arguments would be ignored. This means that calls like this for a decorated inner objective:

    y0 = inner_objective(ind, 5)
    y1 = inner_objective(ind, 10)

would yield the same values as the second one is assigned the same key and hence the cached value is returned.

@jakobj jakobj added bug Something isn't working high priority Let's fix this quickly! labels Jan 6, 2021
@jakobj jakobj added this to the 0.2.1 milestone Jan 6, 2021
@coveralls
Copy link
Collaborator

coveralls commented Jan 6, 2021

Coverage Status

Coverage increased (+0.003%) to 95.262% when pulling b283853 on jakobj:fix/fec-cache-key into 20ee3cb on Happy-Algorithms-League:master.

Copy link
Contributor

@HenrikMettler HenrikMettler left a comment

Choose a reason for hiding this comment

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

LGTM!

@HenrikMettler HenrikMettler merged commit b6d7942 into Happy-Algorithms-League:master Jan 6, 2021
@jakobj jakobj deleted the fix/fec-cache-key branch January 6, 2021 15:38
@jakobj jakobj modified the milestones: 0.2.1, 0.3.0 Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Let's fix this quickly!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants