(folder, extensions)
| 133 | |
| 134 | |
| 135 | def search_for_files(folder, extensions): |
| 136 | files = [] |
| 137 | if os.path.isdir(folder): |
| 138 | for file in sorted(os.listdir(folder)): |
| 139 | files += search_for_files(os.path.join(folder, file), extensions) |
| 140 | elif os.path.isfile(folder): |
| 141 | for extension in extensions: |
| 142 | if folder.endswith(extension): |
| 143 | files.append(folder) |
| 144 | break |
| 145 | return files |
| 146 | |
| 147 | |
| 148 | def convert_state_dict_keys_to_single_str(state_dict, with_shape=True): |
nothing calls this directly
no outgoing calls
no test coverage detected