diff --git a/modelscope/utils/constant.py b/modelscope/utils/constant.py index aef177bb..a2897b9c 100644 --- a/modelscope/utils/constant.py +++ b/modelscope/utils/constant.py @@ -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' diff --git a/tests/hub/test_hub_revision_release_mode.py b/tests/hub/test_hub_revision_release_mode.py index 74a48527..a3cf8cdf 100644 --- a/tests/hub/test_hub_revision_release_mode.py +++ b/tests/hub/test_hub_revision_release_mode.py @@ -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)