You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to run tests that require package MinkowskiEngine that should be build and installed from git with the command pip install git+https://github.com/NVIDIA/MinkowskiEngine --no-deps. I do it with a command session.install("git+https://github.com/NVIDIA/MinkowskiEngine", "--no-deps", silent=False).
If run session with command nox -s "tests(python='3.8', pytorch='1.12.1')" everything works fine, but if I add -r flag to save time, the session.install of MinkowskiEngine works in a strange way: every odd (first, third, and so on) attempt is successful, but every even (second, fourth, and so on) does not even start an installation of the package with a WARNING: No metadata found in ./.nox/tests-python-3-8-pytorch-1-12-1/lib/python3.8/site-packages.
The session code:
efinstall_cpu_torch(session: Session, pytorch: str="1.12.1") ->None:
"""InstalltheCPUversionofPyTorch.""" session.install( f"torch=={pytorch}+cpu", f"torchvision=={TORCHVISION_VERSIONS_DICT[pytorch]}+cpu", "--extra-index-url", "https://download.pytorch.org/whl/cpu", )def install_minkowskiengine(session: Session) -> None: """InstalltheMinkowskiEngine.""" session.install("setuptools==68.0.0") session.install("git+https://github.com/NVIDIA/MinkowskiEngine", "--no-deps", silent=False)@nox.session@nox.parametrize( "python,pytorch", [ (python, pytorch) for python in PYTHON_VERSIONS for pytorch in PYTORCH_VERSIONS if (python, pytorch) not in (("3.11", "1.12.1"), ("3.11", "1.13.1")) ],)def tests(session: Session, pytorch: str) -> None: """Runthetestsuite."""
args = session.posargs or ["--cov"]
install_cpu_torch(session, pytorch)
install_minkowskiengine(session)
session.install("-e", ".")
session.install("-r", "requirements-dev.txt")
session.run("pytest", *args)
First time I run the session with the command nox -rs "tests(python='3.8', pytorch='1.12.1')":
The next time with the same nox -rs "tests(python='3.8', pytorch='1.12.1')":
docker_opr@cdsmelekhin:~/OpenPlaceRecognition$ nox -rs "tests(python='3.8', pytorch='1.12.1')"
nox > Running session tests(python='3.8', pytorch='1.12.1')
nox > Re-using existing virtual environment at .nox/tests-python-3-8-pytorch-1-12-1.
nox > python -m pip install torch==1.12.1+cpu torchvision==0.13.1+cpu --extra-index-url https://download.pytorch.org/whl/cpu
nox > python -m pip install setuptools==68.0.0
nox > python -m pip install git+https://github.com/NVIDIA/MinkowskiEngine --no-deps
Collecting git+https://github.com/NVIDIA/MinkowskiEngine
Cloning https://github.com/NVIDIA/MinkowskiEngine to /tmp/pip-req-build-vs_8qkay
Running command git clone --filter=blob:none --quiet https://github.com/NVIDIA/MinkowskiEngine /tmp/pip-req-build-vs_8qkay
Resolved https://github.com/NVIDIA/MinkowskiEngine to commit 02fc608bea4c0549b0a7b00ca1bf15dee4a0b228
Preparing metadata (setup.py) ... done
WARNING: No metadata found in ./.nox/tests-python-3-8-pytorch-1-12-1/lib/python3.8/site-packages
nox > python -m pip install -e .
nox > python -m pip install -r requirements-dev.txt
nox > pytest --cov
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/docker_opr/OpenPlaceRecognition
plugins: cov-4.1.0, hydra-core-1.3.2, typeguard-3.0.2
collected 2 items / 1 error
===================================================================================================== ERRORS ======================================================================================================
________________________________________________________________________ ERROR collecting tests/models/place_recognition/test_minkloc3d.py ________________________________________________________________________
ImportError while importing test module '/home/docker_opr/OpenPlaceRecognition/tests/models/place_recognition/test_minkloc3d.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/models/place_recognition/test_minkloc3d.py:8: in <module>
from opr.models.place_recognition.minkloc3d import MinkLoc3D
src/opr/models/place_recognition/__init__.py:2: in <module>
from .minkloc3d import MinkLoc3D
src/opr/models/place_recognition/minkloc3d.py:11: in <module>
import MinkowskiEngine as ME
E ModuleNotFoundError: No module named 'MinkowskiEngine'
---------- coverage: platform linux, python 3.8.10-final-0 -----------
Name Stmts Miss Cover
----------------------------------------------------------------------
src/opr/__init__.py 5 2 60%
src/opr/const.py 17 5 71%
src/opr/models/__init__.py 0 0 100%
src/opr/models/place_recognition/__init__.py 1 0 100%
src/opr/models/place_recognition/minkloc3d.py 147 145 1%
src/opr/utils.py 73 62 15%
tests/__init__.py 0 0 100%
tests/models/place_recognition/test_minkloc3d.py 12 7 42%
tests/test_const.py 17 11 35%
tests/test_utils.py 16 12 25%
----------------------------------------------------------------------
TOTAL 288 244 15%
============================================================================================= short test summary info =============================================================================================
ERROR tests/models/place_recognition/test_minkloc3d.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================ 1 error in 0.75s =================================================================================================
nox > Command pytest --cov failed with exit code 2
nox > Session tests(python='3.8', pytorch='1.12.1') failed.
And if I run the same command in the third time it will complete successfully like in the first attempt. So, every odd attempt is successful, and every even is not.
How can I fix it and make session behaviour stable?
The text was updated successfully, but these errors were encountered:
I want to run tests that require package MinkowskiEngine that should be build and installed from git with the command
pip install git+https://github.com/NVIDIA/MinkowskiEngine --no-deps
. I do it with a commandsession.install("git+https://github.com/NVIDIA/MinkowskiEngine", "--no-deps", silent=False)
.If run session with command
nox -s "tests(python='3.8', pytorch='1.12.1')"
everything works fine, but if I add-r
flag to save time, thesession.install
of MinkowskiEngine works in a strange way: every odd (first, third, and so on) attempt is successful, but every even (second, fourth, and so on) does not even start an installation of the package with aWARNING: No metadata found in ./.nox/tests-python-3-8-pytorch-1-12-1/lib/python3.8/site-packages
.The session code:
First time I run the session with the command
nox -rs "tests(python='3.8', pytorch='1.12.1')"
:The next time with the same
nox -rs "tests(python='3.8', pytorch='1.12.1')"
:And if I run the same command in the third time it will complete successfully like in the first attempt. So, every odd attempt is successful, and every even is not.
How can I fix it and make session behaviour stable?
The text was updated successfully, but these errors were encountered: