Project-MONAI / Project-MONAI/MONAI

runtests.sh does not work on Windows

Open
#5,857 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Contribution wanted
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Describe the bug
Trying to run tests on a Windows machine, as per the PR template, does not work. The obvious problem is that my python path has spaces in it.

To Reproduce
Steps to reproduce the behavior:

Dzenan@Ryzenator MINGW64 /m/Dev/MONAI (dev)
$ ./runtests.sh -f -u --net --coverage
./runtests.sh: line 115: /c/Program: No such file or directory
./runtests.sh: line 116: [: : integer expression expected
PYTHONPATH: /m/Dev/MONAI:
Python: /c/Program Files/Python39/python
./runtests.sh: line 123: /c/Program: No such file or directory

Expected behavior
Tests are run, similarly to a Linux machine.

Environment

Dzenan@Ryzenator MINGW64 /m/Dev/MONAI (dev)
$ python -c 'import monai; monai.config.print_debug_info()'
C:\Program Files\Python39\lib\site-packages\requests\__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (5.0.0)/charset_normalizer (2.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
================================
Printing MONAI config...
================================
MONAI version: 1.1.0+25.g11810a3e.dirty
Numpy version: 1.21.2
Pytorch version: 1.12.0+cu116
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: 11810a3e61c8a60034df5a12d336578705ae6052
MONAI __file__: M:\Dev\MONAI\monai\__init__.py

Optional dependencies:
Pytorch Ignite version: NOT INSTALLED or UNKNOWN VERSION.
ITK version: 5.3.0
Nibabel version: 3.2.1
scikit-image version: 0.18.3
Pillow version: 9.2.0
Tensorboard version: 2.6.0
gdown version: NOT INSTALLED or UNKNOWN VERSION.
TorchVision version: 0.13.0+cu116
tqdm version: 4.62.2
lmdb version: NOT INSTALLED or UNKNOWN VERSION.
psutil version: 5.8.0
pandas version: 1.3.2
einops version: NOT INSTALLED or UNKNOWN VERSION.
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: NOT INSTALLED or UNKNOWN VERSION.
pynrrd version: NOT INSTALLED or UNKNOWN VERSION.

For details about installing the optional dependencies, please visit:
    https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies


================================
Printing system config...
================================
System: Windows
Win32 version: ('10', '10.0.22621', 'SP0', 'Multiprocessor Free')
Win32 edition: Professional
Platform: Windows-10-10.0.22621-SP0
Processor: AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD
Machine: AMD64
Python version: 3.9.13
Process name: python.exe
Command: ['C:\\Program Files\\Python39\\python.exe', '-c', 'import monai; monai.config.print_debug_info()']
Open files: [popenfile(path='C:\\Windows\\System32\\en-US\\tzres.dll.mui', fd=-1), popenfile(path='C:\\Windows\\System32\\en-US\\KernelBase.dll.mui', fd=-1), popenfile(path='C:\\Windows\\System32\\en-US\\kernel32.dll.mui', fd=-1)]
Num physical CPUs: 12
Num logical CPUs: 24
Num usable CPUs: 24
CPU usage (%): [0.0, 0.0, 11.5, 0.4, 6.0, 7.7, 0.0, 0.2, 1.9, 0.2, 0.2, 0.6, 1.1, 0.4, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.2, 2.6, 0.0, 0.0]
CPU freq. (MHz): 3001
Load avg. in last 1, 5, 15 mins (%): [0.0, 0.0, 0.0]
Disk usage (%): 52.3
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 63.9
Available memory (GB): 34.6
Used memory (GB): 29.3

================================
Printing GPU config...
================================
Num GPUs: 1
Has CUDA: True
CUDA version: 11.6
cuDNN enabled: True
cuDNN version: 8302
Current device: 0
Library compiled for CUDA architectures: ['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'compute_37']
GPU 0 Name: NVIDIA GeForce RTX 3090
GPU 0 Is integrated: False
GPU 0 Is multi GPU board: False
GPU 0 Multi processor count: 82
GPU 0 Total memory (GB): 24.0
GPU 0 CUDA capability (maj.min): 8.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting runtests.sh around lines 115-123, where the Python path is invoked and the reported errors occur. Reproduce the command under Windows with Python installed in a path containing spaces; done means the test command runs successfully there as it does on Linux.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.