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
Timeout in graphs/tutte_polynomial.py #21355
Comments
comment:1
may be related to #21289 |
comment:2
Note that the file doesn't even have long tests. For me still passes quickly in 7.4.beta0, but not beta2. (Don't have a beta1 at hand right now.) |
comment:3
Hmmm, the following takes a few seconds:
And afterwards this gives an immediate answer:
|
comment:4
The only test that follows doesn't take time either:
|
comment:5
With
after 300 seconds. |
comment:6
Much the same here. With verbose turned on the first
|
comment:7
Replying to @strogdon:
So which parts differ in your SoG installation? (The file itself by the way hasn't changed recently, AFAICT.) |
comment:8
Replying to @nexttime:
Corresponding lines from SoG:
Calculational times are tenths of a second. |
comment:9
Sure, I meant backends... (Not sure what's used at all.) |
comment:10
Ah, while there's not a single process actually doing something, I now see frequent calls of (So apparently it is continually looked up whether an optional backend is available / installed.) |
comment:11
Steve, do you have the |
comment:12
Replying to @kiwifb:
I was just going to copy you. No, I don't have |
comment:13
Replying to @nexttime:
Yep, I see this too. |
comment:14
from sage.misc.package import is_package_installed
if (algorithm == 'bliss' or # explicit request; or
(algorithm is None and # default choice
is_package_installed('bliss') and
not edge_labels)):
if edge_labels:
raise ValueError("bliss cannot be used when edge_labels is True")
try:
from sage.graphs.bliss import canonical_form
except ImportError:
raise ImportError("You must install the 'bliss' package to run this command.")
return canonical_form(self, partition, return_graph, certificate)
... Did they ever hear of caching results? (We could of course also mark all tests |
comment:15
Graphs are mutable, so we cannot cache the results in the graph. IIRC, the reason why we are getting a canonical labeling is so we can cache things for the Tutte polynomial. However, we could split out the check for existence of |
comment:16
Replying to @nexttime:
... together with the commit from #19213 leading to: def is_package_installed(package):
return any(p.split('-')[0] == package for p in installed_packages()) with def installed_packages():
from sage.env import SAGE_SPKG_INST
installed = dict(pkgname_split(pkgname) for pkgname in os.listdir(SAGE_SPKG_INST))
installed.update(pip_installed_packages()) ##### here 'pip' gets called #####
return installed and def pip_installed_packages():
proc = subprocess.Popen(["pip", "list"], stdout=subprocess.PIPE)
stdout = proc.communicate()[0]
return dict((name.lower(), version) for name,version in PIP_VERSION.findall(stdout)) |
comment:17
Stuff using |
comment:18
Replying to @tscrim:
That doesn't matter; whether specific backends are available could be cached in a "static" property (here presumably of While a package could perhaps get installed during runtime, it certainly won't (or shouldn'tTM) get removed while Sage is running. |
comment:19
Replying to @kiwifb:
Nothing is broken, it's just things have sloooooooooooooooooooooooooooooooooooooooooowed down. We have to adjust the timeouts accordingly, and mark more tests |
comment:20
Replying to @nexttime:
Ah, sorry, I misunderstood what you were asking to cache. Yes, I agree that we should cache the results of the existence of (optional) packages. We currently do this for |
comment:21
Please review #21289 |
comment:22
This should be solved by #21289, to be confirmed |
comment:23
OK, without #21289
and with #21289 I now get
So this seems to fix |
comment:24
so let us close this one |
comment:25
Fixed by #21289. |
This comment has been minimized.
This comment has been minimized.
Reviewer: Frédéric Chapoton, Steven Trogdon |
This fails randomly:
Fixed by #21289.
Component: graph theory
Keywords: random_fail
Reviewer: Frédéric Chapoton, Steven Trogdon
Issue created by migration from https://trac.sagemath.org/ticket/21355
The text was updated successfully, but these errors were encountered: