Skip to content

Commit 3c2d719

Browse files
committed
Fix bug in validate.
1 parent 8f0218e commit 3c2d719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graph_net/paddle/validate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _extract_forward_source(model_path, class_name):
4949
def check_graph_hash(args):
5050
model_path = args.model_path
5151
file_path = f"{model_path}/graph_hash.txt"
52-
if args.dump_graph_hash_key:
52+
if not args.no_dump_graph_hash_key:
5353
model_str = _extract_forward_source(model_path, class_name="GraphModule")
5454
assert model_str is not None, f"model_str of {args.model_path} is None."
5555
new_hash_text = _get_sha_hash(model_str)
@@ -128,9 +128,9 @@ def main(args):
128128
help="whether check model graph redundancy",
129129
)
130130
parser.add_argument(
131-
"--dump-graph-hash-key",
131+
"--no-dump-graph-hash-key",
132132
action="store_true",
133-
default=True,
133+
default=False,
134134
help="Dump graph hash key",
135135
)
136136
parser.add_argument(

0 commit comments

Comments
 (0)