(dir_or_file: str)
| 378 | |
| 379 | |
| 380 | def find_all_config(dir_or_file: str): |
| 381 | if os.path.isfile(dir_or_file): |
| 382 | return [dir_or_file] |
| 383 | else: |
| 384 | configs = [] |
| 385 | for dirpath, dirnames, filenames in os.walk(dir_or_file): |
| 386 | for name in filenames: |
| 387 | if name.endswith('.json') and 'ipynb' not in dirpath: |
| 388 | configs.append(os.path.join(dirpath, name)) |
| 389 | return configs |