question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PR #1778 causes error

See original GitHub issue

Describe the bug PR #1778 has broken a Clara Train MMAR that uses RandomZoomD.

Original Traceback (most recent call last):
  File "/workspace/MONAI/monai/data/utils.py", line 257, in list_data_collate
    return default_collate(data)
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in default_collate
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in <dictcomp>
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 83, in default_collate
    return [default_collate(samples) for samples in transposed]
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 83, in <listcomp>
    return [default_collate(samples) for samples in transposed]
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in default_collate
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in <dictcomp>
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in default_collate
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 73, in <dictcomp>
    return {key: default_collate([d[key] for d in batch]) for key in elem}
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 81, in default_collate
    raise RuntimeError('each element in list of batch should be of equal size')
RuntimeError: each element in list of batch should be of equal size

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
    data = fetcher.fetch(index)
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/workspace/MONAI/monai/data/utils.py", line 266, in list_data_collate
    raise RuntimeError(re_str)
RuntimeError: each element in list of batch should be of equal size

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rijobrocommented, Mar 17, 2021

Thanks for bringing this to my attention, I’ll sort it first thing tomorrow!

1reaction
drbehcommented, Mar 17, 2021

When I checkout the commit just before PR#1778, all goes back to normal and works as before (46154ec78fb41680561fe275068c52dcd073faa5).

commit cf3bd1a82869dfcde8db9c8f7be99a50abd81811
Author: Richard Brown <33289025+rijobro@users.noreply.github.com>
Date:   Wed Mar 17 12:43:10 2021 +0000

    Inverse Zoomd and RandZoomd (#1778)
    
    Zoomd and RandZoomd

commit 46154ec78fb41680561fe275068c52dcd073faa5
Author: Richard Brown <33289025+rijobro@users.noreply.github.com>
Date:   Wed Mar 17 10:38:44 2021 +0000

    Inverse Resized (#1780)
    
    Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Revolutionary War: Southern Phase, 1778-1781 | The ...
Patriot forces, on the other hand, were supplied and could hide among the local population. As a result, the British southern strategy was...
Read more >
HPE ProLiant Servers - POST Error Messages and Beep ...
Possible Cause: A PCI Express port has experienced a fatal error that caused an NMI. Action: Run Insight Diagnostics and replace the failed...
Read more >
The American Revolution 1778-1783
On February 6, 1778, France and America concluded an alliance by signing two treaties, a treaty of amity and commerce and a military...
Read more >
Stop Wasting Money on Jatco CVT Stepper Motors
The most common issues that cause the P1778 code are flow control valve wear, pulley leaks, and a worn or sticky valve body....
Read more >
System Error Codes (1700-3999) (WinError.h) - Win32 apps
The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain. ERROR_SERVER_HAS_OPEN_HANDLES.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found