Repository navigation
Require ultralytics 8.0.200 and warn on older releases - #79
Merged
Merged
Conversation
Releases before 8.0.200 keep their helpers under ultralytics.yolo.utils, so
the integration's import of ultralytics.utils failed and the whole
integration turned off without a word, including on 8.0.0, the documented
minimum. The compat minimum moves to 8.0.200 (which also drops the setuptools
pin 8.0.0 needed on Python 3.12+), and instrument("ultralytics") logs a
warning naming the installed version when it is older.
Closes #71
Coverage report
Top uncovered files
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #71.
Problem
On ultralytics releases before 8.0.200, the ultralytics integration was silently disabled, including on 8.0.0, the documented minimum. Those releases keep their helpers under
ultralytics.yolo.utils. The integration importedultralyticsandultralytics.utils.WEIGHTS_DIRin the sametry, so the failed second import set_ultralytics = None, andinstrument("ultralytics")succeeded while doing nothing.Change
As decided on #71, this raises the minimum rather than supporting the old layout:
Compat matrix: ultralytics
mingoes from 8.0.0 to 8.0.200. Thesetuptoolspin that 8.0.0 needed on Python 3.12 and 3.13 (it importedpkg_resourceswithout declaring setuptools) goes away.docs/compatibility.mdis regenerated.Integration: the two imports are separate now. If
ultralyticsimports butultralytics.utilsdoesn't, the installed version is recorded, andinstrument("ultralytics")logs the warning below instead of returning silently. The warning comes frominstrument(), not from the import, because the integrations module loads for every SDK user, including those not using ultralytics:Compat test: the
xfailmarkers for the old layout are removed. Thepredict()marker for ultralytics model.predict() is not tracked #72 stays.Changelog: a new "Changed" entry.
Tested
minrows with ultralytics 8.0.200 and numpy 1.26.4 on Python 3.10, 3.11, 3.12 and 3.13: 2 passed and 1 xfailed (ultralytics model.predict() is not tracked #72) each.install_auto_load_patchlogs the warning and leavesYOLO.__init__unpatched. It fails without the SDK change.🤖 Generated with Claude Code