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 rule for push!(::IdSet) #1494

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Add rule for push!(::IdSet) #1494

merged 1 commit into from
Oct 13, 2024

Conversation

ToucheSir
Copy link
Member

This is required on 1.11 because the underlying implementation changed in JuliaLang/julia@cb01a3b from using an IdDict (which Zygote can diff through) to a direct ccall.

PR Checklist

  • Tests are added
  • Documentation, if applicable

@ToucheSir ToucheSir added needs adjoint missing rule second order zygote over zygote, or otherwise implicit using Params, Grads labels Jan 8, 2024
@ToucheSir
Copy link
Member Author

NNlib reverse CI will be fixed by FluxML/NNlib.jl#559. DynamicPPL tests still appear unrelated. Remaining failures (not errors) don't use implicit params, and may be related to ChainRules since they're testing those rules rather than Zygote ones.

@ToucheSir ToucheSir closed this Sep 22, 2024
@ToucheSir ToucheSir reopened this Sep 22, 2024
This is required on 1.11 because the underlying implementation has changed.
@ToucheSir
Copy link
Member Author

Revisiting this because it squashes one error on nightly that is making all PRs fail. It does expose another error related to try-catch, but I imagine #1474 would help with that.

@CarloLucibello
Copy link
Member

Add test?

@CarloLucibello
Copy link
Member

or no test is needed, it fixes an error on nightly?

@ToucheSir
Copy link
Member Author

The latter. The codepath was already tested, but it was broken ever since 1.11 became the nightly version:

Zygote.jl/test/interface.jl

Lines 265 to 267 in 2517e67

sgs = gradient(ps) do
sum(sum(x) for x in Zygote.Params([d.W, d.b]))
end

@ToucheSir ToucheSir merged commit 74849f3 into master Oct 13, 2024
13 of 14 checks passed
@ToucheSir ToucheSir deleted the bc/idset-push! branch October 13, 2024 18:34
@ToucheSir ToucheSir restored the bc/idset-push! branch October 13, 2024 18:34
@ToucheSir ToucheSir deleted the bc/idset-push! branch October 13, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implicit using Params, Grads needs adjoint missing rule second order zygote over zygote, or otherwise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants