We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ded3d6a commit 21b9a62Copy full SHA for 21b9a62
2 files changed
tpcav/concepts.py
@@ -62,7 +62,6 @@ def _construct_motif_concept_dataloader_from_control(
62
wds.RandomMix(datasets),
63
batch_size=batch_size,
64
num_workers=num_workers,
65
- pin_memory=True,
66
drop_last=False,
67
)
68
return mixed_dl
tpcav/utils.py
@@ -192,9 +192,7 @@ def __iter__(self):
192
if worker_info is None:
193
chunk = self.seq_df
194
else:
195
- chunk = np.array_split(self.seq_df, worker_info.num_workers)[
196
- worker_info.id
197
- ]
+ chunk = [self.seq_df.iloc[idx] for idx in np.array_split(np.arange(len(self.seq_df)), worker_info.num_workers)][worker_info.id]
198
yield from iterate_seq_df_chunk(
199
chunk,
200
genome=self.genome,
0 commit comments