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

Make tests pass on 1.8 #1125

Merged
merged 3 commits into from
Nov 25, 2021
Merged

Make tests pass on 1.8 #1125

merged 3 commits into from
Nov 25, 2021

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Nov 25, 2021

Previously, sum(::Tuple) had check_inferred=false but NamedTuple did not. Now both do. That was the one failing test.

But some other tests marked check_inferred=false no longer need that. So perhaps it's a wash.

Closes #1066

@mcabbott mcabbott requested a review from oxinabox November 25, 2021 05:23
Comment on lines 270 to 272
# broken because Zygoye compresses `(NoTangent(), NoTangent())` into just NoTangent()
# which ChainRulesTestUtils does not think is valid:
@test_broken(rrule_via_ad(ZygoteRuleConfig(), round, 2.2) isa Tuple{NoTangent,NoTangent})
Copy link
Collaborator

@mzgubic mzgubic Nov 25, 2021

Choose a reason for hiding this comment

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

The comment would be correct if

Suggested change
# broken because Zygoye compresses `(NoTangent(), NoTangent())` into just NoTangent()
# which ChainRulesTestUtils does not think is valid:
@test_broken(rrule_via_ad(ZygoteRuleConfig(), round, 2.2) isa Tuple{NoTangent,NoTangent})
# broken because Zygoye compresses `(NoTangent(), NoTangent())` into just NoTangent()
# which ChainRulesTestUtils does not think is valid:
@test_broken(rrule_via_ad(ZygoteRuleConfig(), round, 2.2)[2](1) isa Tuple{NoTangent,NoTangent})

but the rrule should return a y, pb.

In fact it looks fine below, though the rule should probably return ZeroTangent() instead. (Not NoTangent() since we definitely can perturb the input)

(I think we should probably just delete this line?)

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I've deleted it. I was just a bit puzzled by whether this was broken at some point.

Comment on lines 273 to 275
# Later: That makes no sense, would always be broken. If you call the pullback,
# then right now Zygote agrees with the rrule, but gives 0.0 not NoTangent:
rrule_via_ad(ZygoteRuleConfig(), round, 2.2)[2](1) == (NoTangent(), 0.0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

doesn't this just use the rrule under the hood anyway?

@mcabbott mcabbott merged commit 0d80a08 into FluxML:master Nov 25, 2021
@mcabbott mcabbott deleted the cr_tests_1.8 branch November 25, 2021 19:20
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.

Zygote broken on nightly
2 participants