-
Notifications
You must be signed in to change notification settings - Fork 133
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/ToricVarieties: fix+improve test for Stanley Reisner ideal #1086
Conversation
@benlorenz Thank you for spotting this. Unfortunately, your changes only conceal the real issue. Let me explain. One of the important points of #939 was to speed up the computation of Stanley-Reisner ideals of toric varieties. The example that you are referring to was put forward by @micjoswig in #932. Back then, it took about 5 minutes and the runtime dropped to just a few seconds with the changes in #939. My guess is therefore that one of the more recent changes to In fact, there is (at least a bit of) principle to the "madness" of this example. Namely, another crucial part of #939 was to allow for different coefficient rings. So besides computing the Stanley-Reisner ideal for a massive variety, I wanted to do it over a ring different from The variety in question is constructed randomly. Even with the seed inserted (as you suggested at the time), I found that two runs gave different numbers of generators. (That was at least true when I added this example. I cannot test this right now.) So instead of just running the code, or checking something almost trivial (such as if there is at least one generator), I decided to compare the result with the default method in toric varieties. These two methods must provide the same answer, except for different coefficient rings. Therefore, this became in my humble opinion a much more interesting test. Long story short: Please do not merge these changes. The real issue is (in my humble opinion) a rather different one and these changes just conceal it. |
…r the minimal non-faces
098436c
to
0a4176e
Compare
This was caused by polymake choosing a different algorithm depending on what other properties are already present in the object, in this case a call to
I cannot reproduce that and it really should not happen since all the algorithms are fully deterministic. Lets see if the CI does reproduce the same value that I put in the testcase now.
I don't really see where this would call different methods, for both varieties this will run the same code for the minimal non-faces from polymake and store these as generators for the ideal. Only the rings for these generators will be different but that should not affect the number of generators?
It was explicitly marked as a draft and now contains a completely different changeset. Edit:
macOS CI:
Please note that this time includes multiple calls and some preparation so it is not comparable with the 0.12 seconds, and not the time limited by those 10 seconds. |
Thank you for investigating @benlorenz. This sounds great! Since the "random part" (probably I did a mistake back then) is now deterministic, I agree that only one Stanley-Reisner computation for this big variety is sufficient. I would suggest to keep the one with |
…d value with the seed in the input this value should be stable remove second testcase since the code is deterministic
0a4176e
to
4afe23a
Compare
@HereAround
cc: @lkastner
Currently:
Linux CI (nightly):
macOS CI (nightly):
This PR should bring that down to probably a few seconds.
Also I don't really understand the point of this testcase, especially why is it running the the (fully deterministic) algorithm twice on the same input? The same wrong result would also be accepted by that test, maybe there is some other invariant of the ideal that could be precomputed and used for the test, maybe for some simpler example?
Oscar.jl/test/ToricVarieties/runtests.jl
Lines 202 to 209 in 9229804
Edit: With this PR:
Linux:
macOS: