Skip to content

Commit

Permalink
fix out_path bug (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaodongbd authored Oct 11, 2024
1 parent a7a6cfc commit 95f18cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paddleapex/apex/run_paddle.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def arg_parser(parser):
forward_content = api_json_read(cfg.json_path)
out_path = os.path.realpath(cfg.out_path) if cfg.out_path else "./"
if os.path.exists(out_path):
shutil.rmtree(out_path)
print_warn_log("The output path already exists and the file with the same name will be overwritten.")
ut_case_parsing(forward_content, cfg)
print_info_log("UT save completed")
warning_log_pth = os.path.join(out_path, "./warning_log.txt")
Expand Down
4 changes: 2 additions & 2 deletions paddleapex/apex/run_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def arg_parser(parser):
"-out",
"--dump_path",
dest="out_path",
default="./paddle/",
default="./torch/",
type=str,
help="<optional> The ut task result out path.",
required=False,
Expand Down Expand Up @@ -645,7 +645,7 @@ def arg_parser(parser):
forward_content = api_json_read(cfg.json_path)
out_path = os.path.realpath(cfg.out_path) if cfg.out_path else "./"
if os.path.exists(out_path):
shutil.rmtree(out_path)
print_warn_log("The output path already exists and the file with the same name will be overwritten.")
ut_case_parsing(forward_content, cfg)
print_info_log("UT save completed")
warning_log_pth = os.path.join(out_path, "./warning_log.txt")
Expand Down

0 comments on commit 95f18cb

Please sign in to comment.