Skip to content

Commit

Permalink
add push to hub tracker (modelscope#1249)
Browse files Browse the repository at this point in the history
(cherry picked from commit 16cc33c)
  • Loading branch information
tastelikefeet authored Jun 28, 2024
1 parent d31d889 commit 2383259
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion swift/hub/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import re
import shutil
import tempfile
import time
import uuid
from http import HTTPStatus
from http.cookiejar import CookieJar
Expand Down Expand Up @@ -142,7 +143,7 @@ def create_model(self,
'Visibility': visibility, # server check
'License': license,
'OriginalModelId': original_model_id,
'TrainId': os.environ.get('MODELSCOPE_TRAIN_ID', ''),
'TrainId': os.environ.get('MODELSCOPE_TRAIN_ID') or f'swift-{time.time()}',
}
r = self.session.post(
path, json=body, cookies=cookies, headers=self.headers)
Expand Down

0 comments on commit 2383259

Please sign in to comment.