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

nnUNET trainer #138

Open
drusmanshams opened this issue Jan 18, 2025 · 1 comment
Open

nnUNET trainer #138

drusmanshams opened this issue Jan 18, 2025 · 1 comment

Comments

@drusmanshams
Copy link

drusmanshams commented Jan 18, 2025

I am getting following error while using spine_muscle_adipose_tissue pipeline
AttributeError: Can't pickle local object 'nnUNetTrainerV2.initialize_network..'

traceback is as follows
Traceback (most recent call last):
File "/Users/usman/Comp2Comp/comp2comp/utils/process.py", line 131, in process_3d
pipeline(output_dir=output_dir, model_dir=model_dir)
File "/Users/usman/Comp2Comp/comp2comp/inference_pipeline.py", line 73, in call
output = inference_class(inference_pipeline=self, **output)
File "/Users/usman/Comp2Comp/comp2comp/inference_pipeline.py", line 69, in call
output = inference_class(
File "/Users/usman/Comp2Comp/comp2comp/muscle_adipose_tissue/muscle_adipose_tissue.py", line 96, in call
predict.predict_cases(
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/site-packages/nnunet/inference/predict.py", line 209, in predict_cases
for preprocessed in preprocessing:
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/site-packages/nnunet/inference/predict.py", line 109, in preprocess_multithreaded
pr.start()
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/usman/Downloads/miniconda3/envs/c2c_env/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'nnUNetTrainerV2.initialize_network..'

anyone else had similar problem and how did you manage?

@ITwindCloud
Copy link

I am encountering the same problem, but I don't know how to deal with.

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