-
Notifications
You must be signed in to change notification settings - Fork 219
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
Test Enzyme and reexport ADTypes.AutoEnzyme
#1887
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 11521373400Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1887 +/- ##
===========================================
- Coverage 86.39% 44.52% -41.88%
===========================================
Files 22 22
Lines 1573 1552 -21
===========================================
- Hits 1359 691 -668
- Misses 214 861 +647 ☔ View full report in Codecov by Sentry. |
Also if you want to disable the warnings you can set it like so (https://github.com/EnzymeAD/Enzyme.jl/blob/c29e6119c7963ddb22f1363726f762455748e193/src/api.jl#L414
|
You also may want to set the version to 0.11.2 since your CI currently is running at 0.11.0 ( |
@devmotion this PR (EnzymeAD/Enzyme.jl#914) should fix the immediate issues you see on CI if you want to try. |
Yes, it is a good idea to separate Enzyme tests into a separate CI task. We should consider doing the same for all tested autodiff backends. In addition, we can reduce CI time by testing gradient correctness only (see #2307). Also, testing a small, carefully chosen set of Turing models on Enzyme's CI suite is very helpful, too. |
bumping this. having tests is generally a good thing (and will prevent breakages in the future), and this PR does nothing different from how existing AD packages function. Totally up to you if you want to refactor how AD backend testing works, but that can be a follow up PR. |
@mhauru, can you adapt the following distributions and Turing test suite to help create an integration test PR for Enzyme?
These integration tests could supersede TuringLang/DistributionsAD.jl#254. |
A PR for adding Turing integration tests to Enzyme: EnzymeAD/Enzyme.jl#1813 Related issues that came up while making that: |
I think that PR requires this to be landed first. Integration testing
requires the downstream package to also include relevant CI to ensure any
API changes it makes doesn't introduce breakage, so we can make sure that
any changes on our end don't break you (rather than your package had an
issue). In other words both packages working together to prevent breakage :)
Relatedly we're about to drop before 1.10 so this PR should likely be
modified to only test 1.10+
Once this lands I'll review the downstream CI one on Enzyme.jl
…On Thu, Sep 12, 2024, 7:22 AM Markus Hauru ***@***.***> wrote:
A PR for adding Turing integration tests to Enzyme:
EnzymeAD/Enzyme.jl#1813 <EnzymeAD/Enzyme.jl#1813>
Related issues that came up while making that:
- EnzymeAD/Enzyme.jl#1812
<EnzymeAD/Enzyme.jl#1812>
- EnzymeAD/Enzyme.jl#1811
<EnzymeAD/Enzyme.jl#1811>
- EnzymeAD/Enzyme.jl#1807
<EnzymeAD/Enzyme.jl#1807>
—
Reply to this email directly, view it on GitHub
<#1887 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXFO2N56HPETSRLWNCLZWF2N3AVCNFSM6AAAAAAQXUOLRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWGAZDEMZUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Merging this before/at the same time as Enzyme's Turing CI makes sense. However, I think we need EnzymeAD/Enzyme.jl#1811 and EnzymeAD/Enzyme.jl#1812 fixed before merging this. I'm surprised that the Turing test suite didn't catch them, need to investigate why, maybe add some tests here. |
|
||
using AdvancedPS: AdvancedPS | ||
|
||
include("container.jl") | ||
|
||
export @model, | ||
@varname, | ||
AutoEnzyme, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's export this as Turing.Experimental.AutoEnzyme
until Enzyme becomes more stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the threshold for being considered stable here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhauru and @penelopeysm probably have a lot more experience on this.
My heuristic threshold:
- Enzyme passes all Distributions.jl and Turing.jl tests
- No known segfaults for Enzyme
for a continuous period of 8 weeks.
I've merged the latest master and upgraded to Enzyme v0.12. We are still being held back from v0.13 by Bijectors.jl. There are a number of new test failures, because
Getting Bijectors.jl to support Enzyme v0.13 I think has to be the next step, because otherwise any of the failures we see here might already be fixed on v0.13, and thus minimising and reporting them is pointless. |
gentle bump here |
It would be good to address EnzymeAD/Enzyme.jl#1812, #2307 and TuringLang/Bijectors.jl#341 before merging this PR. |
TuringLang/Bijectors.jl#341 at the very least needs addressing, because it's currently holding us back from running a recent Enzyme version here, and thus we don't know if the test suite would pass on a recent version. TuringLang/Bijectors.jl#341 passes tests on 1.10, but on 1.11 the Enzyme tests fail because of the accursed extension load order issue. The fix for that is currently waiting on this one: TuringLang/Bijectors.jl#346 EDIT and consequently this: TuringLang/Bijectors.jl#349 |
With the bijectors fix landed, I suppose this is (again) ready to go? |
separately @yebai you appear to have removedd my permissions to run tests, if that can be restored |
Note: This does not work yet
I opened this PR to make it easier to debug (and possibly fix) issues with Enzyme.
Currently, the following example does
notwork (note that the snippet does not require the PR which solely reexportsAutoEnzyme
at this point):With Enzyme#main my Julia (1.8.1) segfaults. An incomplete (it filled my whole terminal) output: https://gist.github.com/devmotion/1352197f2354c6fecddd7b778ec4bcf7#file-log-txtThe example works (latest releases of Turing, Enzyme, and ADTypes on Julia 1.10.0) but the following warnings show up: