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

Add define_fdjvp and fgrad improvements #2

Merged
merged 4 commits into from
Jun 5, 2023
Merged

Add define_fdjvp and fgrad improvements #2

merged 4 commits into from
Jun 5, 2023

Conversation

ASEM000
Copy link
Owner

@ASEM000 ASEM000 commented Jun 5, 2023

  • Add define_fdjvp following JEP
  • Make fgrad accepts a tuple of step sizes and offsets for each argnum.
  • Remove accuracy in fgrad to eliminate the mutually exclusive argument, instead uses offset=fdx.Offset(accuracy=...) to auto-generate the required offsets (shifted eval points)
  • Fix the docstring for all files.

- add `define_fdjvp`
- make `fgrad` accepts tuple of step sizes and offsets for each argnum.
- remove `accuracy` in `fgrad` to eliminate the mutually exclusive argument, instead uses `fdx.Offset(accuracy=...)` with `offset=`
- fix the docstring for all files
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch coverage: 74.72% and project coverage change: -4.28 ⚠️

Comparison is base (ae10b5d) 99.78% compared to head (b4657f2) 95.51%.

❗ Current head b4657f2 differs from pull request most recent head 2b2f7fd. Consider uploading reports for the commit 2b2f7fd to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #2      +/-   ##
==========================================
- Coverage   99.78%   95.51%   -4.28%     
==========================================
  Files           6        6              
  Lines         474      535      +61     
==========================================
+ Hits          473      511      +38     
- Misses          1       24      +23     
Impacted Files Coverage Δ
finitediffx/_src/fgrad.py 72.61% <63.49%> (-27.39%) ⬇️
finitediffx/__init__.py 100.00% <100.00%> (ø)
finitediffx/_src/finite_diff.py 100.00% <100.00%> (ø)
finitediffx/_src/utils.py 98.00% <100.00%> (-0.15%) ⬇️
tests/test_fgrad.py 100.00% <100.00%> (ø)

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

@ASEM000 ASEM000 merged commit 87b0ec5 into main Jun 5, 2023
@ASEM000 ASEM000 deleted the fdjvp branch June 5, 2023 12:40
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.

1 participant