Skip to content

Commit 76f1295

Browse files
committed
fix(test): Silence package import checks in GPU detection
Redirect stdout and stderr to /dev/null when checking for GPU-related package imports (jax, torch, warp) to prevent error messages from appearing in test output when these packages are not available. This maintains cleaner test output while preserving the functionality of detecting GPU capabilities.
1 parent bc8b857 commit 76f1295

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • template/.config/copier/mise-tasks

template/.config/copier/mise-tasks/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function is-in-ci() {
2121

2222
function needs-gpu() {
2323
for pkg in jax torch warp; do
24-
if python -c "import $pkg"; then
24+
if python -c "import $pkg" &> /dev/null; then
2525
return 0
2626
fi
2727
done

0 commit comments

Comments
 (0)