Skip to content

Run pytest tests in parallel for dm-haiku, optax, tensorflow-datasets, flax#166163

Merged
FRidh merged 4 commits intoNixOS:masterfrom
samuela:samuela/parallel-tests
Mar 30, 2022
Merged

Run pytest tests in parallel for dm-haiku, optax, tensorflow-datasets, flax#166163
FRidh merged 4 commits intoNixOS:masterfrom
samuela:samuela/parallel-tests

Conversation

@samuela
Copy link
Member

@samuela samuela commented Mar 29, 2022

Description of changes

My other 127 cores are lonely 😢

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@samuela samuela requested review from FRidh and jonringer as code owners March 29, 2022 00:46
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Mar 29, 2022
@samuela
Copy link
Member Author

samuela commented Mar 29, 2022

Result of nixpkgs-review pr 166163 run on x86_64-linux 1

2 packages failed to build:
  • python39Packages.elegy
  • python39Packages.treex
4 packages built:
  • python39Packages.dm-haiku
  • python39Packages.flax
  • python39Packages.optax
  • python39Packages.tensorflow-datasets

@samuela
Copy link
Member Author

samuela commented Mar 29, 2022

elegy and treex are pre-existing failures but will be fixed by #166167

@ofborg ofborg bot requested a review from ndl March 29, 2022 00:58
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 29, 2022
@FRidh
Copy link
Member

FRidh commented Mar 29, 2022

It should use $NIX_BUILD_CORES instead of auto.

We may also add a setup hook to pytest-xdist that sets this, as long as it is possible to disable it again as well.

@samuela samuela force-pushed the samuela/parallel-tests branch from 898d29f to b9fd2f5 Compare March 29, 2022 18:14
@samuela
Copy link
Member Author

samuela commented Mar 29, 2022

It should use $NIX_BUILD_CORES instead of auto.

Ok, fixed in the latest series of commits!

@SuperSandro2000
Copy link
Member

We may also add a setup hook to pytest-xdist that sets this, as long as it is possible to disable it again as well.

Yeah, really. This is often done wrong or forgotten.

@samuela
Copy link
Member Author

samuela commented Mar 30, 2022

Yeah, really. This is often done wrong or forgotten.

This sounds like a good idea. A quick search turned up 41 files that contain "pytest-xdist" but not "pytestFlagsArray":

  • pkgs/development/python-modules/extractcode/default.nix
  • pkgs/development/python-modules/scipy/default.nix
  • pkgs/development/python-modules/ansible-runner/default.nix
  • pkgs/development/python-modules/typer/default.nix
  • pkgs/applications/audio/quodlibet/default.nix
  • pkgs/development/python-modules/pytest-django/default.nix
  • pkgs/development/tools/misc/gef/default.nix
  • pkgs/top-level/python2-packages.nix
  • pkgs/development/python-modules/django-oauth-toolkit/default.nix
  • pkgs/development/python-modules/pip-tools/default.nix
  • pkgs/development/python-modules/nipype/default.nix
  • pkgs/development/python-modules/ocrmypdf/default.nix
  • pkgs/development/python-modules/mitmproxy/default.nix
  • pkgs/top-level/python-packages.nix
  • pkgs/development/python-modules/commoncode/default.nix
  • pkgs/development/python-modules/lazy_import/default.nix
  • pkgs/development/python-modules/apache-beam/default.nix
  • pkgs/development/python-modules/wandb/default.nix
  • pkgs/development/python2-modules/hypothesis/default.nix
  • pkgs/development/python-modules/aria2p/default.nix
  • pkgs/development/python-modules/requests/default.nix
  • pkgs/tools/admin/awscli2/default.nix
  • pkgs/development/python2-modules/pytest-xdist/default.nix
  • pkgs/applications/science/misc/cwltool/default.nix
  • pkgs/applications/graphics/dosage/default.nix
  • pkgs/development/compilers/vyper/default.nix
  • pkgs/development/tools/analysis/checkov/default.nix
  • pkgs/development/python-modules/pyppeteer/default.nix
  • pkgs/development/python-modules/typecode/default.nix
  • pkgs/development/python-modules/dyn/default.nix
  • pkgs/top-level/python-aliases.nix
  • pkgs/development/python-modules/pikepdf/default.nix
  • pkgs/tools/security/cve-bin-tool/default.nix
  • pkgs/development/python-modules/pytest-order/default.nix
  • pkgs/development/python-modules/keras/default.nix
  • pkgs/development/python-modules/psautohint/default.nix
  • pkgs/development/python-modules/pytest-json-report/default.nix
  • pkgs/development/python-modules/plugincode/default.nix
  • pkgs/tools/admin/lexicon/default.nix
  • pkgs/development/python-modules/pytest-xdist/default.nix
  • pkgs/development/python-modules/librouteros/default.nix

@samuela
Copy link
Member Author

samuela commented Mar 30, 2022

I'll go ahead and merge tomorrow unless anyone objects

@FRidh FRidh merged commit b2635c2 into NixOS:master Mar 30, 2022
@samuela samuela deleted the samuela/parallel-tests branch March 30, 2022 20:01
@SuperSandro2000
Copy link
Member

This sounds like a good idea. A quick search turned up 41 files that contain "pytest-xdist" but not "pytestFlagsArray":

We get a setupHook for it so we don't need to track those down anymore.

@samuela
Copy link
Member Author

samuela commented Mar 31, 2022

We get a setupHook for it so we don't need to track those down anymore.

Meaning we don't need to specify pytestFlagsArray manually anymore?

@SuperSandro2000
Copy link
Member

Yes, #166486

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

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments