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

Replace normal equivalence with object equivalence in memoize #3337

Merged
merged 1 commit into from May 1, 2023

Conversation

franckgaga
Copy link
Contributor

@franckgaga franckgaga commented May 1, 2023

It seems that object equivalence is more robust with some specific corner case on Duals. See my reply on discourse : https://discourse.julialang.org/t/cache-results-between-function-calls-in-optimization-jl/94964/12?u=franckgaga The simple example of the doc was working well with normal equivalence but that's not always the case. I'm not able to pinpoint in which situation it fails, but it's happening when x==last_dx is true BUT typeof(x)==typeof(last_dx) is false.

It seems that object equivalence is more robust with some specific corner case on Duals. See my reply on discourse :
https://discourse.julialang.org/t/cache-results-between-function-calls-in-optimization-jl/94964/12?u=franckgaga
The simple example of the doc was working well with normal equivalence but that's not always the case. I'm not able to pinpoint in which situation it fails, but it's happening when `x==last_dx` is `true` BUT `typeof(x)==typeof(last_dx)` is false.
@odow
Copy link
Member

odow commented May 1, 2023

Thanks! Yeah I just saw your discourse post and came here to make the same change 😄

@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (287b41c) 98.05% compared to head (4700484) 98.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3337   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files          34       34           
  Lines        4874     4874           
=======================================
  Hits         4779     4779           
  Misses         95       95           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@odow odow merged commit e87f315 into jump-dev:master May 1, 2023
10 checks passed
@odow
Copy link
Member

odow commented May 1, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants