cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
79 stars 26 forks source link

schemes/toric/sheaf/klyachko.py failures #708

Closed strogdon closed 2 years ago

strogdon commented 2 years ago

When doctesting sage on s-o-g I have

sage -t --long --warn-long 91.5 --random-seed=278587269324126971363956904227629638856 /usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py
    [151 tests, 14.79 s]

When tested individually I have

sage -t --long --warn-long 91.4 --random-seed=194967010328380092288236333293077030743 /usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py
**********************************************************************
File "/usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py", line 951, in sage.schemes.toric.sheaf.klyachko.KlyachkoBundle_class.random_deformation
Failed example:
    Vtilde.cohomology(dim=True, weight=(0,))
Expected:
    (1, 0)
Got:
    (0, 0)
**********************************************************************
1 item had failures:
   1 of   7 in sage.schemes.toric.sheaf.klyachko.KlyachkoBundle_class.random_deformation
    [151 tests, 1 failure, 7.61 s]
----------------------------------------------------------------------
sage -t --long --warn-long 91.4 --random-seed=194967010328380092288236333293077030743 /usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py  # 1 doctest failed

On vanilla klyachko.py failes as above both when doctesting and when testing individually.

kiwifb commented 2 years ago

Is the value of the random seed important to the failure?

strogdon commented 2 years ago

I didn't think about that. Yes the random is important. s-o-g:

sage -t --long --warn-long 93.6 --random-seed=116387117327471072762755998268574349145 /usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py
    [151 tests, 7.32 s]
----------------------------------------------------------------------
All tests passed!

The random was selected automatically when doing

sage -t --long /usr/lib/python3.10/site-packages/sage/schemes/toric/sheaf/klyachko.py

On vanilla

./sage -t --long src/sage/schemes/toric/sheaf/klyachko.py

gives the random

sage -t --long --warn-long 93.7 --random-seed=281775733979582788190627516997358124138 src/sage/schemes/toric/sheaf/klyachko.py
    [151 tests, 7.21 s]
----------------------------------------------------------------------
All tests passed!

which of course passes.

kiwifb commented 2 years ago

Looks like you just found one the bugs the random seed stuff is supposed to catch. You should report it upstream.

strogdon commented 2 years ago

This is known (see https://trac.sagemath.org/ticket/32773) but with a different random-seed.