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

Deprecate One() #357

Merged
merged 9 commits into from
May 27, 2021
Merged

Deprecate One() #357

merged 9 commits into from
May 27, 2021

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented May 27, 2021

First step towards #354

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2021

Codecov Report

Merging #357 (08453d5) into master (d31fd5b) will decrease coverage by 3.39%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
- Coverage   90.03%   86.64%   -3.40%     
==========================================
  Files          14       13       -1     
  Lines         542      539       -3     
==========================================
- Hits          488      467      -21     
- Misses         54       72      +18     
Impacted Files Coverage Δ
src/differentials/one.jl 0.00% <0.00%> (-83.34%) ⬇️
src/rule_definition_tools.jl 96.85% <ø> (-0.05%) ⬇️
src/differential_arithmetic.jl 86.06% <0.00%> (-10.66%) ⬇️
src/ChainRulesCore.jl

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 d31fd5b...08453d5. Read the comment docs.

Copy link
Contributor

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

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

confused by one test, but otherwise LGTM

sy = @SVector [3, 4]

# Test that @scalar_rule and `One()` play nice together, w.r.t broadcasting
@inferred frule((ZeroTangent(), sx, sy), very_nice, 1, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this testing? it doesn't appear to be using One anywhere

Copy link
Member Author

@mzgubic mzgubic May 27, 2021

Choose a reason for hiding this comment

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

I think it is testing that One() * sx is type stable?

@@ -116,11 +116,11 @@ _second(t) = Base.tuple_type_head(Base.tuple_type_tail(t))

@test frule((nothing, nothing, 5.0), Core._apply, dummy_identity, 4.0) == (4.0, 5.0)

@testset "broadcasting One" begin
@testset "broadcasting true" begin
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this name and comments relate to the @inferred test here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we don't need this test anymore?

@oxinabox
Copy link
Member

Lets add a comment specificially about true to @scalar_rule

@mzgubic
Copy link
Member Author

mzgubic commented May 27, 2021

Lets add a comment specificially about true to @scalar_rule

Done, please suggest a rephrasing if you think it's unclear. Also, could you please check this thread? #357 (comment)

Co-authored-by: Lyndon White <oxinabox@ucc.asn.au>
@mzgubic mzgubic merged commit 8c9734b into master May 27, 2021
@mzgubic mzgubic deleted the mz/one branch May 27, 2021 20:34
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