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
A few updates ago everything worked as expected. But now the Testing Area shows pytest Discovery Error and Logs aren't really helpfull, because the only error shown:
The python test process was terminated before it could exit on its own, the process errored with: Code: 1
On the other hand if I run the tests they are executed as normal, but also if my tests are failing , they do not update the panel.
Steps to reproduce:
Since it is hard to determine what actually happend with the updates I provide the github repo, which causes the issue:
git clone [email protected]:MaKaNu/boxsup-pytorch.git
cd boxsup-pytorch
git switch Feature-Move-IoU-PreProcess
poetry env use 3.9
poetry install
poetry shell
code .
Switch to Pytestpanel and thats it.
I tested via ssh remote machine and also local same issue.
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2024-05-21 18:20:25.116 [info] Experiment 'pythonCreateEnvOnPipInstallcf' is active
2024-05-21 18:20:25.116 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-05-21 18:20:25.116 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-05-21 18:20:25.116 [info] Experiment 'pythonTestAdapter' is active
2024-05-21 18:20:25.299 [info] Default formatter is set to ms-python.black-formatter for workspace /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch
2024-05-21 18:20:25.324 [info] VS Code was launched from an activated environment: '.venv', selecting it as the interpreter for workspace.
2024-05-21 18:20:25.338 [info] Python interpreter path: ./.venv/bin/python
2024-05-21 18:20:25.711 [info] > pyenv which python
2024-05-21 18:20:25.711 [info] cwd: .
2024-05-21 18:20:26.663 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2024.6.0/python_files/printEnvVariables.py
2024-05-21 18:20:26.663 [info] shell: zsh
2024-05-21 18:20:26.779 [info] > /usr/bin/python ~/.vscode/extensions/ms-python.python-2024.6.0/python_files/printEnvVariables.py
2024-05-21 18:20:26.779 [info] shell: zsh
2024-05-21 18:20:26.875 [info] Prepending environment variable PS1 in collection with (.venv) {"applyAtShellIntegration":true,"applyAtProcessCreation":false}
2024-05-21 18:20:26.877 [info] Send text to terminal: /usr/bin/python /home/matti.kaupenjohann/.vscode/extensions/ms-python.python-2024.6.0/python_files/printEnvVariablesToFile.py /home/matti.kaupenjohann/.vscode/extensions/ms-python.python-2024.6.0/python_files/deactivate/zsh/envVars.txt
2024-05-21 18:20:29.965 [info] Starting Pylance language server.
2024-05-21 18:20:35.426 [info] Discover tests for workspace name: boxsup-pytorch - uri: /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch
2024-05-21 18:20:35.426 [info] Running discovery for pytest using the new test adapter.
2024-05-21 18:20:35.427 [info] All environment variables set for pytest discovery: {"ALACRITTY_LOG":"/tmp/Alacritty-51609.log","ALACRITTY_SOCKET":"/run/user/1000/Alacritty-:0-51609.sock","ALACRITTY_WINDOW_ID":"41943043","BROWSER":"/usr/bin/firefox","CASROOT":"/usr","CHROME_DESKTOP":"code-url-handler.desktop","COLORTERM":"truecolor","CSF_DrawPluginDefaults":"/usr/share/opencascade/resources/DrawResources","CSF_EXCEPTION_PROMPT":"1","CSF_IGESDefaults":"/usr/share/opencascade/resources/XSTEPResource","CSF_LANGUAGE":"us","CSF_MDTVTexturesDirectory":"/usr/share/opencascade/resources/Textures","CSF_MIGRATION_TYPES":"/usr/share/opencascade/resources/StdResource/MigrationSheet.txt","CSF_OCCTResourcePath":"/usr/share/opencascade/resources","CSF_PluginDefaults":"/usr/share/opencascade/resources/StdResource","CSF_SHMessage":"/usr/share/opencascade/resources/SHMessage","CSF_STEPDefaults":"/usr/share/opencascade/resources/XSTEPResource","CSF_ShadersDirectory":"/usr/share/opencascade/resources/Shaders","CSF_StandardDefaults":"/usr/share/opencascade/resources/StdResource","CSF_StandardLiteDefaults":"/usr/share/opencascade/resources/StdResource","CSF_TObjDefaults":"/usr/share/opencascade/resources/StdResource","CSF_TObjMessage":"/usr/share/opencascade/resources/TObj","CSF_XCAFDefaults":"/usr/share/opencascade/resources/StdResource","CSF_XSMessage":"/usr/share/opencascade/resources/XSMessage","CSF_XmlOcafResource":"/usr/share/opencascade/resources/XmlOcafResource","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","DEBUGINFOD_URLS":"https://debuginfod.archlinux.org ","DESKTOP_SESSION":"leftwm","DISPLAY":":0","DRAWDEFAULT":"/usr/share/opencascade/resources/DrawResources/DrawDefault","DRAWHOME":"/usr/share/opencascade/resources/DrawResources","ELECTRON_NO_ATTACH_CONSOLE":"1","EMPRO_LICENSE_FILE":"[email protected]","GDK_BACKEND":"x11","GTK_MODULES":"canberra-gtk-module","HOME":"/home/matti.kaupenjohann","LANG":"en_US.UTF-8","LOGNAME":"matti.kaupenjohann","MAIL":"/var/spool/mail/matti.kaupenjohann","MMGT_CLEAR":"1","MOTD_SHOWN":"pam","NIX_PROFILES":"/nix/var/nix/profiles/default /home/matti.kaupenjohann/.nix-profile","NIX_SSL_CERT_FILE":"/etc/ssl/certs/ca-certificates.crt","NO_AT_BRIDGE":"1","OLDPWD":"/home/matti.kaupenjohann","ORIGINAL_XDG_CURRENT_DESKTOP":"LeftWM","POETRY_ACTIVE":"1","PWD":"/home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch","PYENV_ROOT":"/home/matti.kaupenjohann/.pyenv","PYENV_SHELL":"fish","RANGER_LOAD_DEFAULT_RC":"false","SHELL":"/bin/zsh","SHLVL":"3","SSH_AUTH_SOCK":"/run/user/1000/ssh-agent.socket","STARSHIP_SESSION_KEY":"2536321540281461","STARSHIP_SHELL":"fish","TERM":"alacritty","USER":"matti.kaupenjohann","VIRTUAL_ENV":"/home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch/.venv","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_CLI":"1","VSCODE_CODE_CACHE_PATH":"/home/matti.kaupenjohann/.config/Code/CachedData/dc96b837cf6bb4af9cd736aa3af08cf8279f7685","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","VSCODE_CWD":"/home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_IPC_HOOK":"/run/user/1000/vscode-fee2af50-1.89-main.sock","VSCODE_NLS_CONFIG":"{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}","VSCODE_PID":"5177","WINDOWID":"41943043","XAUTHORITY":"/tmp/xauth_MzqUAL","XDG_CURRENT_DESKTOP":"LeftWM","XDG_DATA_DIRS":"/home/matti.kaupenjohann/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/home/matti.kaupenjohann/.nix-profile/share:/nix/var/nix/profiles/default/share","XDG_RUNTIME_DIR":"/run/user/1000","XDG_SEAT":"seat0","XDG_SEAT_PATH":"/org/freedesktop/DisplayManager/Seat0","XDG_SESSION_CLASS":"user","XDG_SESSION_DESKTOP":"LeftWM","XDG_SESSION_ID":"5","XDG_SESSION_PATH":"/org/freedesktop/DisplayManager/Session3","XDG_SESSION_TYPE":"x11","XDG_VTNR":"2","_":"/opt/visual-studio-code/bin/../code","_JAVA_AWT_WM_NONREPARENTING":"1","_OLD_VIRTUAL_PATH":"/home/matti.kaupenjohann/.pyenv/shims:/home/matti.kaupenjohann/.local/bin:/home/matti.kaupenjohann/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin","key_value":"xuWIzfw5Eqqwa5XuWjUnCmG/X+VdSyEjV4VihKSbKNQJSr7rIF8Gs4i0MvAJzIUp8FAFGAFCnJ29Eh+O","secret_value":"eJ6sMMtAOsmMtvLtQJnOJx0fc0malRnbEkLoLejsviYMRcEE9a7MjKziNga2t3M7LT5VZDiKGq9SGxCb","ELECTRON_RUN_AS_NODE":"1","VSCODE_L10N_BUNDLE_LOCATION":"","PATH":"/home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch/.venv/bin:/home/matti.kaupenjohann/.pyenv/shims:/home/matti.kaupenjohann/.local/bin:/home/matti.kaupenjohann/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin","PYTHONPATH":"/home/matti.kaupenjohann/.vscode/extensions/ms-python.python-2024.6.0/python_files","TEST_RUN_PIPE":"/run/user/1000/python-test-discovery-372fbe8d730e5ac01a96.sock"}
2024-05-21 18:20:35.463 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2024.6.0/python_files/printEnvVariables.py
2024-05-21 18:20:35.463 [info] shell: bash
2024-05-21 18:20:35.532 [info] > ./.venv/bin/python -m pytest -p vscode_pytest --collect-only tests
2024-05-21 18:20:35.532 [info] cwd: .
2024-05-21 18:20:35.882 [info] �[1m============================= test session starts ==============================�[0m
platform linux -- Python 3.9.19, pytest-6.2.5, py-1.11.0, pluggy-1.5.0 -- /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch/.venv/bin/python
2024-05-21 18:20:35.895 [info] cachedir: .pytest_cache
rootdir: /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch, configfile: pyproject.toml
plugins: mock-3.14.0, cov-2.12.1
�[1mcollecting ... �[0m
2024-05-21 18:20:38.349 [info] collected 5 items
<Module tests/test_losses.py>
Test Scenario for utils losses.
<Class TestLossesClassCompareLabels>
2024-05-21 18:20:38.349 [info] Test compare label method of Losses class.
We implement 3 tests to check both trees of the if statement of the method and two states of
the process (Fresh Initialized and Middle of Process):
Test1:
This is the Test which analyzes the result of running the compare against not initialized cands.
This is something what actual needed to be avoided and might be replaced with raising an Error.
Test2:
This tests the fresh scenario. We have prepared 4 Batches of Data with a Size of 2 x 3.
So speaking of 2 possible BBoxes and 3 candidate Masks each initilaized the same class.
The 4 Batches represent themself 4 different scenarios.
Scenario 0:
The Cands are the same class as the bboxes.
Scenario 1:
The Cands are all labeled class 1 while only one bbox exists.
Scenario 2:
The Cands classes are all class 2 but bbox only one bbox is class 2.
Scenario 3:
Same as Scenario 2 but this time with class 1.
Test3:
This tests an already trained state. Also 4 Batches Scenario.
Scenario 0:
Only the first candidate has the class of the BBox.
Scenario 1:
2024-05-21 18:20:38.349 [info] The second candidate is correct for first BBox, Since BBox 2 does not existst, the result
is always False.
Scenario 2:
The second and thirds candidate has same class as BBoxes.
Scenario 3:
The first and second candidate has same class as BBoxes.
<Function test_compare_labels[not_initialized_cands]>
Parametrized test for Class TestLossesClassCompareLabels.
2024-05-21 18:20:38.349 [info] <Function test_compare_labels[initialized_cands]>
Parametrized test for Class TestLossesClassCompareLabels.
<Function test_compare_labels[trained_cands]>
Parametrized test for Class TestLossesClassCompareLabels.
<Class TestLossesOverlappingLoss>
2024-05-21 18:20:38.349 [info] Test batch_overlapping loss method of Losses class.
2024-05-21 18:20:38.349 [info] We implement 1 test to test the calculation of overlapping loss based on same data as the test
for compare class.
Test1:
This is the Test which analyzes the result of running the compare against not initialized cands.
2024-05-21 18:20:38.349 [info] This is something what actual needed to be avoided and might be replaced with raising an Error.
Test2:
This tests the fresh scenario. We have prepared 4 Batches of Data with a Size of 2 x 3.
So speaking of 2 possible BBoxes and 3 candidate Masks each initilaized the same class.
The 4 Batches represent themself 4 different scenarios.
2024-05-21 18:20:38.350 [info] Scenario 0:
The Cands are the same class as the bboxes.
Scenario 1:
<Function test_overlapping_loss[Simple Overlapping]>
Parametrized test for Class TestLossesOverlappingLoss.
<Module tests/test_strats.py>
Test scripts for testing of strats pipeline.
<Class TestBaseStrat>
Test batch_overlapping loss method of Losses class.
We implement 1 test to test the calculation of overlapping loss based on same data as the test
for compare class.
Test1:
2024-05-21 18:20:38.350 [info] This is the Test which analyzes the result of running the compare against not initialized cands.
This is something what actual needed to be avoided and might be replaced with raising an Error.
Test2:
This tests the fresh scenario. We have prepared 4 Batches of Data with a Size of 2 x 3.
So speaking of 2 possible BBoxes and 3 candidate Masks each initilaized the same class.
The 4 Batches represent themself 4 different scenarios.
Scenario 0:
The Cands are the same class as the bboxes.
Scenario 1:
<Function test_check_input[Check Input Correct]>
Parametrized test for Class TestLossesOverlappingLoss.
2024-05-21 18:20:38.579 [info]
---------- coverage: platform linux, python 3.9.19-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------------------------
boxsup_pytorch/__init__.py 5 0 0 0 100%
boxsup_pytorch/__main__.py 24 24 4 0 0% 3-38
boxsup_pytorch/config/__init__.py 3 0 0 0 100%
boxsup_pytorch/config/config.py 26 0 0 0 100%
boxsup_pytorch/data/__init__.py 0 0 0 0 100%
boxsup_pytorch/data/datacontainer.py 16 4 8 0 67% 27-30
boxsup_pytorch/data/dataloader.py 57 57 14 0 0% 9-153
boxsup_pytorch/data/dataset.py 164 164 46 0 0% 3-343
boxsup_pytorch/data/datatrain/__init__.py 0 0 0 0 100%
boxsup_pytorch/data/datatrain/controlwagon.py 17 17 2 0 0% 1-28
boxsup_pytorch/data/datatrain/datawagons.py 13 13 0 0 0% 1-23
boxsup_pytorch/data/datatrain/factory.py 16 16 4 0 0% 7-52
boxsup_pytorch/data/datatrain/locomotive.py 16 16 0 0 0% 6-27
boxsup_pytorch/launch.py 24 24 2 0 0% 3-48
boxsup_pytorch/model/__init__.py 0 0 0 0 100%
boxsup_pytorch/model/network.py 47 21 6 2 53% 22, 30, 41-70, 86
boxsup_pytorch/pipeline/__init__.py 0 0 0 0 100%
boxsup_pytorch/pipeline/core.py 27 27 6 0 0% 3-68
boxsup_pytorch/pipeline/data_prep.py 21 21 2 0 0% 1-42
boxsup_pytorch/pipeline/error_calc.py 28 13 8 0 47% 24-33, 36-38, 41-43
boxsup_pytorch/pipeline/preprocess.py 112 112 44 0 0% 11-234
boxsup_pytorch/pipeline/process_runner.py 12 12 4 0 0% 10-43
boxsup_pytorch/pipeline/strats.py 95 61 18 0 35% 31, 34-41, 44-51, 55-68, 71-79, 90-111, 114-121, 130-152
boxsup_pytorch/pipeline/trainer.py 94 94 18 0 0% 6-170
boxsup_pytorch/pipeline/update_masks.py 32 32 6 0 0% 3-72
boxsup_pytorch/pipeline/update_net.py 17 17 2 0 0% 2-25
boxsup_pytorch/utils/__init__.py 0 0 0 0 100%
boxsup_pytorch/utils/check.py 15 8 0 0 47% 20-21, 33-34, 46-47, 60-61
boxsup_pytorch/utils/common.py 36 36 12 0 0% 1-56
boxsup_pytorch/utils/losses.py 80 47 10 0 37% 40-51, 80-85, 102-112, 125-129, 142-148, 175-177, 180-186, 189-194, 198
-------------------------------------------------------------------------------------------
TOTAL 997 836 216 2 14%
�[31m�[1mFAIL Required test coverage of 80% not reached. Total coverage: 14.43%
�[0m�[32m========================== �[32m5 tests collected�[0m�[32m in 2.70s�[0m�[32m ==========================�[0m
2024-05-21 18:20:38.838 [error] Subprocess exited unsuccessfully with exit code 1 and signal null on workspace /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch.
2024-05-21 18:20:38.838 [error] Subprocess exited unsuccessfully with exit code 1 and signal null on workspace /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch. Creating and sending error discovery payload
2024-05-21 18:20:38.838 [error] pytest test discovery error for workspace: /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch
The python test process was terminated before it could exit on its own, the process errored with: Code: 1, Signal: null for workspace /home/matti.kaupenjohann/Dokumente/GIT/boxsup-pytorch
Extension version: 2024.6.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:16:23.416Z)
OS version: Linux x64 6.9.1-arch1-1
Modes:
Remote OS version: Linux x64 5.4.0-176-generic
Python version (& distribution if applicable, e.g. Anaconda): 3.9.18
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
Value of the python.languageServer setting: Default
Hi! I see your pytest version is pytest-6.2.5, are you able to upgrade your pytest version? Since 6.2.5 is old we are looking to support pytest 7.x.x moving forward. Pytest 6.2.5 has a few items that are not as compatible with the extension. Thanks
I need to investigate this first. My pyproject states pytest = "^6.0", so technically it should. I need to look into what other dependency might hold me back.
Seemed to be an issue with how my lock was generated. Just removed my pytest, pytest-mock and pytest-cov and reinstalled them. Now I am updated to 8.2 and my workflow is rushing again.
Type: Bug
Behaviour
A few updates ago everything worked as expected. But now the Testing Area shows pytest Discovery Error and Logs aren't really helpfull, because the only error shown:
On the other hand if I run the tests they are executed as normal, but also if my tests are failing , they do not update the panel.
Steps to reproduce:
Since it is hard to determine what actually happend with the updates I provide the github repo, which causes the issue:
Switch to Pytestpanel and thats it.
I tested via ssh remote machine and also local same issue.
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.6.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:16:23.416Z)
OS version: Linux x64 6.9.1-arch1-1
Modes:
Remote OS version: Linux x64 5.4.0-176-generic
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: