Skip to content

Commit 4a6137f

Browse files
fix: no more error with checkpoints dir not existing
1 parent 5eefe45 commit 4a6137f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/launch_train_multiprocessing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from stable_baselines3.common.vec_env import SubprocVecEnv
1010

1111
simu_path = __file__.rsplit('/', 2)[0] + '/src/Simulateur'
12-
print(f"{simu_path = }")
1312
if simu_path not in sys.path:
1413
sys.path.insert(0, simu_path)
1514

@@ -68,8 +67,8 @@ def make_env(rank: int):
6867

6968

7069
save_path = __file__.rsplit("/", 1)[0] + "/checkpoints/" + ExtractorClass.__name__ + "/"
71-
if not os.path.exists(save_path):
72-
os.mkdir(save_path)
70+
os.makedirs(save_path, exist_ok=True)
71+
7372

7473
print(save_path)
7574
print(os.listdir(save_path))

0 commit comments

Comments
 (0)