pypi ultralytics 8.3.210
v8.3.210 - `ultralytics 8.3.210` Skip non-finite training forward passes (#22353)

latest release: 8.3.211
11 hours ago

🌟 Summary

More stable training by skipping non-finite loss batches, smoother RT-DETR device/precision moves, and better ONNX profiling for multi-input/dynamic-shape models. πŸš€

πŸ“Š Key Changes

  • Training stability

    • Skip non-finite loss batches (NaN/Inf) during forward pass with a clear warning: β€œNon-finite forward pass, skipping batch...” πŸ›‘οΈ (See PR: Skip non-finite training forward passes)
    • Clean initialization of running training loss (tloss) for more consistent logging πŸ“‰
    • Version bump to 8.3.210 🧩
  • RT-DETR device/precision consistency

    • Added a custom _apply to RTDETRDetectionModel so anchors and masks follow .to(), .cuda(), .cpu(), .half(), etc. πŸ” (See PR: Add _apply to RTDETR)
  • ONNX benchmarking improvements

    • Profiling now supports multi-input models and dynamic shapes with sensible defaults and clear validation errors βœ…
    • Builds input dictionaries for all inputs and preserves correct dtypes during warmup and timed runs ⏱️ (See PR: Support profiling for multi-input ONNX models)

🎯 Purpose & Impact

  • More reliable training out of the box

    • Prevents crashes and bad updates from invalid lossesβ€”especially helpful with mixed precision (FP16/BF16) and aggressive hyperparameters βš–οΈ
    • You may notice occasional warnings and slightly fewer processed batches per epoch; overall convergence should be steadier πŸ“ˆ
  • Fewer device/dtype gotchas for RT-DETR

    • Seamless moves across CPU/GPU and precision changes without manual fixes, reducing edge-case bugs in training, inference, export, and deployment πŸ”§
  • Robust and accurate ONNX profiling

    • Benchmark complex ONNX models (multiple inputs, dynamic shapes) without tedious setup, enabling clearer performance comparisons and faster iteration πŸ“Š

Quick update tip:

  • Upgrade to the latest version: pip install -U ultralytics βœ…

What's Changed

  • Add _apply method to RTDETR for better device consistency by @Y-T-G in #22341
  • Support profiling for ONNX models with multiple inputs by @lmycross in #22262
  • ultralytics 8.3.210 Skip non-finite training forward passes by @glenn-jocher in #22353

Full Changelog: v8.3.209...v8.3.210

Don't miss a new ultralytics release

NewReleases is sending notifications on new releases.