Skip to content

Commit

Permalink
create new pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
greycooker committed Jan 3, 2024
1 parent a575fdb commit 59f3fd3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion llm/finetune_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def main():
gen_args, quant_args, model_args, data_args, training_args = parser.parse_json_file_and_cmd_lines(
json_file_idx
)

training_args.print_config(model_args, "Model")
training_args.print_config(data_args, "Data")
training_args.print_config(quant_args, "Quant")
Expand Down
4 changes: 0 additions & 4 deletions tests/test_argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def parse_args():
model_args = parser.parse_args_into_dataclasses()
else:
json_file_idx = json_indices[0]
# pdb.set_trace()
model_args = parser.parse_json_file_and_cmd_lines(json_file_idx)
return model_args

Expand Down Expand Up @@ -86,7 +85,6 @@ def test_parse_json_file(self):
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmpfile:
create_json_from_dict(ArgparserTest.args_dict, tmpfile.name)
tmpfile_path = tmpfile.name
# pdb.set_trace()
with patch("sys.argv", [ArgparserTest.script_name, tmpfile_path]):
model_args = vars(parse_args()[0])
for key, value in ArgparserTest.args_dict.items():
Expand All @@ -113,7 +111,6 @@ def test_parse_json_file_and_cmd_lines_with_conflict(self):
with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as tmpfile:
json.dump(ArgparserTest.args_dict, tmpfile)
tmpfile_path = tmpfile.name
# 构造命令行参数,包含与 JSON 文件中的参数冲突的值
cmd_line_args = [
ArgparserTest.script_name,
tmpfile_path,
Expand All @@ -124,7 +121,6 @@ def test_parse_json_file_and_cmd_lines_with_conflict(self):
"--log_on_each_node",
"False",
]
# 测试解析
with patch("sys.argv", cmd_line_args):
model_args = vars(parse_args()[0])
self.assertEqual(model_args.get("min_learning_rate"), 2e-5)
Expand Down

0 comments on commit 59f3fd3

Please sign in to comment.