-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
device handling in yolov8.py: device=device? #3
Comments
I have the same issue when running this notebook in google colab. No matter what I change the device to I always get the following error: |
A quick fix is to import version 0.1.0 from pip. |
Apologies for the friction you ran into getting started. I pushed a change to enable mps acceleration support for YOLOv8 training in Autodistill but the default device configuration wasn't set up properly. Upgrade to autodistill-yolov8 0.1.3:
Use this code to train:
Where devices is the list of CUDA device IDs you want to use in training. |
Hi @capjamesg ,
|
Just a question:
Tried to run the code on windows, and DEVICE overwrote function parameter for self.yolo.train when run with cpu argument on machine with gpu. Is this behaviour intended?
call in main
target_model.train(DATA_YAML_PATH, epochs=2, device = 'cpu')
yolov8.py
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class YOLOv8(DetectionTargetModel):
def init(self, model_name):
self.yolo = YOLO(model_name)
Best regards,
Reinhard
The text was updated successfully, but these errors were encountered: