Skip to content

Commit

Permalink
add ExecutorBase to RayExecutor
Browse files Browse the repository at this point in the history
  • Loading branch information
cyruszhang committed Jan 9, 2025
1 parent eb3b123 commit 7c171fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data_juicer/core/executor/ray_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import time
from typing import Optional

from jsonargparse import Namespace
from loguru import logger
from pydantic import PositiveInt

from data_juicer.core.adapter import Adapter
from data_juicer.core.data.dataset_builder import DatasetBuilder
from data_juicer.core.executor import ExecutorType
from data_juicer.core.executor import ExecutorBase, ExecutorType
from data_juicer.ops import load_ops
from data_juicer.ops.op_fusion import fuse_operators
from data_juicer.utils.lazy_loader import LazyLoader
Expand All @@ -32,7 +33,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
shutil.rmtree(self.tmp_dir)


class RayExecutor:
class RayExecutor(ExecutorBase):
"""
Executor based on Ray.
Expand All @@ -44,7 +45,7 @@ class RayExecutor:
"""

def __init__(self, cfg=None):
def __init__(self, cfg: Optional[Namespace] = None):
"""
Initialization method.
Expand Down

0 comments on commit 7c171fb

Please sign in to comment.