Skip to content

Commit f9a6fb8

Browse files
committed
Minor fix.
1 parent 238504a commit f9a6fb8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

graph_net/paddle/validate.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ def main(args):
7676
raise ValueError("Illegal return value.")
7777

7878
if not args.no_check_redundancy:
79-
print("Check redundancy ...")
8079
graph_net_samples_path = (
8180
graph_net.paddle.samples_util.get_default_samples_directory()
8281
if args.graph_net_samples_path is None
8382
else args.graph_net_samples_path
8483
)
8584
cmd = f"{sys.executable} -m graph_net.paddle.check_redundant_incrementally --model-path {args.model_path} --graph-net-samples-path {graph_net_samples_path}"
85+
print(f"Check redundancy with cmd: {cmd}")
8686
cmd_ret = os.system(cmd)
8787
rm_cmd = f"{sys.executable} -m graph_net.paddle.remove_redundant_incrementally --model-path {args.model_path} --graph-net-samples-path {graph_net_samples_path}"
8888
assert (
8989
cmd_ret == 0
90-
), f"\nPlease use the following command to remove redundant model directories:\n\n{rm_cmd}\n"
90+
), f"\nPlease use the following command to remove redundant model directories:\n\t{rm_cmd}\n"
9191

9292
print(f"Validation success, {model_path=}")
9393

@@ -100,13 +100,11 @@ def main(args):
100100
required=True,
101101
help="Path to folder e.g '../test_dataset'",
102102
)
103-
104103
parser.add_argument(
105104
"--no-check-redundancy",
106105
action="store_true",
107106
help="whether check model graph redundancy",
108107
)
109-
110108
parser.add_argument(
111109
"--dump-graph-hash-key",
112110
action="store_true",

tools/ci/check_validate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function summary_problems() {
144144
LOG "[FATAL] Summary problems:"
145145
local failed_list=($check_validation_info)
146146
local failed_count=${#failed_list[@]}
147-
LOG "[FATAL] === API test error (${failed_count} failure(s)) - Please fix the failed API tests according to fatal log:"
147+
LOG "[FATAL] === Samples validation error (${failed_count} failure(s)) - Please fix the failed samples validation according to fatal log:"
148148
LOG "[FATAL] Failed model path(s):"
149149
printf " - %s\n" "${failed_list[@]}" >&2
150150
exit $check_validation_code
@@ -165,4 +165,4 @@ function main() {
165165
LOG "[INFO] check_validation run success and no error!"
166166
}
167167

168-
main
168+
main

0 commit comments

Comments
 (0)