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 Flux 0.13 compatibility #202

Merged
merged 5 commits into from
Apr 20, 2022
Merged

Add Flux 0.13 compatibility #202

merged 5 commits into from
Apr 20, 2022

Conversation

lorenzoh
Copy link
Member

@lorenzoh lorenzoh commented Mar 9, 2022

Closes #201.

Depends on Flux 0.13 release and FluxML/FluxTraining.jl#103

@lorenzoh
Copy link
Member Author

Apparently this fails on 0.12 due to changes necessary to Embeddings for 0.13. @darsnack do you know what could have caused this and if this means that 0.13 changes to Embedding are not forward compatible?

@darsnack
Copy link
Member

darsnack commented Mar 13, 2022

This isn't because of Embedding. Parallel(connection, layer) (i.e. a single branch) doesn't wrap the single layer in a tuple. So instead of iterating the tuple as expected, we are iterating the branch itself. On v0.13 this should not be the case.

@darsnack
Copy link
Member

Okay this is cause FluxML/Flux.jl#1862 added a type restriction to Parallel that should have probably always been there.

You could either remove 0.12 from the compat, special case 0.12 in the source, or on L50 of models.jl, you can do Tuple(catbackbone[2].layers) in the mapreduce.

@lorenzoh
Copy link
Member Author

Thanks! I'll try the forward-compatible fix so that FastAI.jl can be used with both 0.12 and 0.13

@lorenzoh lorenzoh merged commit cbdf36b into master Apr 20, 2022
@lorenzoh lorenzoh deleted the lorenzoh/flux-0-13 branch October 21, 2022 17:44
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.

Update for Flux 0.13
2 participants