Skip to content

[swanlab] Update swanlab notification method#7213

Merged
Jintao-Huang merged 12 commits intomodelscope:mainfrom
Jintao-Huang:update_swanlab_notification_method
Dec 26, 2025
Merged

[swanlab] Update swanlab notification method#7213
Jintao-Huang merged 12 commits intomodelscope:mainfrom
Jintao-Huang:update_swanlab_notification_method

Conversation

@Jintao-Huang
Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Jintao-Huang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the flexibility of SwanLab's notification system by abstracting the notification method from a Lark-specific implementation to a generic, multi-platform approach. It also includes minor but important clarifications in the documentation regarding the 'packing' argument's behavior and introduces a default project setting for WANDB logging, improving user experience and clarity across the board.

Highlights

  • Generalized SwanLab Notifications: The SwanLab integration has been updated to support a wider range of notification methods beyond just Lark (Feishu). It now includes DingTalk, Email, Discord, WXWork, and Slack, providing more flexibility for experiment result notifications.
  • Refined 'packing' Parameter Description: The documentation for the packing parameter has been clarified to state that it packs data samples into 'approximately' uniform length, with an assurance that complete sequences are not split. This improves accuracy in describing its behavior.
  • Default WANDB Project Setting: A new default project name, 'ms-swift', is now automatically set for Weights & Biases (WANDB) integration if --report_to wandb is specified, streamlining the setup process.
  • Updated Documentation: All relevant documentation files (both Chinese and English versions) have been updated to reflect the new generic SwanLab notification parameters and the refined packing description.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully refactors the SwanLab notification mechanism to support multiple channels, which is a great improvement in flexibility. The implementation in the argument parsing and trainer logic is solid. However, I've identified a couple of areas for improvement. The UI for configuring SwanLab notifications has been removed but not replaced with the new generic options, resulting in a feature regression for UI users. Additionally, the code could be made more robust by adding validation for the swanlab_notification_method to handle unsupported inputs gracefully. The documentation updates are clear and align well with the code changes.

@Jintao-Huang
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the SwanLab notification mechanism to be more generic, supporting multiple services instead of being hardcoded for Lark. This is a solid improvement for extensibility. The changes are consistently applied across the codebase, including documentation, argument parsing, and the UI. I've identified a minor documentation inconsistency that could be addressed for better clarity.

@Jintao-Huang Jintao-Huang merged commit 5904a51 into modelscope:main Dec 26, 2025
2 of 3 checks passed
meichangsu1 pushed a commit to tpx818/ms-swift that referenced this pull request Jan 22, 2026
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