(bundle_dir: PathLike | None = None)
| 434 | |
| 435 | |
| 436 | def _process_bundle_dir(bundle_dir: PathLike | None = None) -> Path: |
| 437 | if bundle_dir is None: |
| 438 | get_dir, has_home = optional_import("torch.hub", name="get_dir") |
| 439 | if has_home: |
| 440 | bundle_dir = Path(get_dir()) / "bundle" |
| 441 | else: |
| 442 | raise ValueError("bundle_dir=None, but no suitable default directory computed. Upgrade Pytorch to 1.6+ ?") |
| 443 | return Path(bundle_dir) |
| 444 | |
| 445 | |
| 446 | def download( |
no test coverage detected
searching dependent graphs…