Cleanup session.py (#16352)

pull/16344/head^2
Glenn Jocher 4 months ago committed by GitHub
parent ff2d268bdb
commit e24a6f3b05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      ultralytics/hub/session.py

@ -161,16 +161,6 @@ class HUBTrainingSession:
HUBModelError: If the identifier format is not recognized.
"""
api_key, model_id, filename = None, None, None
# path = identifier.split(f"{HUB_WEB_ROOT}/models/")[-1]
# parts = path.split("_")
# if Path(path).suffix in {".pt", ".yaml"}:
# filename = path
# elif len(parts) == 2 and len(parts[0]) == 42 and len(parts[1]) == 20:
# api_key, model_id = parts
# elif len(path) == 20:
# model_id = path
if Path(identifier).suffix in {".pt", ".yaml"}:
filename = identifier
elif identifier.startswith(f"{HUB_WEB_ROOT}/models/"):

Loading…
Cancel
Save