-
Notifications
You must be signed in to change notification settings - Fork 4
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
Pytest extension hangs forever after initialization #113
Comments
@art049 @adriencaccia maybe? |
Hey @frgfm, can you try marking only a single test as a benchmark, the fastest one to execute preferably? That way we can make sure that it does work with a simple benchmark. In CodSpeed, each benchmark is executed only once and the CPU behavior will be simulated, and that simulation is quite expensive, so long-running benchmarks can take a lot of time on the GitHub runner. If it works in a reasonable amount of time for a simple benchmark, my advice is then to try and:
|
Hey @adriencaccia, I've just tried, narrowing it down on only a single test with the decorator and one of the fastest. So the problem is that this single test took 5min while my whole pytest suite for coverage took 1minute to run. Any suggestion on how to improve that? 5min would be my longest CI job, and the corresponding decorated test is not the most useful to benchmark. Have you seen people using Codspeed on PyTorch? (perhaps for some reasons, some of the dependencies aren't fairing well on your runners? 🤷♂️ ) PS: to be more specific, the CI step of the action takes 5min but the GH app reports that the single test takes 2s. So I imagine this is run multiple times but I don't understand how that bumps to 5min of execution |
The Each benchmark is run once with the instrumentation, which adds some overhead. Hence for "macro-benchmarks" (benchmarks that take ~1s or more) the execution time with the CodSpeed instrumentation can take several minutes. If that test is not that useful to benchmark, I would recommend skipping it in favor of other smaller more relevant benchmarks. |
Hey there 👋
Thanks for the great work!
I recently tried to add Codspeed to a project of mine following the tutorial on the documentation. Unfortunately, even though I followed the tutorial, the job step times out.
Here is the PR frgfm/torch-cam#270 and the failed job I just canceled to avoid eating all my CI minutes https://github.com/frgfm/torch-cam/actions/runs/10514500036/job/29132464450?pr=270
Mostly, the edits that I did:
GitHub workflow
and adding
@pytest.mark.benchmark
on a few tests that I run for coverage in another job.Any hint on why this times out? 🙏
The text was updated successfully, but these errors were encountered: