Skip to content

Commit

Permalink
minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
edknv committed Nov 9, 2022
1 parent 1c2d424 commit 3e6bf94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions merlin/models/loader/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def _get_dataset_schema(dataset):
return dataset.schema if hasattr(dataset, "schema") else None


# TODO: implement as metaclass and assign methods to children
# to avoid having to do Dataset.<method> calls?
class DataLoader(LoaderBase):
def __init__(
self,
Expand Down Expand Up @@ -94,11 +92,6 @@ def __init__(
"label_names properties or supply a schema.pbtxt file in dataset directory."
)

self.__buff = None
self.__buff_len = None
self._batch_itr = None
self._workers = None

@annotate("make_tensors", color="darkgreen", domain="merlin_dataloader")
def make_tensors(self, gdf, use_nnz=False):
split_idx = self._get_segment_lengths(len(gdf))
Expand Down
2 changes: 2 additions & 0 deletions merlin/models/tf/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from typing import Protocol

import dask.dataframe as dd
import numpy as np
import tensorflow as tf

import merlin.loader.tensorflow
Expand Down Expand Up @@ -285,6 +286,7 @@ def __init__(
global_size = global_size or hvd.size()
global_rank = global_rank or hvd.rank()
seed_fn = seed_fn or get_default_hvd_seed_fn()

DataLoader.__init__(
self,
dataset,
Expand Down

0 comments on commit 3e6bf94

Please sign in to comment.