Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: SimoTw <[email protected]>
  • Loading branch information
simotw committed Jan 18, 2025
1 parent ec42def commit 0ba9171
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def get_devices(self) -> List[torch.device]:
"""Gets the correct torch device configured for this process"""
raise NotImplementedError

@abc.abstractmethod
def set_device(self, device: Union[torch.device, int, str, None]):
"""Set the correct device for this process"""
raise NotImplementedError
Expand All @@ -30,7 +29,6 @@ def supports_stream(self) -> bool:
"""Validate if the device type support create a stream"""
raise NotImplementedError

@abc.abstractmethod
def create_stream(self, device: torch.device):
"""Create a device stream"""
raise NotImplementedError
Expand All @@ -42,7 +40,6 @@ def get_stream_context(self, stream):
"""
raise NotImplementedError

@abc.abstractmethod
def get_current_stream(self):
"""Get current stream on accelerators like torch.cuda.current_stream"""
raise NotImplementedError
3 changes: 1 addition & 2 deletions python/ray/data/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PreprocessorNotFittedException(RuntimeError):


@PublicAPI(stability="beta")
class Preprocessor(abc.ABC):
class Preprocessor(abc.ABC): # noqa: B024
"""Implements an ML preprocessing operation.
Preprocessors are stateful objects that can be fitted against a Dataset and used
Expand Down Expand Up @@ -184,7 +184,6 @@ def transform_batch(self, data: "DataBatchType") -> "DataBatchType":
return self._transform_batch(data)

@DeveloperAPI
@abc.abstractmethod
def _fit(self, ds: "Dataset") -> "Preprocessor":
"""Sub-classes should override this instead of fit()."""
raise NotImplementedError()
Expand Down

0 comments on commit 0ba9171

Please sign in to comment.