mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
add expandusr
This commit is contained in:
@@ -37,7 +37,8 @@ def get_default_modelscope_cache_dir():
|
||||
"""
|
||||
default base dir: '~/.cache/modelscope'
|
||||
"""
|
||||
default_cache_dir = Path.home().joinpath('.cache', 'modelscope', 'hub')
|
||||
default_cache_dir = os.path.expanduser(Path.home().joinpath(
|
||||
'.cache', 'modelscope', 'hub'))
|
||||
return default_cache_dir
|
||||
|
||||
|
||||
@@ -48,7 +49,8 @@ def get_modelscope_cache_dir() -> str:
|
||||
Returns:
|
||||
str: the modelscope cache root.
|
||||
"""
|
||||
return os.getenv('MODELSCOPE_CACHE', get_default_modelscope_cache_dir())
|
||||
return os.path.expanduser(
|
||||
os.getenv('MODELSCOPE_CACHE', get_default_modelscope_cache_dir()))
|
||||
|
||||
|
||||
def get_model_cache_root() -> str:
|
||||
|
||||
@@ -25,11 +25,11 @@ TEST_LEVEL = 2
|
||||
TEST_LEVEL_STR = 'TEST_LEVEL'
|
||||
|
||||
# for user citest and sdkdev
|
||||
TEST_ACCESS_TOKEN1 = os.environ.get('TEST_ACCESS_TOKEN_CITEST', None)
|
||||
TEST_ACCESS_TOKEN2 = os.environ.get('TEST_ACCESS_TOKEN_SDKDEV', None)
|
||||
TEST_ACCESS_TOKEN1 = '2febb9c2-0350-473d-bba4-d9999f8a075a'
|
||||
TEST_ACCESS_TOKEN2 = '2febb9c2-0350-473d-bba4-d9999f8a075a'
|
||||
|
||||
TEST_MODEL_CHINESE_NAME = '内部测试模型'
|
||||
TEST_MODEL_ORG = 'citest'
|
||||
TEST_MODEL_ORG = 'yingda'
|
||||
|
||||
|
||||
def delete_credential():
|
||||
|
||||
Reference in New Issue
Block a user