Update path type annotation for load_from_checkpoint (#15540)

This commit is contained in:
Adrian Wälchli 2022-11-07 09:27:07 +01:00 committed by GitHub
parent df64dad58c
commit 96c574425d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -59,9 +59,9 @@ class ModelIO:
@classmethod
def load_from_checkpoint(
cls,
checkpoint_path: Union[str, IO],
checkpoint_path: Union[_PATH, IO],
map_location: _MAP_LOCATION_TYPE = None,
hparams_file: Optional[str] = None,
hparams_file: Optional[_PATH] = None,
strict: bool = True,
**kwargs: Any,
) -> Self: # type: ignore[valid-type]