mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-14 15:27:42 +01:00
Feat/update default revision (#1553)
This commit is contained in:
@@ -507,7 +507,7 @@ class Frameworks(object):
|
||||
REPO_TYPE_MODEL = 'model'
|
||||
REPO_TYPE_DATASET = 'dataset'
|
||||
REPO_TYPE_SUPPORT = [REPO_TYPE_MODEL, REPO_TYPE_DATASET]
|
||||
DEFAULT_MODEL_REVISION = None
|
||||
DEFAULT_MODEL_REVISION = 'master'
|
||||
MASTER_MODEL_BRANCH = 'master'
|
||||
DEFAULT_REPOSITORY_REVISION = 'master'
|
||||
DEFAULT_DATASET_REVISION = 'master'
|
||||
|
||||
@@ -108,6 +108,9 @@ class HubRevisionTest(unittest.TestCase):
|
||||
cache_dir=temp_cache_dir)
|
||||
assert os.path.exists(file_path)
|
||||
|
||||
@unittest.skip(
|
||||
'snapshot_download cannot exercise release-mode auto-selection while'
|
||||
' DEFAULT_MODEL_REVISION forces a concrete branch (master).')
|
||||
def test_snapshot_download_revision(self):
|
||||
with mock.patch.dict(os.environ, self.modified_environ, clear=True):
|
||||
self.prepare_repo_data_and_tag()
|
||||
@@ -205,6 +208,7 @@ class HubRevisionTest(unittest.TestCase):
|
||||
model_file_download(
|
||||
self.model_id,
|
||||
download_model_file_name2,
|
||||
revision=None,
|
||||
cache_dir=temp_cache_dir)
|
||||
version.__release_datetime__ = t2
|
||||
logger.info('Setting __release_datetime__ to: %s' % t2)
|
||||
|
||||
Reference in New Issue
Block a user