-
Notifications
You must be signed in to change notification settings - Fork 817
fix web-ui bug #5257
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix web-ui bug #5257
Conversation
fix cmd construction
fix bug and param type
fix web-ui bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @slin000111, 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 addresses several web UI-related issues. It primarily corrects the default and available options for the attention mechanism in the LLM training interface, specifically updating it to flash_attention_2
. Additionally, it rectifies misleading user alert messages regarding the impact of closing the terminal during training, providing accurate guidance. A minor bug fix related to updating UI elements in the base UI class is also included.
Highlights
- Web UI Attention Mechanism Configuration: Updated the
attn_impl
dropdown in the LLM training UI (swift/ui/llm_train/hyper.py
) to setflash_attention_2
as the default value and expanded the available choices to includeNone
,sdpa
,eager
,flash_attention_2
, andflash_attention_3
. This addresses an issue with the Flash Attention configuration. - User Alert Message Correction: Corrected the
submit_alert
messages across various LLM training UI modules (llm_grpo.py
,llm_rlhf.py
,llm_train.py
). The previous message incorrectly stated that closing the page would not affect training; the updated message now correctly warns users that closing the terminal will interrupt the training process. - UI Element Update Logic Refinement: Modified the
update_all_settings
method inswift/ui/base.py
to usecls.valid_elements()
instead ofcls.elements()
when returninggr.update()
calls, ensuring that only valid UI elements are considered for updates.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this 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 effectively addresses bugs in the web UI. I've included suggestions to address code duplication concerning the alert message and naming consistency for flash attention implementations. Consolidating the string in the LLMTrain
base class would enhance maintainability.
'zh': | ||
'任务已开始,请查看tensorboard或日志记录,关闭本页面不影响训练过程', | ||
'任务已开始,请查看tensorboard或日志记录,请勿关闭终端,否则训练过程将被打断', | ||
'en': | ||
'Task started, please check the tensorboard or log file, ' | ||
'closing this page does not affect training' | ||
'do not close the terminal, otherwise the training process will be interrupted' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'zh': | ||
'任务已开始,请查看tensorboard或日志记录,关闭本页面不影响训练过程', | ||
'任务已开始,请查看tensorboard或日志记录,请勿关闭终端,否则训练过程将被打断', | ||
'en': | ||
'Task started, please check the tensorboard or log file, ' | ||
'closing this page does not affect training' | ||
'do not close the terminal, otherwise the training process will be interrupted' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gr.Dropdown( | ||
elem_id='attn_impl', | ||
value='flash_attention_2', | ||
choices=[None, 'sdpa', 'eager', 'flash_attention_2', 'flash_attention_3'], | ||
scale=20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR type
PR information
Write the detail information belongs to this PR.
fix web-ui flash-attn, fix web-ui alert.
Experiment results
Paste your experiment result here(if needed).