Skip to content

Commit

Permalink
change target formats allowed in dask executor (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperez999 authored Jun 28, 2023
1 parent 61d65d3 commit 5e549d9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions merlin/dag/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,21 @@ class LocalExecutor:

def __init__(self, device=Device.GPU):
self.device = device if HAS_GPU else Device.CPU

@property
def target_format(self):
return (
self._target_format = (
DataFormats.PANDAS_DATAFRAME
| DataFormats.CUDF_DATAFRAME
| DataFormats.NUMPY_TENSOR_TABLE
| DataFormats.CUPY_TENSOR_TABLE
)

@property
def target_format(self):
return self._target_format

@target_format.setter
def target_format(self, formats):
self._target_format = formats

def transform(
self,
transformable,
Expand Down Expand Up @@ -306,6 +311,7 @@ class DaskExecutor:

def __init__(self, client=None):
self._executor = LocalExecutor()
self._executor.target_format = DataFormats.PANDAS_DATAFRAME | DataFormats.CUDF_DATAFRAME

# Deprecate `client`
if client is not None:
Expand Down

0 comments on commit 5e549d9

Please sign in to comment.