Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add push to hub tracker #1214

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading