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

#15 and #4 is addressed here #25

Merged
merged 18 commits into from
Nov 23, 2023

Conversation

farhadrclass
Copy link
Collaborator

I had also updated the Flux and therefore some updates are due to that

New Flux Update
## v0.14.0 (July 2023)
* Flux now requires julia v1.9 or later.
* CUDA.jl is not a hard dependency anymore. Support is now provided through the extension mechanism, by loading `using Flux, CUDA`.
  The package cuDNN.jl also needs to be installed in the environment. (You will get instructions if this is missing.)
* After a deprecations cycle, the macro `@epochs` and the functions `Flux.stop`, `Flux.skip`, `Flux.zeros`, `Flux.ones` have been removed.
@farhadrclass
Copy link
Collaborator Author

@dpo, @d-monnet and @tmigot to review?

@farhadrclass
Copy link
Collaborator Author

It will error out since we needed to use Julia 1.9 for Flux
I believe we need to update the CI ?

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Hi @farhadrclass ! Thank you for the PR.
I would strongly recommend to open focused PR, in other words, more PRs but each with a simple focus. This way it is easier to review and approve :).
A start would be to open a first PR to update to Julia 1.9. Can you also explain a bit further why we drop 1.6?

Project.toml Outdated Show resolved Hide resolved
Co-authored-by: tmigot <[email protected]>
@farhadrclass
Copy link
Collaborator Author

Hi @tmigot

Thank you for the review.

The reason for combining the 4 and 15 bugs are that they are the same thing, one is asking to have unit test for different precision and the other one is mentioning that Float16 is not supported.

The reason we needed Julia 1.9+ is that we need Flux 13 and or 14th since they added support for changing parameters type on the run time and they require Julia 1.9 (Also Float16 is hardware supported :) )

Lastly I had a question on how to fix the errors we are getting for CI and Documentation ?

@tmigot
Copy link
Member

tmigot commented Nov 2, 2023

Hi @tmigot

Thank you for the review.

The reason for combining the 4 and 15 bugs are that they are the same thing, one is asking to have unit test for different precision and the other one is mentioning that Float16 is not supported.

The reason we needed Julia 1.9+ is that we need Flux 13 and or 14th since they added support for changing parameters type on the run time and they require Julia 1.9 (Also Float16 is hardware supported :) )

Lastly I had a question on how to fix the errors we are getting for CI and Documentation ?

Thanks for the additional explanations.
Still, I think you should first open a PR to drop Julia 1.6 (in the Project.toml and in all the config files) that will fix the CI thing.

@tmigot
Copy link
Member

tmigot commented Nov 2, 2023

The documentation fails because you drop support of Flux 0.13 while it is the version used for the doc https://github.com/JuliaSmoothOptimizers/FluxNLPModels.jl/blob/main/docs/Project.toml

@farhadrclass
Copy link
Collaborator Author

@tmigot I added a new PR #26 for Julia and flux update, once that resolve, I would rebase this

@farhadrclass
Copy link
Collaborator Author

@tmigot I rebased it and now waiting for it to run the CI

Let me know if anything
Also some notes on Zygote: due to some reason we need Zygote 0.6.6 since Flux is not using the most updated Zygote

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks @farhadrclass for the PR! I made a couple of comments.
Also, Please use git squash to maintain a clean history of commits in your branch.

test/runtests.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
src/FluxNLPModels_methods.jl Outdated Show resolved Hide resolved
src/FluxNLPModels_methods.jl Outdated Show resolved Hide resolved
src/FluxNLPModels_methods.jl Show resolved Hide resolved
src/FluxNLPModels_methods.jl Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
Project.toml Outdated Show resolved Hide resolved
example/MNIST_cnn.jl Outdated Show resolved Hide resolved
src/FluxNLPModels.jl Outdated Show resolved Hide resolved
@farhadrclass farhadrclass force-pushed the main branch 2 times, most recently from 5a51cbf to 20b3c7a Compare November 9, 2023 19:41
Update Project.toml

Update test/runtests.jl

Update src/utils.jl

Update src/FluxNLPModels_methods.jl

Update src/FluxNLPModels_methods.jl

Update example/MNIST_cnn.jl

updated based on Tangi's review

multiple dispatch added p1

Update runtests.jl

fixed an error in the code

Co-Authored-By: tmigot <[email protected]>
@farhadrclass
Copy link
Collaborator Author

@tmigot I added some multiple dispatch but not sure about all of them, what do you think

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks @farhadrclass for the changes, I added some new comments.

src/FluxNLPModels_methods.jl Show resolved Hide resolved
src/FluxNLPModels_methods.jl Outdated Show resolved Hide resolved
src/FluxNLPModels_methods.jl Outdated Show resolved Hide resolved
src/utils.jl Show resolved Hide resolved
src/FluxNLPModels_methods.jl Show resolved Hide resolved
added U for gradient since the gradient can be different than w and nlp.w type
@farhadrclass farhadrclass requested a review from tmigot November 23, 2023 18:34
@farhadrclass
Copy link
Collaborator Author

@tmigot I added your suggestions, except the multip-dispatch which I explained.
Once this is good to go we can start the other prs

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

I made 2 comments, so I approve once they are done. Can you also create an issue for the dispatch thing?

Project.toml Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
@farhadrclass farhadrclass merged commit ef8af7b into JuliaSmoothOptimizers:main Nov 23, 2023
9 checks passed
@tmigot
Copy link
Member

tmigot commented Nov 25, 2023

@farhadrclass please use ''squash and merge'' button so that we try to keep a clean history of commit (hère 18commits have been merged while it is only a small change)

@farhadrclass
Copy link
Collaborator Author

do you want me to do it now or in the future PR?

@farhadrclass
Copy link
Collaborator Author

I do not know how to do it after you merge btw @tmigot

@tmigot
Copy link
Member

tmigot commented Dec 16, 2023

I do not know how to do it after you merge btw @tmigot

This is done :). It is better to "squash and merge" to keep a clean history

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.

2 participants