-
-
Notifications
You must be signed in to change notification settings - Fork 491
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 modular doctests ready for random seeds #29977
Comments
comment:1
I have a partial fix. After that at least the following need fixing
|
Dependencies: #29962 |
Commit: |
Branch: public/29977 |
comment:5
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Author: Jonathan Kliem |
Changed dependencies from #29962 to none |
comment:9
Continuing the discussion from #30801 comment:202 One way to get compiler independent output |
comment:10
That is actually a super easy fix. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
I came here from patchbots failure in |
comment:13
I don't know if it is stable. Dima decided to use sets for those, so I figured the order can be random. |
comment:14
@dimpase: Is there a reason you put the set around |
comment:15
I made these changes to fix failing doctests. And it seemed to work. I have no idea why it didn't work in the end |
comment:16
I bet that the ordering changed with Pari upgrade, but it might be stable for a given Pari release. |
comment:17
It's a problem of our api, I believe. |
comment:18
after pari 2.13 got positively reviewed, but not yet merged, a long coming #26635 got merged, and spoilt tests. So I tried to fix them. |
comment:20
Replying to @kliem:
Do you have some evidence that we have to sort the lists ? The problem with sorting is that examples are not easy to understand for users (usually not involved in doctesting). |
comment:21
Other than #30801 comment:206 I don't have any evidence.
If |
comment:22
on my machines, ironically, set() was stable. |
comment:23
Yes, it is stable within the machine, because apparently the hash is stable (the order of the hash to be precise). That is the pretty print order of a set, if On my patchbot it is stable, but the other way around. So the patchbot is down until this is fixed (the problem was the whole issue with |
Dependencies: #32124 |
comment:26
Replying to @sagetrac-tmonteil:
See comments #30801 comment:202 and following. Sorting by string does obscure the example a bit The following avoids sorting by string A more complicated example (higher weight and nontrivial central character)::
sage: f = Newforms(GammaH(25, [6]), 3, names='j')[0]; f
q + j0*q^2 + 1/3*j0^3*q^3 - 1/3*j0^2*q^4 + O(q^6)
sage: Pi = LocalComponent(f, 5)
- sage: set(Pi.characters())
- {Character of unramified extension Q_5(s)* (s^2 + 4*s + 2 = 0), of level 1, mapping s |--> 1/3*j0^2*d - 1/3*j0^3, 5 |--> 5,
- Character of unramified extension Q_5(s)* (s^2 + 4*s + 2 = 0), of level 1, mapping s |--> -1/3*j0^2*d, 5 |--> 5}
- sage: Pi.characters()[0].base_ring()
- Number Field in d with defining polynomial x^2 - j0*x + 1/3*j0^2 over its base field
+ sage: chars = Pi.characters()
+ sage: len(chars)
+ 2
+ sage: a, b = chars
+ sage: a.galois_conjugate() == b
+ True
+ sage: C = a.parent()
+ sage: C
+ Group of smooth characters
+ of unramified extension Q_5(s)* (s^2 + 4*s + 2 = 0)
+ with values in Number Field in d
+ with defining polynomial x^2 - j0*x + 1/3*j0^2 over its base field
+ sage: d = a.base_ring().gen()
+ sage: s = C.number_field().gen()
+ sage: j0 = a.base_ring().relative_polynomial().base_ring().gen()
+ sage: a(5) == b(5) == 5
+ True
+ sage: {a(s), b(s)} == {(1/3*j0^2*d - 1/3*j0^3), (-1/3*j0^2*d)}
+ True Another option would be to implement |
comment:27
is there a way to efficiently check that the characters in question are characters, and their set is exhaustive in some sense? anyhow the test for |
comment:28
I created #32134 for the My bet is that the order changed due to Pari upgrade, but it is constant for a given Pari version, hence we can use raw lists, not sets, nor sorting, nor cumbersome doctests. Could you please try that branch, and see if it passes for all of you. |
comment:29
did you try 32-bit as well as 64 bit? |
comment:30
Indeed I added this issue to the ticket here because I mistakenly figured it was connected to random seeds. Whatever makes this issue get a positive review quickest, is what I would prefer. So a seperate ticket sounds indeed fine. I agree with Dima that only because it passes on a few computers, it doesn't tell you anything about general stability. |
comment:31
Replying to @kliem:
What i am lookinkg for is whether there was an issue on a single computer when we use lists instead of sets (i could not find any evidence in the various discussions). Replying to @dimpase:
Unfortunately, i currently do not have any 32bit builder. Let us collect results of various builds on #32134. |
comment:32
If the behaviour depends on the architecture, we can use the |
comment:33
I much rather have some fix soon and a nice fix later. We only have 3 patchbots at the moment and 3 are down exclusively because of this issue (I suspect one more that also had some interrupt). |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:35
lgtm |
Reviewer: Dima Pasechnik |
comment:36
Thank you. |
comment:37
Setting this to blocker so that we can restart patchbots. |
Changed branch from public/29977 to |
This ticket makes
pass for different values
n
than just0
.Depends on #32124
CC: @dimpase
Component: doctest framework
Author: Jonathan Kliem
Branch/Commit:
a890c4d
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29977
The text was updated successfully, but these errors were encountered: