Commit Graph

2945 Commits

Author SHA1 Message Date
班扬
cc30ea473a ok Merge branch 'master' of github.com:modelscope/modelscope into release/1.38 v1.38.1 2026-07-06 11:39:38 +08:00
Yunlin Mao
d5d13c1f25 Fix release workflow hub dependency (#1749) 2026-07-06 11:39:03 +08:00
班扬
71b135b9ca bump version 2026-07-06 11:29:00 +08:00
班扬
6dfbe9d585 ok Merge branch 'master' of github.com:modelscope/modelscope into release/1.38 2026-07-06 11:28:17 +08:00
Xingjun.Wang
5db3b88e2a add property session in HubApi (#1748) 2026-07-03 10:38:49 +08:00
Yunnglin
766eb8c471 Fix release workflow hub dependency v1.38.0 2026-07-01 10:28:58 +08:00
Yunlin Mao
020cad8229 [Backport] Docker fixes from release/1.38 (#1735)
* Upgrade numpy to 2.x for 1.38 Docker images

- Replace deprecated numpy aliases (np.math.ceil → math.ceil, np.Inf → np.inf)
- Upgrade Docker constraints: numpy>=2.0, cython>=3.0, remove scipy upper bound

* Add ipywidgets dependency to Docker images

* update docker

* fix

* fix

* fix

* fix cpu image

* fix(docker): force numpy>=2.0 after evalscope install

ms-opencompass pulls numpy<2.0, downgrading numpy from 2.x to 1.26.4.
Force reinstall numpy>=2.0 after pip install .[eval] to restore it.

* add metax dockerfile and its requirements for ms-swift 4.2.x (#1734)

* Update npu dockerfile (#1736)

* fix(docker): remove unrelated added docker files

---------

Co-authored-by: Jintao Huang <huangjintao.hjt@alibaba-inc.com>
Co-authored-by: dwd <dwd1044898101@gmail.com>
Co-authored-by: addsubmuldiv <zyh13227@163.com>
2026-06-26 17:10:49 +08:00
班扬
715a85e77d ok Merge branch 'master' of github.com:modelscope/modelscope into release/1.38 2026-06-25 16:04:48 +08:00
Xingjun.Wang
39583ec639 fix: patch_context() use try/finally to ensure unpatch on exception (#1743)
- Wrapped yield in try/finally block so unpatch_hub() executes even when
  the with-body raises an exception, preventing patch state leakage
2026-06-25 16:04:11 +08:00
班扬
ae156e902d merge master and fix conflicts 2026-06-23 16:54:21 +08:00
Xingjun.Wang
cf08fb242d [Fix] Fix studio cli (#1742) 2026-06-23 16:42:49 +08:00
tastelikefeet
c4e6e127be fix (#1740) 2026-06-20 20:49:51 +08:00
tastelikefeet
cecb699cd0 fix (#1740) 2026-06-18 17:16:11 +08:00
Yunnglin
52e227c48b fix(docker): force numpy>=2.0 after evalscope install
ms-opencompass pulls numpy<2.0, downgrading numpy from 2.x to 1.26.4.
Force reinstall numpy>=2.0 after pip install .[eval] to restore it.
2026-06-15 17:43:30 +08:00
addsubmuldiv
8622c814d8 Update npu dockerfile (#1736) 2026-06-15 17:43:03 +08:00
tastelikefeet
c0a92080f4 Fix some security issues (#1737) 2026-06-15 17:42:39 +08:00
dwd
113c93b8e7 add metax dockerfile and its requirements for ms-swift 4.2.x (#1734) 2026-06-15 17:42:03 +08:00
addsubmuldiv
c1d88e6ab7 Update npu dockerfile (#1736) 2026-06-15 11:07:56 +08:00
tastelikefeet
c7dba8de1e Fix some security issues (#1737) 2026-06-15 10:35:50 +08:00
dwd
37eb369e9b add metax dockerfile and its requirements for ms-swift 4.2.x (#1734) 2026-06-15 10:04:01 +08:00
Jintao Huang
f599019206 fix cpu image 2026-06-11 15:15:28 +08:00
Jintao Huang
c0416acc9a fix 2026-06-11 15:15:27 +08:00
Jintao Huang
29442858e9 fix 2026-06-11 15:15:26 +08:00
Jintao Huang
7053c9d6cc fix 2026-06-11 15:15:25 +08:00
Jintao Huang
faae851237 update docker 2026-06-11 15:15:23 +08:00
Yunnglin
1a53418643 Add ipywidgets dependency to Docker images 2026-06-10 14:16:53 +08:00
Xingjun.Wang
2666e3a9ed [Update] Update modelscope-hub requirement (#1733) 2026-06-09 22:23:16 +08:00
Xingjun.Wang
680c3638e0 [Feat & Refactor] Refactor hub and CLI modules (#1732)
* refactor(hub): shim layer delegating to modelscope-hub

- Replace hub/api.py (4674→250 lines) with shim inheriting LegacyHubApi
- Replace hub/snapshot_download.py, callback.py with thin shims
- Partial shim hub/file_download.py (retain http_get_file)
- Shim hub/constants.py and errors.py with legacy aliases
- Shim hub/git.py, repository.py, cache_manager.py, upload_*.py
- Migrate CLI entry to modelscope_hub.cli.main:run_cmd
- Adapt 6 CLI commands as modelscope_hub.cli_plugins
- Delete redundant CLI files (download/upload/login/create/etc)
- Add modelscope-hub>=0.2.0 dependency, Python>=3.10
- Add __getattr__ proxy for forward-compatible method access
- Propagate timeout/max_retries to internal LegacyClient
- Bridge MODELSCOPE_CREDENTIALS_PATH env var to HubConfig

* fix lint: isort/yapf formatting + exclude hub/api.py from hooks

* set modelscope-hub>=0.0.5

* remove unused code

* refactor(hub): standardize token naming — git_token vs token

Disambiguate git token and SDK/API token naming across the hub layer:
- ModelScopeConfig: get_token/save_token → get_git_token/save_git_token
  (old names kept as deprecated aliases with DeprecationWarning)
- GitCommandWrapper: rename token params to git_token in clone/push/config
- Repository/DatasetRepository: auth_token → git_token (deprecated compat kept)
- data_loader.py: update caller to use get_git_token()

SDK token references (HubApi(token=...), get_cookies(access_token=...),
commit_scheduler.token) remain unchanged as they correctly use `token` naming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* remove(msdatasets): remove all Virgo-related implementation

Remove the entire Virgo dataset subsystem which is no longer needed:
- Remove VirgoDataset class and VirgoDownloader
- Remove VirgoAuthConfig and VirgoDatasetConfig
- Remove Hubs.virgo enum value
- Remove fetch_virgo_meta from DataMetaManager
- Remove download_virgo_files from DatasetContextConfig
- Remove test_virgo_dataset.py test file
- Clean up unused imports (pandas, MaxComputeUtil, valid_url, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(hub): add OSS dataset operations and meta-file download to HubApi

Add methods that msdatasets depends on but don't belong in modelscope_hub:
- _legacy_request: internal helper combining legacy HTTP transport with
  application-level envelope validation (Code/Data/Message)
- list_oss_dataset_objects: list OSS storage objects for a dataset
- delete_oss_dataset_object / delete_oss_dataset_dir: delete OSS objects
- fetch_meta_files_from_url: download and cache meta CSV/JSONL files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix imports issue

* fix: address PR review feedback

- cli/plugins.py: change --yes and --all flags to action='store_true'
- hub/git.py: replace os.linesep with .splitlines() for cross-platform safety
- hub/__init__.py: use is_file() with fallback for robust credentials path detection

* fix lint

* update ms hub version

* fix(ci): add PyPI official as fallback index for pip

Aliyun mirror may lag behind PyPI for newly published packages,
causing dependency resolution failures (e.g. modelscope-hub>=0.0.6).
Add pypi.org/simple as extra-index-url so new versions are immediately
available while keeping the Aliyun mirror as the primary source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix UTs

* remove unused UTs

* fix ut

* update modelscope-hub installation for source code

* fix UT

* fix uts

* fix ut

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 22:23:14 +08:00
Xingjun.Wang
d3effb7370 [Update] Update modelscope-hub requirement (#1733) 2026-06-09 20:08:33 +08:00
Xingjun.Wang
0062200b28 [Feature] Add studio module (#1727) 2026-06-09 20:00:55 +08:00
Xingjun.Wang
caac6d8ec7 Addgated_mode for create repo (#1730) 2026-06-09 20:00:54 +08:00
Seas0
204caba8b2 fix: quote version of timm specs in Dockerfile.ubuntu (#1728)
Co-authored-by: Seas0 <liusichen.seas0@bytedance.com>
2026-06-09 20:00:52 +08:00
AAAkater
fbc3be49b2 🐛 fix(clearcache): fix single model cache path (#1724)
* 🐛 fix(clearcache): fix single model cache path

- Add 'models' subdirectory under 'hub' for single model cache paths
- Align dataset and model path structures for consistency

* 🐛 fix(clearcache): use cache root helpers to handle MODELSCOPE_CACHE correctly

Unconditionally prepending `hub/` broke `$MODELSCOPE_CACHE`-set users,
since the cache root has no `hub/` segment in that case. Reuse
get_model_cache_root() / get_dataset_cache_root() from file_utils,
which already handle both default and env-set layouts. Add tests
covering both scenarios.

---------

Co-authored-by: Yunnglin <mao.looper@qq.com>
2026-06-09 20:00:51 +08:00
Xingjun.Wang
50f8d37bc9 [Feat & Refactor] Refactor hub and CLI modules (#1732)
* refactor(hub): shim layer delegating to modelscope-hub

- Replace hub/api.py (4674→250 lines) with shim inheriting LegacyHubApi
- Replace hub/snapshot_download.py, callback.py with thin shims
- Partial shim hub/file_download.py (retain http_get_file)
- Shim hub/constants.py and errors.py with legacy aliases
- Shim hub/git.py, repository.py, cache_manager.py, upload_*.py
- Migrate CLI entry to modelscope_hub.cli.main:run_cmd
- Adapt 6 CLI commands as modelscope_hub.cli_plugins
- Delete redundant CLI files (download/upload/login/create/etc)
- Add modelscope-hub>=0.2.0 dependency, Python>=3.10
- Add __getattr__ proxy for forward-compatible method access
- Propagate timeout/max_retries to internal LegacyClient
- Bridge MODELSCOPE_CREDENTIALS_PATH env var to HubConfig

* fix lint: isort/yapf formatting + exclude hub/api.py from hooks

* set modelscope-hub>=0.0.5

* remove unused code

* refactor(hub): standardize token naming — git_token vs token

Disambiguate git token and SDK/API token naming across the hub layer:
- ModelScopeConfig: get_token/save_token → get_git_token/save_git_token
  (old names kept as deprecated aliases with DeprecationWarning)
- GitCommandWrapper: rename token params to git_token in clone/push/config
- Repository/DatasetRepository: auth_token → git_token (deprecated compat kept)
- data_loader.py: update caller to use get_git_token()

SDK token references (HubApi(token=...), get_cookies(access_token=...),
commit_scheduler.token) remain unchanged as they correctly use `token` naming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* remove(msdatasets): remove all Virgo-related implementation

Remove the entire Virgo dataset subsystem which is no longer needed:
- Remove VirgoDataset class and VirgoDownloader
- Remove VirgoAuthConfig and VirgoDatasetConfig
- Remove Hubs.virgo enum value
- Remove fetch_virgo_meta from DataMetaManager
- Remove download_virgo_files from DatasetContextConfig
- Remove test_virgo_dataset.py test file
- Clean up unused imports (pandas, MaxComputeUtil, valid_url, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(hub): add OSS dataset operations and meta-file download to HubApi

Add methods that msdatasets depends on but don't belong in modelscope_hub:
- _legacy_request: internal helper combining legacy HTTP transport with
  application-level envelope validation (Code/Data/Message)
- list_oss_dataset_objects: list OSS storage objects for a dataset
- delete_oss_dataset_object / delete_oss_dataset_dir: delete OSS objects
- fetch_meta_files_from_url: download and cache meta CSV/JSONL files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix imports issue

* fix: address PR review feedback

- cli/plugins.py: change --yes and --all flags to action='store_true'
- hub/git.py: replace os.linesep with .splitlines() for cross-platform safety
- hub/__init__.py: use is_file() with fallback for robust credentials path detection

* fix lint

* update ms hub version

* fix(ci): add PyPI official as fallback index for pip

Aliyun mirror may lag behind PyPI for newly published packages,
causing dependency resolution failures (e.g. modelscope-hub>=0.0.6).
Add pypi.org/simple as extra-index-url so new versions are immediately
available while keeping the Aliyun mirror as the primary source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix UTs

* remove unused UTs

* fix ut

* update modelscope-hub installation for source code

* fix UT

* fix uts

* fix ut

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 20:00:20 +08:00
Yunnglin
b87b344f47 Upgrade numpy to 2.x for 1.38 Docker images
- Replace deprecated numpy aliases (np.math.ceil → math.ceil, np.Inf → np.inf)
- Upgrade Docker constraints: numpy>=2.0, cython>=3.0, remove scipy upper bound
2026-06-08 14:52:00 +08:00
Xingjun.Wang
1804ac6bf8 [Feature] Add studio module (#1727) 2026-06-05 14:33:25 +08:00
Xingjun.Wang
63ff6ec6e9 Addgated_mode for create repo (#1730) 2026-06-05 14:30:18 +08:00
Seas0
491e3df224 fix: quote version of timm specs in Dockerfile.ubuntu (#1728)
Co-authored-by: Seas0 <liusichen.seas0@bytedance.com>
2026-06-03 18:50:04 +08:00
AAAkater
2719754beb 🐛 fix(clearcache): fix single model cache path (#1724)
* 🐛 fix(clearcache): fix single model cache path

- Add 'models' subdirectory under 'hub' for single model cache paths
- Align dataset and model path structures for consistency

* 🐛 fix(clearcache): use cache root helpers to handle MODELSCOPE_CACHE correctly

Unconditionally prepending `hub/` broke `$MODELSCOPE_CACHE`-set users,
since the cache root has no `hub/` segment in that case. Reuse
get_model_cache_root() / get_dataset_cache_root() from file_utils,
which already handle both default and env-set layouts. Add tests
covering both scenarios.

---------

Co-authored-by: Yunnglin <mao.looper@qq.com>
2026-06-03 18:39:39 +08:00
Yunnglin
872aa6eb64 update version v1.38.0 2026-06-01 18:19:44 +08:00
tastelikefeet
8bab4b9bc1 Fix bug: 1. patch_context cannot revert classmethod 2. kernels testcase miss trust_remote_code and revision (#1729) 2026-05-31 16:11:21 +08:00
Xingjun.Wang
76cf0450a1 Fix timeout for create_model_tag (#1723)
* update timeout for create_model_tag

* fix review comments
2026-05-29 14:10:45 +08:00
tastelikefeet
70197537df Fix adaseq trust_remote_code (#1721) 2026-05-20 23:12:03 +08:00
雨泓
57961c1f4b fix pipelines in plugin 2026-05-19 15:05:21 +08:00
tastelikefeet
d52d5e67b2 Add whitelist to iic and damo (#1720) 2026-05-19 12:53:02 +08:00
tastelikefeet
cddbabaed5 Fix pipeline parameter (#1717) 2026-05-15 14:06:55 +08:00
xvxuopop
6f347a203c update npu dockerfile (#1716) 2026-05-14 10:36:31 +08:00
Xingjun.Wang
d968a2cf87 [Fix] Fix split detection (#1714) 2026-05-13 17:46:20 +08:00
Xingjun.Wang
a56e2ce08f [Fix] fix invalid commit (#1715) 2026-05-13 17:46:07 +08:00
tastelikefeet
d77bc8f83b fix trainer + trust_remote_code (#1713) 2026-05-12 19:16:13 +08:00