Files
modelscope/tests/hub/test_utils.py
mulin.lyh 3272b2755c [to #43909247]fix: access token in code, move to environment
move access token to environment variable.
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/9681287

    * [to #43909247]fix: access token in code, move to environment
2022-08-09 17:46:56 +08:00

19 lines
516 B
Python

import os
import shutil
from codecs import ignore_errors
from os.path import expanduser
from modelscope.hub.constants import DEFAULT_CREDENTIALS_PATH
# for user citest and sdkdev
TEST_ACCESS_TOKEN1 = os.environ['TEST_ACCESS_TOKEN_CITEST']
TEST_ACCESS_TOKEN2 = os.environ['TEST_ACCESS_TOKEN_SDKDEV']
TEST_MODEL_CHINESE_NAME = '内部测试模型'
TEST_MODEL_ORG = 'citest'
def delete_credential():
path_credential = expanduser(DEFAULT_CREDENTIALS_PATH)
shutil.rmtree(path_credential, ignore_errors=True)