diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ab54fc79..6f391174 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,5 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: +# Ultralytics YOLO 🚀, AGPL-3.0 license +# Dependabot for package version updates # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19a23856..dfb58293 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: os: [ubuntu-latest] python-version: ['3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -102,7 +102,7 @@ jobs: python-version: ['3.10'] model: [yolov8n] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -170,7 +170,7 @@ jobs: python-version: '3.8' # torch 1.8.0 requires python >=3.6, <=3.8 torch: '1.8.0' # min torch version CI https://pypi.org/project/torchvision/ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -212,7 +212,7 @@ jobs: timeout-minutes: 60 runs-on: gpu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install requirements run: pip install -e . - name: Check environment diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 17dac1db..8d52a178 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 5f19064d..40583c3e 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -62,7 +62,7 @@ jobs: # platforms: "linux/amd64" steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # copy full .git directory to access full git history in Docker images diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 4bee9453..c2665fd3 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -13,7 +13,7 @@ jobs: Links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download and install lychee run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e590afb..ea4acef6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: "0" # pulls all commits (needed correct last updated dates in Docs) - name: Set up Python environment diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index 516f765b..aa65f60f 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -3,7 +3,7 @@ # Image is aarch64-compatible for Apple M1 and other ARM architectures i.e. Jetson Nano and Raspberry Pi # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu -FROM arm64v8/ubuntu:22.10 +FROM arm64v8/ubuntu:22.04 # Downloads to user config dir ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/ diff --git a/examples/hub.ipynb b/examples/hub.ipynb index 3b3b1f71..375dabdf 100644 --- a/examples/hub.ipynb +++ b/examples/hub.ipynb @@ -26,14 +26,14 @@ "\n", "\n", "
\n", - " \n", - " \"CI\n", - " \n", + " \n", + " \"CI\n", + " \n", " \"Open\n", "\n", - "Welcome to the [Ultralytics](https://ultralytics.com/) HUB notebook! \n", + "Welcome to the [Ultralytics](https://ultralytics.com/) HUB notebook!\n", "\n", - "This notebook allows you to train [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLOv8](https://github.com/ultralytics/ultralytics) 🚀 models using [HUB](https://hub.ultralytics.com/). Please browse the YOLOv8 Docs for details, raise an issue on GitHub for support, and join our Discord community for questions and discussions!\n", + "This notebook allows you to train [YOLOv5](https://github.com/ultralytics/yolov5) and [YOLOv8](https://github.com/ultralytics/ultralytics) 🚀 models using [HUB](https://hub.ultralytics.com/). Please browse the HUB Docs for details, raise an issue on GitHub for support, and join our Discord community for questions and discussions!\n", "
" ] }, @@ -55,21 +55,21 @@ "colab": { "base_uri": "https://localhost:8080/" }, - "outputId": "22dcbc27-9c6f-44fb-9745-620431f93793" + "outputId": "f8dcca2f-d6d9-4e8d-90a7-85aa357d39fb" }, "source": [ "%pip install ultralytics # install\n", "from ultralytics import YOLO, checks, hub\n", "checks() # checks" ], - "execution_count": null, + "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ - "Ultralytics YOLOv8.0.64 🚀 Python-3.9.16 torch-2.0.0+cu118 CUDA:0 (Tesla T4, 15102MiB)\n", - "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 28.3/166.8 GB disk)\n" + "Ultralytics YOLOv8.0.175 🚀 Python-3.10.12 torch-2.0.1+cu118 CUDA:0 (Tesla T4, 15102MiB)\n", + "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 26.2/78.2 GB disk)\n" ] } ] @@ -94,7 +94,7 @@ "hub.login('API_KEY') # use your API key\n", "\n", "model = YOLO('https://hub.ultralytics.com/MODEL_ID') # use your model URL\n", - "model.train() # train model" + "results = model.train() # train model" ], "execution_count": null, "outputs": [] diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index ca8d4752..6104423e 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = '8.0.175' +__version__ = '8.0.176' from ultralytics.models import RTDETR, SAM, YOLO from ultralytics.models.fastsam import FastSAM diff --git a/ultralytics/hub/session.py b/ultralytics/hub/session.py index f69690d5..57c55f80 100644 --- a/ultralytics/hub/session.py +++ b/ultralytics/hub/session.py @@ -117,8 +117,7 @@ class HUBTrainingSession: if data['status'] == 'new': # new model to start training self.train_args = { - # TODO deprecate 'batch_size' argument in favor of 'batch' - 'batch': data['batch' if 'batch' in data else 'batch_size'], + 'batch': data['batch_size'], # note HUB argument is slightly different 'epochs': data['epochs'], 'imgsz': data['imgsz'], 'patience': data['patience'], @@ -159,6 +158,7 @@ class HUBTrainingSession: data = {'epoch': epoch} if final: data.update({'type': 'final', 'map': map}) + filesize = Path(weights).stat().st_size smart_request('post', url, data=data, @@ -167,7 +167,7 @@ class HUBTrainingSession: retry=10, timeout=3600, thread=False, - progress=True, + progress=filesize, code=4) else: data.update({'type': 'epoch', 'isBest': bool(is_best)}) diff --git a/ultralytics/hub/utils.py b/ultralytics/hub/utils.py index 07da970a..3ca954e6 100644 --- a/ultralytics/hub/utils.py +++ b/ultralytics/hub/utils.py @@ -70,14 +70,15 @@ def requests_with_progress(method, url, **kwargs): (requests.Response): The response object from the HTTP request. Note: - If 'progress' is set to True, the progress bar will display the download progress - for responses with a known content length. + - If 'progress' is set to True, the progress bar will display the download progress for responses with a known + content length. + - If 'progress' is a number then progress bar will display assuming content length = progress. """ progress = kwargs.pop('progress', False) if not progress: return requests.request(method, url, **kwargs) response = requests.request(method, url, stream=True, **kwargs) - total = int(response.headers.get('content-length', 0)) # total size + total = int(response.headers.get('content-length', 0) if isinstance(progress, bool) else progress) # total size try: pbar = TQDM(total=total, unit='B', unit_scale=True, unit_divisor=1024) for data in response.iter_content(chunk_size=1024):