Skip to content

Commit

Permalink
fix fork buffer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Jul 20, 2023
1 parent 6011359 commit 1f877d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pvnet_summation/data/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,13 @@ def _get_premade_batches_datapipe(self, subdir, shuffle=False, add_filename=Fals

if shuffle:
file_pipeline = file_pipeline.shuffle(buffer_size=1000)

file_pipeline = file_pipeline.sharding_filter()

if add_filename:
file_pipeline, file_pipeline_copy = file_pipeline.fork(2, buffer_size=50)
file_pipeline, file_pipeline_copy = file_pipeline.fork(2, buffer_size=5)

sample_pipeline = file_pipeline.sharding_filter().map(torch.load)
sample_pipeline = file_pipeline.map(torch.load)

# Find national outout simultaneous to concurrent samples
gsp_data = (
Expand Down

0 comments on commit 1f877d0

Please sign in to comment.