Circular Import: cannot import name 'Randomizable' from partially initialized module 'monai.transforms' #4893
JohnMasoner
started this conversation in
Ideas
Replies: 2 comments
-
Actually,I just added monai to the hooks and the problem was solved. But I am still not sure if there is a Circular-Import. |
Beta Was this translation helpful? Give feedback.
0 replies
-
not sure what the use case is here and why we want to support it. converting to a discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
ImportError: cannot import name 'Randomizable' from partially initialized module 'monai.transforms', when i builded package by installer.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
hope to clean circular import
Screenshots

Environment
Ensuring you use the relevant python executable, please paste the output of:
================================
Printing MONAI config...
MONAI version: 0.8.0
Numpy version: 1.22.3
Pytorch version: 1.8.2+cu111
MONAI flags: HAS_EXT = False, USE_COMPILED = False
MONAI rev id: 714d00d
Optional dependencies:
Pytorch Ignite version: NOT INSTALLED or UNKNOWN VERSION.
Nibabel version: 3.2.2
scikit-image version: 0.19.2
Pillow version: 9.1.1
Tensorboard version: 2.8.0
gdown version: NOT INSTALLED or UNKNOWN VERSION.
TorchVision version: 0.9.2+cu111
tqdm version: 4.54.1
lmdb version: NOT INSTALLED or UNKNOWN VERSION.
psutil version: 5.9.0
pandas version: 1.4.3
einops version: 0.4.1
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: NOT INSTALLED or UNKNOWN VERSION.
For details about installing the optional dependencies, please visit:
https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
================================
Printing system config...
System: Windows
Win32 version: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
Win32 edition: Professional
Platform: Windows-10-10.0.19044-SP0
Processor: Intel64 Family 6 Model 167 Stepping 1, GenuineIntel
Machine: AMD64
Python version: 3.8.13
Process name: python.exe
Command: ['python']
Open files: [popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackzh-CN_19041.50.149.0_neutral__8wekyb3d8bbwe\Windows\System32\zh-CN\kernel32.dll.mui', fd=-1), popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackzh-CN_19041.50.149.0_neutral__8wekyb3d8bbwe\Windows\System32\zh-CN\KernelBase.dll.mui', fd=-1), popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackzh-CN_19041.50.149.0_neutral__8wekyb3d8bbwe\Windows\System32\zh-CN\tzres.dll.mui', fd=-1)]
Num physical CPUs: 8
Num logical CPUs: 16
Num usable CPUs: 16
CPU usage (%): [3.1, 2.2, 5.1, 2.2, 1.7, 5.1, 8.3, 23.4, 1.0, 3.4, 1.5, 1.5, 1.2, 2.2, 2.4, 4.9]
CPU freq. (MHz): 2496
Load avg. in last 1, 5, 15 mins (%): [0.0, 0.0, 0.0]
Disk usage (%): 82.7
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 15.9
Available memory (GB): 5.0
Used memory (GB): 10.9
================================
Printing GPU config...
Num GPUs: 1
Has CUDA: True
CUDA version: 11.1
cuDNN enabled: True
cuDNN version: 8005
Current device: 0
Library compiled for CUDA architectures: ['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'compute_37']
GPU 0 Name: NVIDIA GeForce GTX 1660
GPU 0 Is integrated: False
GPU 0 Is multi GPU board: False
GPU 0 Multi processor count: 22
GPU 0 Total memory (GB): 6.0
GPU 0 CUDA capability (maj.min): 7.5
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions