Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ echo "--- Installing/updating package from PR in editable mode ---"
# Docker image.
# 2. `pytest ./tests/`: After the package is installed, we run the tests.

conda run -n dpnegf bash -c "pip install -e . && pytest dpnegf/tests/"
conda run -n dpnegf bash -c "
pip install -e .

echo "--- Unit Tests Passed Successfully ---"
TORCH_VERSION=\$(python -c \"import torch; print(torch.__version__.split('+')[0])\")
TORCH_BACKEND=\$(python -c \"import torch; print('cpu' if torch.version.cuda is None else 'cu' + torch.version.cuda.replace('.', ''))\")
TORCH_SCATTER_INDEX=\"https://data.pyg.org/whl/torch-\${TORCH_VERSION}+\${TORCH_BACKEND}.html\"
pip install --no-cache-dir --force-reinstall --only-binary=torch_scatter torch_scatter -f \"\${TORCH_SCATTER_INDEX}\"

pytest dpnegf/tests/
"

echo "--- Unit Tests Passed Successfully ---"