Skip to content

Commit cf6334e

Browse files
committed
Fix path.
1 parent c99b0a6 commit cf6334e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

graph_net/paddle/check_redundant_incrementally.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def main(args):
4949
find_redundant = False
5050
graph_hash2graph_net_model_path = {}
5151
for model_path in get_recursively_model_pathes(args.graph_net_samples_path):
52-
if args.model_path is None or args.model_path != model_path:
52+
if args.model_path is None or os.path.basename(
53+
args.model_path
54+
) != os.path.basename(model_path):
5355
graph_hash_path = f"{model_path}/graph_hash.txt"
5456
if os.path.isfile(graph_hash_path):
5557
graph_hash = open(graph_hash_path).read()

graph_net/paddle/samples_util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44

55
def get_default_samples_directory():
6-
return f"{os.path.dirname(graph_net.__file__)}/../paddle_samples"
6+
graph_net_root = os.path.dirname(os.path.dirname(graph_net.__file__))
7+
return f"{graph_net_root}/paddle_samples"

0 commit comments

Comments
 (0)