mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 04:29:22 +01:00
[to #46408569]fix: pipeline and trainer user-agent add not replacement.
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10890156 * [to #46408569]fix: pipeline and trainer user-agent add not replacement.
This commit is contained in:
@@ -107,9 +107,9 @@ class Model(ABC):
|
||||
)
|
||||
|
||||
if invoked_by is not None:
|
||||
invoked_by = {Invoke.KEY: invoked_by}
|
||||
invoked_by = '%s/%s' % (Invoke.KEY, invoked_by)
|
||||
else:
|
||||
invoked_by = {Invoke.KEY: Invoke.PRETRAINED}
|
||||
invoked_by = '%s/%s' % (Invoke.KEY, Invoke.PRETRAINED)
|
||||
local_model_dir = snapshot_download(
|
||||
model_name_or_path, revision, user_agent=invoked_by)
|
||||
logger.info(f'initialize model from {local_model_dir}')
|
||||
|
||||
Reference in New Issue
Block a user