-
Notifications
You must be signed in to change notification settings - Fork 353
Add finetune stop pause resume finetune_cost finetune_progress multi-gpu training and enhance model infer logic etc. #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
support stages: sft, pt, dpo |
|
PR描述需要补充完整。 |
|
|
||
| lazyllm.config.add('trainable_module_config_map_path', str, '', 'TRAINABLE_MODULE_CONFIG_MAP_PATH', | ||
| description='The default path for trainable module config map.') | ||
| lazyllm.config.add( |
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.
不要做无关的lint
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.
恢复原来状态和格式
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.
代码合并时自动格式换行,现恢复原状
|
|
||
| kw = kw or self._get_train_or_deploy_args(mode, disable=['base_model', 'target_path']) | ||
| # Get default args and merge with user-provided kw, with kw taking precedence | ||
| default_args = self._get_train_or_deploy_args(mode, disable=['base_model', 'target_path']) |
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.
这里会改变原来的逻辑,正常情况下是用户传kw,就完全使用用户给的;否则使用默认的;现在行为变成了合并参数,即用户传入的覆盖默认的。
这个kw主要用于_async_finetune,其余场景都没用上,需要确认一下_async_finetune场景这样做是否符合预期
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.
自测时发现不同微调场景用户可能只会传部分参数,但还有些参数是必须的。所以改成了当前逻辑,即优先使用用户传的参数+其它用户没传又需要的参数(使用默认值)。
| kw = kw or self._get_train_or_deploy_args(mode, disable=['base_model', 'target_path']) | ||
| # Get default args and merge with user-provided kw, with kw taking precedence | ||
| default_args = self._get_train_or_deploy_args(mode, disable=['base_model', 'target_path']) | ||
| if kw: |
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.
kw = {**default_args, **kw} if kw else default_args
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描述中,没涉及的内容要清除掉。 |


📌 PR 内容 / PR Description
/v1/finetuneTasks/{job_id}:pause和/v1/finetuneTasks/{job_id}:resumeAPI 接口✅ 变更类型 / Type of Change