lint
This commit is contained in:
parent
c244af0dc3
commit
555ca8d780
|
@ -212,10 +212,7 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
|
||||||
):
|
):
|
||||||
raise ValueError("Distributed training does not support layer-wise GaLore.")
|
raise ValueError("Distributed training does not support layer-wise GaLore.")
|
||||||
|
|
||||||
if (
|
if finetuning_args.use_badam and training_args.parallel_mode == ParallelMode.DISTRIBUTED:
|
||||||
finetuning_args.use_badam
|
|
||||||
and training_args.parallel_mode == ParallelMode.DISTRIBUTED
|
|
||||||
):
|
|
||||||
if finetuning_args.badam_mode == "ratio":
|
if finetuning_args.badam_mode == "ratio":
|
||||||
raise ValueError("Radio-based BAdam does not yet support distributed training, use layer-wise BAdam.")
|
raise ValueError("Radio-based BAdam does not yet support distributed training, use layer-wise BAdam.")
|
||||||
elif not is_deepspeed_zero3_enabled():
|
elif not is_deepspeed_zero3_enabled():
|
||||||
|
|
|
@ -113,9 +113,7 @@ def test_glm4_tool_formatter():
|
||||||
assert formatter.apply(content=json.dumps(tools)) == [
|
assert formatter.apply(content=json.dumps(tools)) == [
|
||||||
"你是一个名为 ChatGLM 的人工智能助手。你是基于智谱AI训练的语言模型 GLM-4 模型开发的,"
|
"你是一个名为 ChatGLM 的人工智能助手。你是基于智谱AI训练的语言模型 GLM-4 模型开发的,"
|
||||||
"你的任务是针对用户的问题和要求提供适当的答复和支持。# 可用工具\n\n"
|
"你的任务是针对用户的问题和要求提供适当的答复和支持。# 可用工具\n\n"
|
||||||
"## test_tool\n\n{}\n在调用上述函数时,请使用 Json 格式表示调用的参数。".format(
|
"## test_tool\n\n{}\n在调用上述函数时,请使用 Json 格式表示调用的参数。".format(json.dumps(tools[0], indent=4))
|
||||||
json.dumps(tools[0], indent=4)
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue