Update torchvision compatibility table for torch 2.6 (#18935)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2025-01-29 12:27:15 +01:00 committed by GitHub
parent 748c380fc5
commit ed0a7e7dde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,8 +433,8 @@ def check_torchvision():
The compatibility table is a dictionary where the keys are PyTorch versions and the values are lists of compatible
Torchvision versions.
"""
# Compatibility table
compatibility_table = {
"2.6": ["0.21"],
"2.5": ["0.20"],
"2.4": ["0.19"],
"2.3": ["0.18"],
@ -445,7 +445,7 @@ def check_torchvision():
"1.12": ["0.13"],
}
# Extract only the major and minor versions
# Check major and minor versions
v_torch = ".".join(torch.__version__.split("+")[0].split(".")[:2])
if v_torch in compatibility_table:
compatible_versions = compatibility_table[v_torch]