Skip to content

Commit 7d41f6f

Browse files
committed
Use UPath instead of os
1 parent f4169af commit 7d41f6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rslp/helios/model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Helios model wrapper for fine-tuning in rslearn."""
22

33
import json
4-
import os
54
import re
65
from contextlib import nullcontext
76
from typing import Any
@@ -130,7 +129,7 @@ def load_model(
130129
# Load the checkpoint.
131130
if not random_initialization:
132131
train_module_dir = checkpoint_path / "model_and_optim"
133-
if os.path.exists(train_module_dir):
132+
if train_module_dir.exists():
134133
load_model_and_optim_state(
135134
str(train_module_dir), model, planner=planner
136135
)

0 commit comments

Comments
 (0)