Skip to content

Commit b3502cf

Browse files
committed
fix
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
1 parent 5182b2e commit b3502cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nemo/lightning/io/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def load_context(path: Path, subpath: Optional[str] = None, build: bool = True):
5151
checkpoint: TrainerContext = load_ckpt("/path/to/checkpoint", subpath="model.config")
5252
5353
"""
54-
path = Path(path)
54+
if not isinstance(path, Path):
55+
path = Path(path)
5556
try:
5657
return load(path, output_type=TrainerContext, subpath=subpath, build=build)
5758
except FileNotFoundError:

0 commit comments

Comments
 (0)