diff --git a/graph_net/torch/check_redundant_incrementally.py b/graph_net/torch/check_redundant_incrementally.py index 747a710d4d..2a1c41c827 100644 --- a/graph_net/torch/check_redundant_incrementally.py +++ b/graph_net/torch/check_redundant_incrementally.py @@ -15,6 +15,11 @@ def get_recursively_model_pathes(root_dir): + for sub_dir in _get_recursively_model_pathes(root_dir): + yield os.path.realpath(sub_dir) + + +def _get_recursively_model_pathes(root_dir): if is_single_model_dir(root_dir): yield root_dir return diff --git a/graph_net/torch/remove_redundant_incrementally.py b/graph_net/torch/remove_redundant_incrementally.py index 81a6b3d902..df046b5044 100644 --- a/graph_net/torch/remove_redundant_incrementally.py +++ b/graph_net/torch/remove_redundant_incrementally.py @@ -16,6 +16,11 @@ def get_recursively_model_pathes(root_dir): + for sub_dir in _get_recursively_model_pathes(root_dir): + yield os.path.realpath(sub_dir) + + +def _get_recursively_model_pathes(root_dir): if is_single_model_dir(root_dir): yield root_dir return