Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'dynamic_network_architectures for Residual Encoder Presets in nnU-Net #2664

Open
shengzhang90 opened this issue Jan 14, 2025 · 4 comments
Assignees

Comments

@shengzhang90
Copy link

Hi,

ModuleNotFoundError: No module named 'dynamic_network_architectures for Residual Encoder Presets in nnU-Net

Thanks a lot.

@seziegler
Copy link
Member

Hi,
do you have dynamic-network-architectures installed?

@shengzhang90
Copy link
Author

Hi,

Yes, I have installed dynamic-network-architectures module with version = 0.3.1. However, it still does not work. Thanks a lot.

@seziegler
Copy link
Member

Hi @shengzhang90 ,

Can you please share the full traceback of the error?

@shengzhang90
Copy link
Author

shengzhang90 commented Feb 3, 2025

Hi,

Here is the full Traceback. Thanks a lot.

(umamba) shengzhang@yanglab12:nnUNet$ cat plan_preprocess.sh
export CUDA_VISIBLE_DEVICES=0
export CUDA_LAUNCH_BLOCKING=1
export nnUNet_raw=/home/shengzhang/data/nnUNet/nnUNet_raw
export nnUNet_preprocessed=/home/shengzhang/data/nnUNet/nnUNet_preprocessed
export nnUNet_results=/home/shengzhang/data/nnUNet/nnUNet_results
nnUNetv2_plan_and_preprocess -d 250 -pl nnUNetPlannerResEncL
# nnUNetv2_plan_and_preprocess -d 250 --verify_dataset_integrity

(umamba) shengzhang@yanglab12:nnUNet$ sh plan_preprocess.sh
Fingerprint extraction...
Dataset250_AIIB23xxx
Experiment planning...
Traceback (most recent call last):
File "/home/shengzhang/miniconda3/envs/umamba/bin/nnUNetv2_plan_and_preprocess", line 8, in
sys.exit(plan_and_preprocess_entry())
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/site-packages/nnunetv2/experiment_planning/plan_and_preprocess_entrypoints.py", line 186, in plan_and_preprocess_entry
plans_identifier = plan_experiments(args.d, args.pl, args.gpu_memory_target, args.preprocessor_name, args.overwrite_target_spacing, args.overwrite_plans_name)
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/site-packages/nnunetv2/experiment_planning/plan_and_preprocess_api.py", line 81, in plan_experiments
experiment_planner = recursive_find_python_class(join(nnunetv2.path[0], "experiment_planning"),
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/site-packages/nnunetv2/utilities/find_class_by_name.py", line 21, in recursive_find_python_class
tr = recursive_find_python_class(join(folder, modname), class_name, current_module=next_current_module)
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/site-packages/nnunetv2/utilities/find_class_by_name.py", line 12, in recursive_find_python_class
m = importlib.import_module(current_module + "." + modname)
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/shengzhang/miniconda3/envs/umamba/lib/python3.10/site-packages/nnunetv2/experiment_planning/experiment_planners/resencUNet_planner.py", line 5, in
from dynamic_network_architectures.architectures.residual_unet import ResidualEncoderUNet
ModuleNotFoundError: No module named 'dynamic_network_architectures.architectures.residual_unet'

Best wishes
Sheng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants