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

Improve Pkg.resolve accuracy #21485

Merged
merged 3 commits into from
Apr 23, 2017
Merged

Improve Pkg.resolve accuracy #21485

merged 3 commits into from
Apr 23, 2017

Conversation

carlobaldassi
Copy link
Member

Reset the messages after each decimation. This helps avoiding some of the problems that were reported lately, in particular those at: https://discourse.julialang.org/t/differentialequations-pkg-wont-be-added

The idea is that resetting the messages makes the solver more accurate because it greatly mitigates the confounding effect of loops in the graph, since 1) the decimated variables are effectively like "cavities" in the graph, i.e. they break loops, and 2) the messages reset clears up all the spurious correlations.

In principle there may be a slight performance tradeoff, in practice it seems to me that it is basically as fast as before, and seems to solve all the problems that were reported.

The principle is sound, but thorough testing by somebody else is of course strongly encouraged.

Reset the messages after each decimation. This helps avoiding
some of the problems that were reported lately, in particular those at:
https://discourse.julialang.org/t/differentialequations-pkg-wont-be-added
@carlobaldassi carlobaldassi added the packages Package management and loading label Apr 22, 2017
@tkelman
Copy link
Contributor

tkelman commented Apr 22, 2017

Cool, glad there was a thread to pull on with this. Can the problematic requirements graphs be distilled in some way into a test case? Does the resolver lend itself to being unit-tested like that without needing full integration of the rest of Pkg?

@ChrisRackauckas
Copy link
Member

Could this geta v0.6 milestone? It seems that the resolver issues have become more widespread

Maybe #21430 is also fixed by this?

This is in order to catch resolver failures
inside `@test` calls
This is to catch a particularly hard case
for the resolver that was reported in
https://discourse.julialang.org/t/differentialequations-pkg-wont-be-added
@carlobaldassi
Copy link
Member Author

Can the problematic requirements graphs be distilled in some way into a test case? Does the resolver lend itself to being unit-tested like that without needing full integration of the rest of Pkg?

See the latest commit, that's the best I could do.

@timholy
Copy link
Member

timholy commented Apr 22, 2017

Thanks a million, @carlobaldassi.

To what extent is this backportable to 0.5?

@carlobaldassi
Copy link
Member Author

To what extent is this backportable to 0.5?

There should zero problems with that.

@tkelman
Copy link
Contributor

tkelman commented Apr 22, 2017

it may depend on #20598? will have to check

@carlobaldassi
Copy link
Member Author

it may depend on #20598?

They should be orthogonal.

@carlobaldassi
Copy link
Member Author

They should be orthogonal.

Well, except that I'm not sure if the new tests would pass without #20598.

@tkelman tkelman merged commit c6e0178 into master Apr 23, 2017
@tkelman tkelman deleted the cb/resolvemore branch April 23, 2017 07:06
tkelman pushed a commit that referenced this pull request May 3, 2017
Reset the messages after each decimation. This helps avoiding
some of the problems that were reported lately, in particular those at:
https://discourse.julialang.org/t/differentialequations-pkg-wont-be-added

(cherry picked from commit 5b32e44)
ref #21485
tkelman pushed a commit that referenced this pull request May 3, 2017
This is in order to catch resolver failures
inside `@test` calls

(cherry picked from commit 3eb7115)
ref #21485
tkelman pushed a commit that referenced this pull request May 3, 2017
This is to catch a particularly hard case
for the resolver that was reported in
https://discourse.julialang.org/t/differentialequations-pkg-wont-be-added

(cherry picked from commit bc9efec)
ref #21485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants