Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jperez999 committed Jan 17, 2024
1 parent 622a43d commit 903f17f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion merlin/core/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def device_mem_size(kind="total", cpu=False):
return pynvml_mem_size(kind=kind)



try:
import numpy
except ImportError:
Expand Down
6 changes: 5 additions & 1 deletion merlin/io/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ def _add_data_slice(self, df):
if self.shuffle:
df = shuffle_df(df)
int_slice_size = df.shape[0] // self.num_out_files
slice_size = int_slice_size if int_slice_size > 0 and df.shape[0] % int_slice_size == 0 else int_slice_size + 1
slice_size = (
int_slice_size
if int_slice_size > 0 and df.shape[0] % int_slice_size == 0
else int_slice_size + 1
)
for x in range(self.num_out_files):
start = x * slice_size
end = start + slice_size
Expand Down

0 comments on commit 903f17f

Please sign in to comment.