Skip to content

support download model with different mirrors#266

Merged
ganisback merged 1 commit intomainfrom
support-different-mirrors
Feb 11, 2025
Merged

support download model with different mirrors#266
ganisback merged 1 commit intomainfrom
support-different-mirrors

Conversation

@ganisback
Copy link
Collaborator

@ganisback ganisback commented Feb 11, 2025

What is this feature?

user can download model with different source repo id.
https://hub.opencsg.com/hf for hugging model id
https://hub.opencsg.com/ms for modelscope model id

Why do we need this feature?
some open source tool like opencompass can support donwload with modelscope repo id, so using this way, csghub user can specify the id to download from csghub

Who is this feature for?
csghub sdk

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

MR Summary:

The summary is added by @codegpt.

The Merge Request introduces support for downloading models from different mirrors based on the source repository ID. It allows users to specify a repository ID from either Hugging Face or ModelScope to download models directly from CSGHub. This feature is aimed at enhancing the flexibility and usability of the CSGHub SDK by accommodating different repository sources.

Key updates include:

  1. Added functionality to handle different mirror sources for model downloads.
  2. Updated middleware and API routing to support new download paths based on the source repository ID.
  3. Modified the MirrorStore interface and its implementation to support repository lookups by mapping types.
  4. Enhanced Swagger documentation to reflect new query parameters and repository path options.
  5. Updated unit tests to cover new functionality and ensure compatibility with existing features.

@starship-github
Copy link

MR Evaluation:

This feature is still under test, evaluation are given by AI and might be inaccurate.

After evaluation, the code changes in the Merge Request get score: 89-90.

Analysis for the evaluation score:
  • The code change may not include corresponding unit tests.
  • The code change may not include corresponding integration testing.
Tips

CodeReview Commands (invoked as MR or PR comments)

  • @codegpt /review to trigger an code review.
  • @codegpt /evaluate to trigger code evaluation process.
  • @codegpt /describe to regenerate the summary of the MR.
  • @codegpt /secscan to scan security vulnerabilities for the MR or the Repository.
  • @codegpt /help to get help.

CodeReview Discussion Chat

There are 2 ways to chat with Starship CodeReview:

  • Review comments: Directly reply to a review comment made by StarShip.
    Example:
    • @codegpt How to fix this bug?
  • Files and specific lines of code (under the "Files changed" tab):
    Tag @codegpt in a new review comment at the desired location with your query.
    Examples:
    • @codegpt generate unit testing code for this code snippet.

Note: Be mindful of the bot's finite context window.
It's strongly recommended to break down tasks such as reading entire modules into smaller chunks.
For a focused discussion, use review comments to chat about specific files and their changes, instead of using the MR/PR comments.

CodeReview Documentation and Community

  • Visit our Documentation
    for detailed information on how to use Starship CodeReview.

About Us:

Visit the OpenCSG StarShip website for the Dashboard and detailed information on CodeReview, CodeGen, and other StarShip modules.

@ganisback ganisback merged commit bdb6e54 into main Feb 11, 2025
6 checks passed
@ganisback ganisback deleted the support-different-mirrors branch February 11, 2025 08:27
@starship-github
Copy link

The StarShip CodeReviewer was triggered but terminated because it encountered an issue: The MR state is not opened.

Tips

CodeReview Commands (invoked as MR or PR comments)

  • @codegpt /review to trigger an code review.
  • @codegpt /evaluate to trigger code evaluation process.
  • @codegpt /describe to regenerate the summary of the MR.
  • @codegpt /secscan to scan security vulnerabilities for the MR or the Repository.
  • @codegpt /help to get help.

CodeReview Discussion Chat

There are 2 ways to chat with Starship CodeReview:

  • Review comments: Directly reply to a review comment made by StarShip.
    Example:
    • @codegpt How to fix this bug?
  • Files and specific lines of code (under the "Files changed" tab):
    Tag @codegpt in a new review comment at the desired location with your query.
    Examples:
    • @codegpt generate unit testing code for this code snippet.

Note: Be mindful of the bot's finite context window.
It's strongly recommended to break down tasks such as reading entire modules into smaller chunks.
For a focused discussion, use review comments to chat about specific files and their changes, instead of using the MR/PR comments.

CodeReview Documentation and Community

  • Visit our Documentation
    for detailed information on how to use Starship CodeReview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants