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

Massive update #90

Merged
merged 102 commits into from
Mar 21, 2023
Merged

Massive update #90

merged 102 commits into from
Mar 21, 2023

Conversation

theogf
Copy link
Member

@theogf theogf commented Nov 8, 2022

This:

  • update the compats
  • make Julia minimum version 1.6
  • Update docs/Manifest
  • Replace ZygoteRules by ChainRulesCore.rrule
  • Update the Github workflows

This PR does not solve the type instabilities and allocations arising from the updates of other packages. These performance problems will be moved into issues of their own to be tackled separately while the rest of the package can be updated and improved.

News!

This ended up being bigger than all of us.

So updated things were:

  • Partially replacing adjoint_test with test_rrule (with some additional syntax wrappers)
  • Replacing all @adjoint with rrules
  • Adapting to the new AbstractGPs interface (mostly change of order of parameters)
  • Some cleaning up and unification of test interfaces.
    The bad things were:
  • Some of the type inference checks are ignored (right now controlled with global flags in runtests.jl
  • Some tests are just failing and I don't know how to fix them, they are tagged with TODO and I plan to open Github issues to resolve them
  • Not everything is under a unified interface yet (in the tests). This would take a lot of time, that I don't currently have

@willtebbutt
Copy link
Member

@theogf I'm basically happy with this PR. Is there much else that you want to do, or are you keen to get it merged?

@theogf
Copy link
Member Author

theogf commented Mar 15, 2023

@theogf I'm basically happy with this PR. Is there much else that you want to do, or are you keen to get it merged?

There is still one issue I am trying to resolve (notice that test models-lgssm is failing).
It seems that the tangent for the marginals on Reverse mode are not working..

[EDIT:] It should be fixed now.

@theogf theogf mentioned this pull request Mar 15, 2023
@theogf
Copy link
Member Author

theogf commented Mar 15, 2023

@theogf I'm basically happy with this PR. Is there much else that you want to do, or are you keen to get it merged?

There is still one issue I am trying to resolve (notice that test models-lgssm is failing). It seems that the tangent for the marginals on Reverse mode are not working..

[EDIT:] It should be fixed now.

Nevermind my fix was not a fix... The problem is that a NoTangent is received when it should not be there...
I will try to check this later this week.

@simsurace
Copy link
Member

Maybe we could merge the CompatHelper PRs as well before tagging the release?

@theogf
Copy link
Member Author

theogf commented Mar 16, 2023

Maybe we could merge the CompatHelper PRs as well before tagging the release?

I already updated the bounds in this MR. The CompatHelper PRs can be closed once this is in.

@theogf
Copy link
Member Author

theogf commented Mar 21, 2023

Ok I found the issue.
When using the interface like rand, logpdf or marginals, we get rid of the state from scan_emit. test_rrule just builds a NoTangent which creates errors downstream.

I partially fixed it by calling scan_emit explicitely. However rand is still a problem as ChainRulesTestUtils has some issues with AbstractRNG objects it seems.

@theogf
Copy link
Member Author

theogf commented Mar 21, 2023

The new error comes from a change in FillArrays, I will try to figure out what's happening.

@theogf
Copy link
Member Author

theogf commented Mar 21, 2023

The new error comes from a change in FillArrays, I will try to figure out what's happening.

This is an issue that has to do with FillArrays, opened one here and fixed the compat for now

@theogf
Copy link
Member Author

theogf commented Mar 21, 2023

I had to remove the tests for the invariant LGSSM, I will add an issue to add them back.

@coveralls
Copy link

coveralls commented Mar 21, 2023

Pull Request Test Coverage Report for Build 4480292273

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 241 of 354 (68.08%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on tgf/clean-up at 87.394%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/models/linear_gaussian_conditionals.jl 6 7 85.71%
src/models/missings.jl 9 10 90.0%
src/util/scan.jl 29 33 87.88%
src/util/chainrules.jl 104 211 49.29%
Totals Coverage Status
Change from base Build 2238706956: 87.4%
Covered Lines: 1241
Relevant Lines: 1420

💛 - Coveralls

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

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

I'm approving in order to get out of your way @theogf , as it looks like this is in a good place now

@theogf theogf merged commit 1922596 into master Mar 21, 2023
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