aai-institute / pyDVL

pyDVL is a library of stable implementations of algorithms for data valuation and influence function computation
https://pydvl.org
GNU Lesser General Public License v3.0
89 stars 9 forks source link

Use pytest-xdist #440

Closed mdbenito closed 9 months ago

mdbenito commented 9 months ago

Description

This PR makes our lives nicer by using pytest-xdist. We automagically set the number of pytest workers to avoid oversubscription by looking at num_workers (the number of parallel processes started within a test using a parallel backend)

Changes

Checklist

AnesBenmerzoug commented 9 months ago

This doesn't seem to improve the test runtime on CI. Is that expected?

mdbenito commented 9 months ago

This doesn't seem to improve the test runtime on CI. Is that expected?

For the record: yes, this only improves tests on machines with > 4 cores.