autodistill / autodistill-yolonas

YOLO-NAS module for use with Autodistill.
https://docs.autodistill.com
Other
5 stars 1 forks source link

YoloNas training error #1

Open 1chimaruGin opened 1 year ago

1chimaruGin commented 1 year ago

How to fix this error?

My code

from autodistill_yolonas import YOLONAS

# load the model
target_model = YOLONAS()

target_model.train("data/dataset", epochs=10)

Error:

root@5bbe96e58fd8:/workdir# python workdir/yolonas_train.py 
The console stream is logged into /root/sg_logs/console.log
[2023-07-19 05:46:53] INFO - crash_tips_setup.py - Crash tips is enabled. You can set your environment variable to CRASH_HANDLER=FALSE to disable it
Traceback (most recent call last):
  File "workdir/yolonas_train.py", line 2, in <module>
    from autodistill_yolonas import YOLONAS
  File "/opt/conda/lib/python3.7/site-packages/autodistill_yolonas/__init__.py", line 1, in <module>
    from autodistill_yolonas.yolonas_model import YOLONAS
  File "/opt/conda/lib/python3.7/site-packages/autodistill_yolonas/yolonas_model.py", line 6, in <module>
    from super_gradients.training import Trainer, models
  File "/opt/conda/lib/python3.7/site-packages/super_gradients/__init__.py", line 2, in <module>
    from super_gradients.training import losses, utils, datasets_utils, DataAugmentation, Trainer, KDTrainer, QATTrainer
  File "/opt/conda/lib/python3.7/site-packages/super_gradients/training/__init__.py", line 4, in <module>
    from super_gradients.training.sg_trainer import Trainer
  File "/opt/conda/lib/python3.7/site-packages/super_gradients/training/sg_trainer/__init__.py", line 3, in <module>
    from super_gradients.training.sg_trainer.sg_trainer import Trainer, MultiGPUMode, StrictLoad
  File "/opt/conda/lib/python3.7/site-packages/super_gradients/training/sg_trainer/sg_trainer.py", line 15, in <module>
    from piptools.scripts.sync import _get_installed_distributions
  File "/opt/conda/lib/python3.7/site-packages/piptools/scripts/sync.py", line 17, in <module>
    from .. import sync
  File "/opt/conda/lib/python3.7/site-packages/piptools/sync.py", line 11, in <module>
    from pip._internal.commands.freeze import DEV_PKGS
ImportError: cannot import name 'DEV_PKGS' from 'pip._internal.commands.freeze' (/opt/conda/lib/python3.7/site-packages/pip/_internal/commands/freeze.py)
capjamesg commented 1 year ago

@1chimaruGin Apolygies for the slow response. Were you able to fix this issue? if not, I will take a closer look. My first inclination is we need to update the way we install YOLO-NAS.

doubleplusplus commented 1 year ago

I have a different error when training Yolonas:

Incorrect checkpoint directory