Skip to content

fix: made the gradient testing more generic#681

Merged
CarloLucibello merged 3 commits into
JuliaGraphs:masterfrom
Parvm1102:fix/generic-tests
Jul 16, 2026
Merged

fix: made the gradient testing more generic#681
CarloLucibello merged 3 commits into
JuliaGraphs:masterfrom
Parvm1102:fix/generic-tests

Conversation

@Parvm1102

Copy link
Copy Markdown
Contributor

closes #676

The new code passes all tests.
It has been made more generic by using a helper function for running the required backend.

Signed-off-by: Parvm1102 <parvmittal31757@gmail.com>
@Parvm1102

Copy link
Copy Markdown
Contributor Author

@CarloLucibello please review this

Comment thread GNNlib/test/test_module.jl Outdated
end

# AD backends to compare against the Zygote reference gradient.
ad_backends = []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be an argument to the function, with default AutoZygote.

see how it is done here
https://github.com/FluxML/NNlib.jl/blob/2e687800a16391d58fefba2b929b19f5a2509c72/test/test_module.jl#L129

…CAKE across various test files

Signed-off-by: Parvm1102 <parvmittal31757@gmail.com>
@Parvm1102

Parvm1102 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@CarloLucibello I have made some changes, does that look alright?
Note: we would still need to pass ad_backends because there are some layers which fail mooncake. So we need some kind of flag or an array for tests

Comment thread GraphNeuralNetworks/test/test_module.jl Outdated
Comment thread GraphNeuralNetworks/test/test_module.jl Outdated
Comment thread GNNlib/test/msgpass.jl Outdated
Signed-off-by: Parvm1102 <parvmittal31757@gmail.com>
@Parvm1102

Copy link
Copy Markdown
Contributor Author

@CarloLucibello waiting for your review

@CarloLucibello
CarloLucibello merged commit 917700c into JuliaGraphs:master Jul 16, 2026
8 of 10 checks passed
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.

Make the gradient testing function more generic

2 participants