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

Resolve symbolic differentiation infinite loop under pypy #3098

Closed
wants to merge 1 commit into from

Conversation

jsiirola
Copy link
Member

Fixes #3096 .

Summary/Motivation:

This resolves an infinite loop that was observed in symbolic differentiation when run under PyPy (#3096) by ensuring that the derivative expressions are detangled from the original expressions. As the walker is already creating the new lists, this change should have minimal impact on the walker's performance.

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (74f18cf) 88.25% compared to head (c7fe8fe) 88.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3098      +/-   ##
==========================================
+ Coverage   88.25%   88.26%   +0.01%     
==========================================
  Files         832      832              
  Lines       92390    92390              
==========================================
+ Hits        81539    81551      +12     
+ Misses      10851    10839      -12     
Flag Coverage Δ
linux 85.99% <100.00%> (+0.01%) ⬆️
osx 75.54% <100.00%> (+<0.01%) ⬆️
other 86.17% <100.00%> (+<0.01%) ⬆️
win 83.40% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelbynum
Copy link
Contributor

Just for record keeping - the underlying issue here has to do with expression mutability/immutability. @jsiirola and I are exploring options.

@jsiirola
Copy link
Member Author

This is being replaced by #3099

@jsiirola jsiirola closed this Jan 23, 2024
@jsiirola jsiirola deleted the diff-pypy-issue3096 branch January 26, 2024 23:37
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.

EXPR.differentiate() get stuck for a quadratic expression with mode=reverse_symbolic
2 participants