Skip to content

Commit 6862118

Browse files
wj-McatZHUI
andauthored
Update tests/model_zoo/test_gpt.py
Co-authored-by: Zhong Hui <[email protected]>
1 parent 6aba70e commit 6862118

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/model_zoo/test_gpt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ def test_pretrain(self):
4040
do_train()
4141

4242
# 2. export model
43-
config = {
43+
export_config = {
4444
"model_type": config["model_type"],
4545
"model_path": config["output_dir"],
4646
"output_path": os.path.join(config["output_dir"], "export_model"),
4747
}
48-
with argv_context_guard(config):
48+
with argv_context_guard(export_config):
4949
from export_model import main
5050

5151
main()
5252

5353
# 3. infer model
54-
config = {"model_type": config["model_type"], "model_path": config["output_path"], "select_device": device}
55-
with argv_context_guard(config):
54+
infer_config = {"model_type": export_config["model_type"], "model_path": export_config["output_path"], "select_device": device}
55+
with argv_context_guard(infer_config):
5656
from deploy.python.inference import main
5757

5858
main()

0 commit comments

Comments
 (0)