ultralytics / hub-sdk

SDK for Ultralytics HUB
GNU Affero General Public License v3.0
15 stars 2 forks source link

Bad Request if batch is float during training. #148

Open ambitious-octopus opened 2 weeks ago

ambitious-octopus commented 2 weeks ago

Search before asking

HUB-SDK Component

Train, Integrations, Other

Bug

HUB-SDK -> {'config': {'batchSize': 0.9, 'epochs': 100, 'imageSize': 640, 'patience': 100, 'device': '', 'cache': 'ram'}, 'dataset': {'name': 'coco8.yaml'}, 'lineage': {'architecture': {'name': 'yolov8n'}, 'parent': {'name': 'yolov8n.pt'}}, 'meta': {'name': 'yolov8n.pt'}}
2024-06-18 12:04:17,022 - hub_sdk.helpers.logger - ERROR - Bad Request
2024-06-18 12:04:17,022 - hub_sdk.helpers.logger - ERROR - Received no response from the server while creating the model.

If the batch size is a float the model is not created in hub.

Environment

No response

Minimal Reproducible Example

doesn't work with this:

from ultralytics import YOLO, hub

HUB_KEY = ""
hub.login(HUB_KEY)

model = YOLO("yolov8n.pt")
model.train(data="coco8.yaml", batch=0.2, epochs=100)

works with this:

from ultralytics import YOLO, hub

HUB_KEY = ""
hub.login(HUB_KEY)

model = YOLO("yolov8n.pt")
model.train(data="coco8.yaml", batch=1, epochs=100)

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 2 weeks ago

👋 Hello @ambitious-octopus, thank you for your interest in Ultralytics HUB-SDK 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

Ultralytics may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

sergiuwaxmann commented 2 weeks ago

@ambitious-octopus Yeah, HUB doesn't support the recent ultralytics change for batchSize (can be float). I will try to fix this soon - busy with other tasks at the moment.