Skip to content

Add some missing "long time" annotations #40414

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

orlitzky
Copy link
Contributor

Fix a few CI warnings by adding # long time, and speed up one test by limiting the number of examples to a random subset.

orlitzky added 7 commits July 14, 2025 17:57
Fix the CI warning,

  2025-07-14T18:34:32.9505595Z ##[warning]slow doctest:
  2025-07-14T18:34:32.9523476Z     f.Lattes_to_curve(check_lattes=true)
  2025-07-14T18:34:32.9525823Z Test ran for 16.48s cpu, 16.65s wall

by adding "# long time" to this test.
Fix the CI warnings,

  2025-07-14T18:26:34.0468072Z ##[warning]slow doctest:
  2025-07-14T18:26:34.0476899Z     spherical.plot(cartesian, color={r:'red', th:'green', ph:'orange'})
  2025-07-14T18:26:34.0478151Z Test ran for 5.28s cpu, 5.37s wall

  2025-07-14T18:26:51.7069355Z ##[warning]slow doctest:
  2025-07-14T18:26:51.7074158Z     Du = laplacian(u)
  2025-07-14T18:26:51.7078276Z Test ran for 7.21s cpu, 7.28s wall

by adding "# long time" to these tests.
Fix the CI warnings,

  2025-07-14T18:37:47.9759323Z ##[warning]slow doctest:
  2025-07-14T18:37:47.9761301Z     test(interacts.calculus.function_tool)
  2025-07-14T18:37:47.9777019Z Test ran for 5.54s cpu, 6.28s wall

  2025-07-14T18:37:55.5143193Z ##[warning]slow doctest:
  2025-07-14T18:37:55.5169150Z     test(interacts.fractals.mandelbrot)
  2025-07-14T18:37:55.5169618Z Test ran for 5.78s cpu, 7.53s wall

  2025-07-14T18:38:02.1158079Z ##[warning]slow doctest:
  2025-07-14T18:38:02.1159474Z     test(interacts.fractals.julia)
  2025-07-14T18:38:02.1159994Z Test ran for 6.21s cpu, 6.60s wall

  2025-07-14T18:38:14.6948348Z ##[warning]slow doctest:
  2025-07-14T18:38:14.6950545Z     test(interacts.geometry.special_points)
  2025-07-14T18:38:14.6951067Z Test ran for 6.04s cpu, 6.08s wall

by adding "# long time" to these tests.
Fix the CI warning,

  2025-07-14T18:32:50.5528101Z ##[warning]slow doctest:
  2025-07-14T18:32:50.5529322Z     for la in Partitions(SGA.n):
  2025-07-14T18:32:50.5529772Z         idem = SGA.ladder_idempotent(la)
  2025-07-14T18:32:50.5530453Z         assert idem^2 == idem
  2025-07-14T18:32:50.5530907Z         print(la, SGA.principal_ideal(idem).dimension())
  2025-07-14T18:32:50.5531396Z Test ran for 5.81s cpu, 5.89s wall

by adding "# long time" to this test.
Fix the CI warnings,

  2025-07-14T18:33:42.3293571Z ##[warning]slow doctest:
  2025-07-14T18:33:42.3294863Z     W.join()  # Wait for worker to finish
  2025-07-14T18:33:42.3295367Z Test ran for 12.99s cpu, 16.77s wall

  2025-07-14T18:33:58.2926836Z ##[warning]slow doctest:
  2025-07-14T18:33:58.2928161Z     W.join()  # Wait for worker to finish
  2025-07-14T18:33:58.2928647Z Test ran for 13.04s cpu, 15.61s wall

  2025-07-14T18:34:13.9622114Z ##[warning]slow doctest:
  2025-07-14T18:34:13.9635400Z     W.join()
  2025-07-14T18:34:13.9639916Z Test ran for 12.89s cpu, 0.03s wall

  2025-07-14T18:34:29.4681581Z ##[warning]slow doctest:
  2025-07-14T18:34:29.4684229Z     W.join()
  2025-07-14T18:34:29.4684558Z Test ran for 12.97s cpu, 15.48s wall

by adding "# long time" to these tests.
Fix the CI warning,

  2025-07-14T18:36:48.3245070Z ##[warning]slow doctest:
  2025-07-14T18:36:48.3247224Z     hypergraphs.BinomialRandomUniform(50, 3, 1).num_blocks()              # needs numpy
  2025-07-14T18:36:48.3247979Z Test ran for 5.01s cpu, 5.01s wall

by adding "# long time" to this test.
Fix the CI warning,

  2025-07-14T18:38:36.5676939Z ##[warning]slow doctest:
  2025-07-14T18:38:36.5679618Z     all(SmallPermutationGroup(n,k).id() == [n,k]
  2025-07-14T18:38:36.5681631Z         for n in [1..64] for k in [1..numgps(n)])  # long time (180s)
  2025-07-14T18:38:36.5683632Z Test ran for 67.66s cpu, 71.13s wall

by making two few improvements:

  * Move the "long time" tag to the right line.
  * Check only a random subset of (up to five) n and k, rather than
    n <= 64 and all possible k.
@user202729
Copy link
Contributor

There's a slightly confusing aspect that some # long time are actually short but has a dependency on another long time test, but out of scope here.

@orlitzky
Copy link
Contributor Author

Yeah, on the one hand it would be nice if the examples were self-contained. When they are, putting a single sage: # long time at the beginning of the block indicates that the entire thing takes a long time. And for readers, it's helpful if they don't have to dig through previous examples to run the one they want. But on the other hand, redefining everything in each example slows the overall runtime.

My home machine is slower than the CI, and it's amusing to note that constructing (almost) the simplest example of a differentiable manifold takes 13s cpu,

sage: %timeit -c -n1 -r1 E.<x,y> = EuclideanSpace()
13.1 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

meaning that the entire file using it would need to be marked "long time." In this case the performance is borderline buggy though so I'm not mad I caught it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy