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

Restore some support for Tracker.jl #2387

Merged
merged 4 commits into from
Mar 21, 2024
Merged

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Mar 2, 2024

At present Tracker.jl cannot be used at all with Flux models. This is mostly because TrackedArrays lie about their eltype, but it's not so hard to work around:

julia> ta = param([1.0 2.0])
Tracked 1×2 Matrix{Float64}:
 1.0  2.0

julia> ta isa AbstractMatrix{Float64}
true

julia> eltype(ta)
TrackedReal{Float64}

julia> ta[1]
1.0 (tracked)

Tests are very basic, ideally we would set up some nice way of testing different ADs on all layers once e.g. Enzyme also works... but at least this is something.

Needs FluxML/Tracker.jl#162

Closes FluxML/Tracker.jl#146

@mcabbott mcabbott marked this pull request as ready for review March 21, 2024 03:12
@darsnack
Copy link
Member

Bump the patch?

@mcabbott mcabbott merged commit 8654721 into FluxML:master Mar 21, 2024
2 of 8 checks passed
@mcabbott mcabbott deleted the fix_tracker branch March 21, 2024 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Readme example with Flux no longer works
2 participants