Skip to content

python3Packages.compressai: disable tests that hang pytest on Darwin#422812

Merged
GaetanLepage merged 1 commit intoNixOS:masterfrom
sarahec:compressai-flaky-test
Jul 6, 2025
Merged

python3Packages.compressai: disable tests that hang pytest on Darwin#422812
GaetanLepage merged 1 commit intoNixOS:masterfrom
sarahec:compressai-flaky-test

Conversation

@sarahec
Copy link
Contributor

@sarahec sarahec commented Jul 5, 2025

Two files cause pytest to hang after all the tests have been run: tests/test_eval_model.py and tests/test_train.py

Disabled on Darwin, confirmed this isn't needed on Linux.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (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
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jul 5, 2025
@sarahec sarahec requested a review from GaetanLepage July 5, 2025 23:29
These tests hang pytest after all the tests have been run.
@sarahec sarahec force-pushed the compressai-flaky-test branch from fcfce47 to abcaf7c Compare July 5, 2025 23:31
@nixpkgs-ci nixpkgs-ci bot added 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Jul 5, 2025
@sarahec
Copy link
Contributor Author

sarahec commented Jul 6, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 422812
Commit: abcaf7ce4df2344bc5732c4d6d223b4101c9964c


aarch64-darwin

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

@sarahec
Copy link
Contributor Author

sarahec commented Jul 6, 2025

@GaetanLepage this one is good to go.

@sarahec sarahec changed the title python3Packages.compress: disable tests that hang pytest on Darwin python3Packages.compressai: disable tests that hang pytest on Darwin Jul 6, 2025
@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 422812

Logs: https://github.com/GaetanLepage/nixpkgs-review-gha/actions/runs/16098381206


x86_64-linux (sandbox = true)

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

aarch64-linux (sandbox = true)

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

x86_64-darwin (sandbox = true)

❌ 2 packages failed to build:
  • python312Packages.compressai
  • python312Packages.compressai.dist
✅ 2 packages built:
  • python313Packages.compressai
  • python313Packages.compressai.dist

Error logs: `x86_64-darwin`
python312Packages.compressai
    rc = osapipe.close()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <os._wrap_close object at 0x1423da600>

???
E BrokenPipeError: [Errno 32] Broken pipe

:1040: BrokenPipeError
----------------------------- Captured stderr call -----------------------------
/nix/store/bzk59iv9qh7p5zi6r3j4cdgws61ggwij-bash-5.2p37/bin/sh: line 1: osascript: command not found
=============================== warnings summary ===============================
../../../../nix/store/8f6p15bbb88dma2wdbjcjc6nsg7zkl5y-python3.12-compressai-1.2.6/lib/python3.12/site-packages/compressai/models/video/google.py:353
/nix/store/8f6p15bbb88dma2wdbjcjc6nsg7zkl5y-python3.12-compressai-1.2.6/lib/python3.12/site-packages/compressai/models/video/google.py:353: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
@amp.autocast(enabled=False)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_plot.py::test_plot[plotly-ms-ssim-rgb] - BrokenPipeError: [Errno 32] Broken pipe
= 1 failed, 137 passed, 4 skipped, 45 deselected, 1 warning in 60.81s (0:01:00) =


aarch64-darwin (sandbox = true)

❌ 2 packages failed to build:
  • python313Packages.compressai
  • python313Packages.compressai.dist
✅ 2 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist

Error logs: `aarch64-darwin`
python313Packages.compressai
self = 

???
E BrokenPipeError: [Errno 32] Broken pipe

:1042: BrokenPipeError
----------------------------- Captured stderr call -----------------------------
/nix/store/nravshvfviv75plf26nwfwzg8ldl3z8s-bash-5.2p37/bin/sh: line 1: osascript: command not found
/nix/store/nravshvfviv75plf26nwfwzg8ldl3z8s-bash-5.2p37/bin/sh: line 1: osascript: command not found
=============================== warnings summary ===============================
../../../../nix/store/grsgvnnqkiysi3hn9rjj2inlpwjfxiac-python3.13-compressai-1.2.6/lib/python3.13/site-packages/compressai/models/video/google.py:353
/nix/store/grsgvnnqkiysi3hn9rjj2inlpwjfxiac-python3.13-compressai-1.2.6/lib/python3.13/site-packages/compressai/models/video/google.py:353: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.
@amp.autocast(enabled=False)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_plot.py::test_plot[plotly-psnr] - BrokenPipeError: [Errno 32] Broken pipe
FAILED tests/test_plot.py::test_plot[plotly-psnr-rgb] - BrokenPipeError: [Errno 32] Broken pipe
===== 2 failed, 136 passed, 4 skipped, 45 deselected, 1 warning in 15.49s ======

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 422812
Commit: abcaf7ce4df2344bc5732c4d6d223b4101c9964c


x86_64-linux

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

aarch64-linux

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

x86_64-darwin

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

aarch64-darwin

✅ 4 packages built:
  • python312Packages.compressai
  • python312Packages.compressai.dist
  • python313Packages.compressai
  • python313Packages.compressai.dist

@GaetanLepage GaetanLepage merged commit 57a9488 into NixOS:master Jul 6, 2025
32 of 34 checks passed
@sarahec sarahec deleted the compressai-flaky-test branch July 6, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 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.

2 participants