Skip to content

Commit

Permalink
Update tests/model_zoo/test_gpt.py
Browse files Browse the repository at this point in the history
Co-authored-by: Zhong Hui <zhonghui.net@gmail.com>
  • Loading branch information
wj-Mcat and ZHUI committed Jan 31, 2023
1 parent 6aba70e commit 6862118
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/model_zoo/test_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ def test_pretrain(self):
do_train()

# 2. export model
config = {
export_config = {
"model_type": config["model_type"],
"model_path": config["output_dir"],
"output_path": os.path.join(config["output_dir"], "export_model"),
}
with argv_context_guard(config):
with argv_context_guard(export_config):
from export_model import main

main()

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

main()
Expand Down

0 comments on commit 6862118

Please sign in to comment.