fix HUB download and train (#15896)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-08-29 17:15:24 +02:00 committed by GitHub
parent 5f01e15e7b
commit 0f9f7b806c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -128,8 +128,10 @@ class Model(nn.Module):
if self.is_hub_model(model):
# Fetch model from HUB
checks.check_requirements("hub-sdk>=0.0.8")
self.session = HUBTrainingSession.create_session(model)
model = self.session.model_file
session = HUBTrainingSession.create_session(model)
model = session.model_file
if session.train_args: # training sent from HUB
self.session = session
# Check if Triton Server model
elif self.is_triton_model(model):