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

Upgrade warnings for v0.13 #1926

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Upgrade warnings for v0.13 #1926

merged 1 commit into from
Apr 4, 2022

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Apr 3, 2022

Options for v0.12 deprecations are:

  • do nothing, leave things working
  • make them louder, so the message is printed always not just in tests
  • turn them into errors, now that there has been time to update.

Thoughts on which to do, where?

@codecov-commenter
Copy link

Codecov Report

Merging #1926 (8deca0a) into master (ed78e8a) will increase coverage by 0.05%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #1926      +/-   ##
==========================================
+ Coverage   86.57%   86.63%   +0.05%     
==========================================
  Files          18       18              
  Lines        1445     1444       -1     
==========================================
  Hits         1251     1251              
+ Misses        194      193       -1     
Impacted Files Coverage Δ
src/deprecations.jl 34.61% <0.00%> (ø)
src/losses/utils.jl 92.85% <100.00%> (+6.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed78e8a...8deca0a. Read the comment docs.

end
size(ŷ,d) == size(y,d) || throw(DimensionMismatch(
"loss function expects size(ŷ) = $(size(ŷ)) to match size(y) = $(size(y))"
))
end
end
_check_sizes(ŷ, y) = nothing # pass-through, for constant label e.g. y = 1
Copy link
Member Author

Choose a reason for hiding this comment

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

I still wonder if this should go further, BTW, and forbid comparing things which aren't arrays. Things like this:

https://stackoverflow.com/questions/71540612/no-decrease-in-loss-after-lots-traning

@darsnack
Copy link
Member

darsnack commented Apr 3, 2022

I would just make them as loud as possible without an error. I feel that the more time you give to update, the less people can complain when they are finally forced to do it. The current set of warnings is just a simple naming issue, there is not reason to force anyone's hand. Something that we decide is plain wrong is candidate for error ASAP.

@mcabbott
Copy link
Member Author

mcabbott commented Apr 4, 2022

Happy with the levels here? Flux.ones should now print a warning every time. And loss functions with mismatched sizes will error.

@mcabbott mcabbott merged commit 6405ab3 into FluxML:master Apr 4, 2022
@mcabbott mcabbott deleted the warn_error branch April 4, 2022 04:14
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.

4 participants