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

Generate table of overloads in docs #207

Merged
merged 12 commits into from
Apr 25, 2024
Merged

Generate table of overloads in docs #207

merged 12 commits into from
Apr 25, 2024

Conversation

adrhill
Copy link
Collaborator

@adrhill adrhill commented Apr 24, 2024

Closes #115.

Generates more granular tables than issue #115.
Inside of the tables, checkmarks link to the respective source code.

Caveat: this doesn't include manual links to open issues.

Preview

Table of overloads.pdf

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

bro that rocks

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

Why is the table not in alphabetical order?
Also, FastDifferentiation is the only backend for which everything is overloaded, so it should be all green?

DifferentiationInterface/docs/src/overloads.md Outdated Show resolved Hide resolved
DifferentiationInterface/docs/src/overloads.md Outdated Show resolved Hide resolved
@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

Why is the table not in alphabetical order?

If you remove the value_and_ functions, it is.
I can swap operator! and operator if you prefer.

Also, FastDifferentiation is the only backend for which everything is overloaded, so it should be all green?

Good catch, that's a bug.

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.39%. Comparing base (32849b8) to head (b5b2538).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #207   +/-   ##
=======================================
  Coverage   96.39%   96.39%           
=======================================
  Files          65       65           
  Lines        3554     3554           
=======================================
  Hits         3426     3426           
  Misses        128      128           

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

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

I would put more stuff in a single line, like all four variants of gradient for example

@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

Does this look correct for FastDifferentiation?

image

@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

I would put more stuff in a single line, like all four variants of gradient for example

What would you call the columns?

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

No, it also has HVP. The source of truth is the GitHub issue

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

What would you call the columns?

For each backend, one table for 1-arg functions f and one table for 2-arg functions f!

In each row, a single operator like :gradient, and four columns with headers:

  • op
  • op!
  • val_and_op
  • val_and_op!

Alternately, the two tables could be brought into one

@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

The problem with hvp! and hvp was the missing vector argument.
There are too many edge cases, so now I manually specify operator function signatures for both f(x) and f!(y, x).

Updated preview

Table of overloads.pdf

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

The problem with hvp! and hvp was the missing vector argument.

Beware, pushforward and pullback also take one

@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

Round 3: Table of overloads.pdf

@gdalle
Copy link
Member

gdalle commented Apr 24, 2024

It looks better at first glance, I'll check in detail tomorrow! We probably don't need the 2-arg table for backends that don't support these functions, if that's not too much trouble to remove

@adrhill
Copy link
Collaborator Author

adrhill commented Apr 24, 2024

Good call, I've now filtered them. It makes the tables a lot more readable.
I've also added a couple of sentences to explain to people what they are looking at.

Latest build: Table of overloads.pdf

@gdalle gdalle merged commit b85ea79 into main Apr 25, 2024
5 checks passed
@gdalle gdalle deleted the ah/overloads branch April 25, 2024 12:00
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.

The big table of overloads
3 participants