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

Test concrete type constructors in addition to UnionAlls #24

Open
ararslan opened this issue Apr 23, 2019 · 2 comments
Open

Test concrete type constructors in addition to UnionAlls #24

ararslan opened this issue Apr 23, 2019 · 2 comments
Labels
testing Related to tests

Comments

@ararslan
Copy link
Member

In #23, we realized that while it's straightforward to test sensitivities for one-argument UnionAll constructors, e.g. Symmetric(X) and Diagonal(X), things can get more complicated when attempting to test constructors for concrete subtypes. The example in the linked PR was for Symmetric{T,M}, which requires a second argument when used as constructor. We should find a way to make it easier to test such things, perhaps by refactoring rrule_test?

@willtebbutt
Copy link
Member

perhaps by refactoring rrule_test?

I reckon this is the right way to go. We could just add an extra argument to rrule_test that contains the type to be passed to rrule i.e.

rrule_test(f, typeof(f), other_stuff...)

would be the new interface.

@ararslan
Copy link
Member Author

I noticed last night that we'd need to be careful about which argument is the one we're checking. Consider e.g. BLAS functions, which often have the differentiable argument last.

@nickrobinson251 nickrobinson251 added the testing Related to tests label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to tests
Projects
None yet
Development

No branches or pull requests

3 participants