[Docs] Update news and bump version - #49
Merged
Merged
Conversation
…o facade The compat snapshot_download wrapper forwards progress_callbacks to HubApi.download_repo, but the facade dropped the parameter and never passed it to DownloadManager.download_repo, so any real (non-mocked) call raised TypeError. Restore full-chain propagation: HubApi.download_repo now accepts and forwards progress_callbacks to the DownloadManager delegate (DownloadManager already supports it); compat.snapshot_download accepts and forwards it. Add an integration-style test that mocks only the DownloadManager delegate so the real compat wrapper and HubApi facade both execute.
DownloadManager._find_legacy_repo_dir now probes both historical cache layouts in priority order: {base}/{type}s/{owner}/{name___} (MODELSCOPE_CACHE explicitly set) and {base}/hub/{type}s/{owner}/{name___} (default ~/.cache/modelscope/hub). It returns the first existing non-empty match, or None when the cache is clean so the caller falls back to the new layout. Adds network-free regression tests covering both layouts, multi-dot name encoding, clean cache, and empty legacy dir.
…oid conflict modelscope and modelscope-hub both declared modelscope/ms console scripts, so installing both (modelscope depends on modelscope-hub) collided on the same binary (e.g. /usr/local/bin/modelscope-3.12 on FreeBSD pkg). Rename the hub entry points to modelscope-hub/ms-hub so the umbrella modelscope package keeps modelscope/ms while standalone modelscope-hub users get their own non-colliding CLI. Fixes modelscope/modelscope#1752.
Bring the News section up to date through v0.1.8 (v0.1.5-v0.1.8 expanded, v0.1.4 and older collapsed under a details block). Within each release, merge same-type entries (Feature/Fix) into a single bullet instead of listing them flat. CLI references use the new ms-hub command name.
`HubApi.login` caught `HubError` -- the base class of every SDK exception --
and re-raised everything as `AuthenticationError("...token was rejected by
the server")` while calling `clear_token()`. Three problems followed:
* network, timeout and 5xx failures were all reported as an invalid token
* the server's own message and RequestId were discarded, leaving no way to
diagnose the failure or trace it server-side
* a failed attempt deleted the credential already on disk, so a single
mistyped token logged the user out of a working session
Both ModelScope sites answer an unknown token with the same HTTP 400 and
business code 10010103009, so the server cannot distinguish "invalid token"
from "token issued by the other site" -- only the client knows which site it
addressed, which is why that disambiguation now happens here.
Changes:
* classify 4xx by the server business code, mapping 10010103009 to
AuthenticationError (E3001); 5xx stays a retryable ServerError so a
transient outage is never reclassified as permanent
* propagate non-authentication failures unchanged, preserving their type,
error code, message and RequestId
* leave persisted credentials untouched on failure and roll back only the
in-memory state of the instance
* probe the peer site when the endpoint was not pinned, and point at
`--endpoint` when the token turns out to be valid there
* centralise endpoint normalisation in `HubConfig.normalize_endpoint` so a
bare or upper-case scheme no longer fails deep inside the transport layer
* remove every credential artefact together on teardown, and propagate a
cleared token to an already constructed legacy client
* print the full error cause chain under `--verbose`
Adds 29 regression tests that stub only the `requests` transport, so the
config, facade, legacy client and error-translation layers all take part.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.