Project-MONAI / Project-MONAI/MONAILabel

Monailabel is ignoring arguments (issue with PYTHONPATH?)

Open
#1,469 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
891
Forks
269
Avg merge
15h 41m
Merged PRs (30d)
1

Description

Describe the bug
Hi All,

I'm trying to set up an easy install of monailabel on a PBS-based computing cluster (AWS is unavailable on our computing environment).
The computing enviroment mainly loads packages by the creation and use of Tool Command Language (TCL) modules which typically contains a pip install e.g.
pip3 install -I --prefix="${APP_PATH}" monailabel==0.6.0 --no-warn-script-location

and then the required PATHs are adjusted accordingly:

mkdir -p ${APP_MODULE_PATH}
cat< ${APP_MODULE_PATH}/${APP_VERSION}
#%Module1.0
source /opt/Modules/extensions/extensions.tcl
soft-prereq python3/3.10.0
prepend-path PYTHONPATH /apps/python3.10.0/
prepend-path PYTHONPATH ${APP_PATH}/lib/python3.10/site-packages
prepend-path PATH ${APP_PATH}/bin
EOF

However, when I load the module and run the monailabel command line, the command is reached but there is no following output, I supect due to something missing PYTHONPATHS. Example runs are below:

Server logs
bash file used for qsubbing:

`[kd0793@gadi-login-05 0.6.0]$ cat bash_file.sh
#!/bin/bash
#PBS -P nm24
#PBS -q gpuvolta
#PBS -l walltime=48:00:00
#PBS -l mem=100GB
#PBS -l jobfs=200GB
#PBS -l ngpus=4
#PBS -l ncpus=48
#PBS -lstorage=gdata/if89

module unload LAMA python3
module load monailabel/0.6.0
python3 -c "import torch; print(torch.cuda.is_available())"
python -c 'import monai; monai.config.print_debug_info()'
monailabel --help

output (standard output)

True
Using PYTHONPATH=/g/data/if89/apps/monailabel:/g/data/if89/apps/monailabel/0.6.0/lib/python3.10/site-packages:/apps/python3.10.0/

Expected behavior
Should bring up the help arguments for monailabel

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 with bash_file.sh and reproduce the module-loading and monailabel --help commands in the PBS environment described. Trace the monailabel CLI entry point and its Python path handling, then confirm that the command displays its help arguments when the reported environment is loaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.