diff --git a/data_juicer/core/executor/ray_executor_partitioned.py b/data_juicer/core/executor/ray_executor_partitioned.py index c9bb55b50d..0a0ca90557 100644 --- a/data_juicer/core/executor/ray_executor_partitioned.py +++ b/data_juicer/core/executor/ray_executor_partitioned.py @@ -156,6 +156,8 @@ def __init__(self, cfg: Optional[Namespace] = None): self.executor_type = "ray_partitioned" self.work_dir = self.cfg.work_dir + if self.work_dir and "://" not in self.work_dir: + self.work_dir = os.path.abspath(self.work_dir) self.job_id = self.cfg.get("job_id", None) # Initialize temporary directory for Ray operations @@ -178,6 +180,8 @@ def __init__(self, cfg: Optional[Namespace] = None): # Checkpoint configuration and manager initialization checkpoint_cfg = getattr(self.cfg, "checkpoint", None) checkpoint_dir = getattr(self.cfg, "checkpoint_dir", os.path.join(self.work_dir, "checkpoints")) + if checkpoint_dir and "://" not in checkpoint_dir: + checkpoint_dir = os.path.abspath(checkpoint_dir) if checkpoint_cfg: # Use ConfigAccessor to handle both dict and object configurations