Skip to content

Commit eb2176e

Browse files
committed
[fix][JAX] Normalize sampler checkpoint paths
Signed-off-by: bvolpato <brunocvcunha@gmail.com>
1 parent 19fb7a6 commit eb2176e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

skyrl/backends/jax.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import time
2525
from contextlib import contextmanager
2626
from dataclasses import dataclass
27+
from pathlib import Path
2728
from typing import Any, Callable, get_type_hints
2829

2930
import jax
@@ -1002,7 +1003,7 @@ def save_sampler_checkpoint(self, output_path: AnyPath, model_id: str, persist:
10021003
# Training and sampling share one in-memory model in this backend. Marking
10031004
# these weights as loaded avoids a redundant archive round trip on the
10041005
# next sample request, and lets ephemeral RL syncs skip disk entirely.
1005-
checkpoint_id = output_path.name.removesuffix(".tar.gz")
1006+
checkpoint_id = Path(str(output_path)).name.removesuffix(".tar.gz")
10061007
lora_model.loaded_checkpoint_id = checkpoint_id
10071008
if not persist:
10081009
logger.info(f"Updated in-memory LoRA sampler weights for model {model_id}")

0 commit comments

Comments
 (0)