From 4225048dbf4c6bcfa33e52d9895340fe9385dda6 Mon Sep 17 00:00:00 2001 From: "liugao.lg" Date: Tue, 18 Apr 2023 14:41:51 +0800 Subject: [PATCH] provide allow_remote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化模版文件,提升独立repo接入成功率,降低用户阅读文档带来的歧义 Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12354329 * provide allow_remote --- modelscope/cli/template/template.tpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modelscope/cli/template/template.tpl b/modelscope/cli/template/template.tpl index 0c09a925..78fe339c 100644 --- a/modelscope/cli/template/template.tpl +++ b/modelscope/cli/template/template.tpl @@ -122,10 +122,11 @@ class ${pipeline_name}(Pipeline): # Tips: usr_config_path is the temporary save configuration location, after upload modelscope hub, it is the model_id usr_config_path = '${configuration_path}' config = Config({ - 'framework': 'pytorch', - 'task': '${task_name}', - 'model': {'type': 'my-custom-model'}, - "pipeline": {"type": "my-custom-pipeline"} + "framework": 'pytorch', + "task": '${task_name}', + "model": {'type': 'my-custom-model'}, + "pipeline": {"type": "my-custom-pipeline"}, + "allow_remote": True }) config.dump('${configuration_path}' + 'configuration.json')