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

DI Integration Testing #286

Open
gdalle opened this issue Oct 8, 2024 · 5 comments
Open

DI Integration Testing #286

gdalle opened this issue Oct 8, 2024 · 5 comments

Comments

@gdalle
Copy link

gdalle commented Oct 8, 2024

In DI, how will we handle the change from Array to other tangent types in 1.11?

@willtebbutt
Copy link
Member

I think I should probably just add some conversion functionality to ensure that DI doesn't ever have to see weird tangent types for Array.

@willtebbutt
Copy link
Member

I've realised that this was a false alarm -- apologies! The reason is that I need to keep gradients of Arrays as Arrays in order to retain compatibility with LTS. While I've not made a decision about whether the type of the gradient w.r.t. an object is part of the public API, and therefore must not change between Julia versions, my gut is that it would be kind of made to get Arrays on 1.10, and MutableTangents on 1.11.

I'm going to close this, but re-open if it becomes a problem again.

@gdalle
Copy link
Author

gdalle commented Oct 10, 2024

Perhaps as a smoke test you could add DI testing to your test suite?

@willtebbutt
Copy link
Member

Good shout. I'll make a point of doing this once the 1.11 transition PR is merged.

@willtebbutt willtebbutt changed the title Making my life miserable (aka new tangent types for arrays) DI Integration Testing Oct 12, 2024
@willtebbutt willtebbutt reopened this Oct 12, 2024
@gdalle
Copy link
Author

gdalle commented Oct 12, 2024

The test file should be as simple as this:

using DifferentiationInterface, DifferentiationInterfaceTest
import Mooncake

backends = [AutoMooncake(; config=nothing), AutoMooncake(; config=Mooncake.Config())]

test_differentiation(
    backends;
    excluded=SECOND_ORDER,
    logging=true,
);

However if you release a breaking version on Mooncake, this will fail to resolve the environment until DI updates its compatibility bounds. That's the downside of handling backend compatibility in DI itself.

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

No branches or pull requests

2 participants