Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py", line 1256, in train_step
l2 = self.loss(output2,target2)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/nnunetv2/training/loss/deep_supervision.py", line 29, in forward
return sum([weights[i] * self.loss(*inputs) for i, inputs in enumerate(zip(*args)) if weights[i] != 0.0])
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/nnunetv2/training/loss/deep_supervision.py", line 29, in <listcomp>
return sum([weights[i] * self.loss(*inputs) for i, inputs in enumerate(zip(*args)) if weights[i] != 0.0])
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/nnunetv2/training/loss/compound_losses.py", line 50, in forward
dc_loss = self.dc(net_output, target_dice, loss_mask=mask) \
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 655, in _fn
return fn(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1432, in __call__
return self._torchdynamo_orig_callable(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1213, in __call__
result = self._inner_convert(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 598, in __call__
return _compile(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1059, in _compile
guarded_code = compile_inner(code, one_graph, hooks, transform)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_utils_internal.py", line 97, in wrapper_function
return function(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 761, in compile_inner
return _compile_inner(code, one_graph, hooks, transform)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 797, in _compile_inner
out_code = transform_code_object(code, transform)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1422, in transform_code_object
transformations(instructions, code_options)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 257, in _fn
return fn(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 715, in transform
tracer.run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3498, in run
super().run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1337, in run
while self.step():
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1246, in step
self.dispatch_table[inst.opcode](self, inst)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 819, in wrapper
return inner_fn(self, inst)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2166, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1170, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 913, in call_function
return self.obj.call_method(tx, self.name, args, kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/variables/tensor.py", line 632, in call_method
return wrap_fx_proxy(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2302, in wrap_fx_proxy
return wrap_fx_proxy_cls(target_cls=TensorVariable, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2368, in wrap_fx_proxy_cls
return _wrap_fx_proxy(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2464, in _wrap_fx_proxy
example_value = get_fake_value(proxy.node, tx, allow_non_graph_fake=True)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 3229, in get_fake_value
raise TorchRuntimeError(str(e)).with_traceback(e.__traceback__) from None
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 3127, in get_fake_value
ret_val = wrap_fake_exception(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2641, in wrap_fake_exception
return fn()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 3128, in <lambda>
lambda: run_node(tx.output, node, args, kwargs, nnmodule)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 3325, in run_node
raise RuntimeError(make_error_message(e)).with_traceback(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 3295, in run_node
return getattr(args[0], node.target)(*args[1:], **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/utils/_stats.py", line 27, in wrapper
return fn(*args, **kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1282, in __torch_dispatch__
return self.dispatch(func, types, args, kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1823, in dispatch
return self._cached_dispatch_impl(func, types, args, kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1393, in _cached_dispatch_impl
output = self._dispatch_impl(func, types, args, kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 2435, in _dispatch_impl
self.wrap_meta_outputs_with_default_device_logic(
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 2562, in wrap_meta_outputs_with_default_device_logic
return tree_map(wrap, r)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/utils/_pytree.py", line 1145, in tree_map
return treespec.unflatten(map(func, *flat_args))
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/utils/_pytree.py", line 982, in unflatten
leaves = list(leaves)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 2540, in wrap
) = FakeTensor._find_common_device(func, flat_args)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 896, in _find_common_device
merge_devices(arg)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 891, in merge_devices
raise RuntimeError(
torch._dynamo.exc.TorchRuntimeError: Dynamo failed to run FX node with fake tensors: call_method scatter_(*(FakeTensor(..., device='cuda:0', size=(12, 8, s0, s1), dtype=torch.bool), 1, FakeTensor(..., size=(12, 1, s2, s3), dtype=torch.int64), 1), **{}): got RuntimeError('Unhandled FakeTensor Device Propagation for aten.scatter_.value, found two different devices cuda:0, cpu')
from user code:
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/nnunetv2/training/loss/dice.py", line 88, in forward
y_onehot.scatter_(1, y.long(), 1)
Set TORCHDYNAMO_VERBOSE=1 for the internal stack trace (please do this especially if you're reporting a bug to PyTorch). For even more developer context, set TORCH_LOGS="+dynamo"
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
Exception in thread Thread-7 (results_loop):
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
Traceback (most recent call last):
self.run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise e
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
Exception in thread Thread-8 (results_loop):
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
Exception in thread Thread-9 (results_loop):
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
self.run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
Exception in thread Thread-6 (results_loop):
Traceback (most recent call last):
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 125, in results_loop
raise e
File "/home/liuhao/anaconda3/envs/nnunet/lib/python3.10/site-packages/batchgenerators/dataloading/nondet_multi_threaded_augmenter.py", line 103, in results_loop
raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the "
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message
最新发布