Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 509 forks source link

ImportError: cannot import name 'utils' from partially initialized module 'super_gradients.training' (most likely due to a circular import #2015

Open SombreroMickey opened 5 months ago

SombreroMickey commented 5 months ago

🐛 failed to import

import os import random import torch import requests from PIL import Image from super_gradients.training import dataloaders, models

After first attempt it gives this error:

[~/miniconda3/envs/kaggle1-project/lib/python3.10/site-packages/super_gradients/training/utils/__init__.py:13]
AttributeError: 'NoneType' object has no attribute 'read_bytes'

After second attempt: "ImportError: cannot import name 'utils' from partially initialized module 'super_gradients.training' (most likely due to a circular import) (/root/miniconda3/envs/kaggle1-project/lib/python3.10/site-packages/super_gradients/training/__init__.py)"

Versions

Collecting environment information... PyTorch version: 2.3.1+cpu Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: Could not collect CMake version: version 3.22.1 Libc version: glibc-2.35

Python version: 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-6.8.8-2-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 43 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: AuthenticAMD Model name: AMD EPYC 7H12 64-Core Processor CPU family: 23 Model: 49 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 Stepping: 0 Frequency boost: disabled CPU max MHz: 2600.0000 CPU min MHz: 1500.0000 BogoMIPS: 5190.09

pip3] numpy==1.23.0 [pip3] onnx==1.15.0 [pip3] onnxruntime==1.15.0 [pip3] onnxsim==0.4.36 [pip3] torch==2.3.1+cpu [pip3] torchaudio==2.3.1+cpu [pip3] torchmetrics==0.8.0 [pip3] torchvision==0.18.1+cpu [conda] numpy 1.23.0 pypi_0 pypi [conda] torch 2.3.1+cpu pypi_0 pypi [conda] torchaudio 2.3.1+cpu pypi_0 pypi [conda] torchmetrics 0.8.0 pypi_0 pypi [conda] torchvision 0.18.1+cpu pypi_0 pypi

guor8bu commented 5 months ago

Did you fix it? I have the same problem.

SombreroMickey commented 5 months ago

No, still persists.

SombreroMickey commented 5 months ago

Reopen due to missclick

CrasCris commented 4 months ago

Did you have the steps of how reproduce it in a virtual env ?, cuz i have almost the same config and i dont have that error

The1Percent commented 3 weeks ago

Same issue