Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup: Replaced 'idx' with '_'. Removed unused parameter & unused import #59

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_task_dependent_ctr():
"stuff": 0,
"labels": torch.arange(0, 6).repeat(batch_size, 1),
}
for idx in range(num_examples)
for _ in range(num_examples)
]

for task_idx in range(5):
Expand Down
5 changes: 2 additions & 3 deletions reader/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import random
from typing import Optional

from fsspec.implementations.local import LocalFileSystem
import pyarrow.dataset as pads
import pyarrow as pa
import pyarrow.parquet
Expand Down Expand Up @@ -105,7 +104,7 @@ def pa_to_batch(self, batch: pa.RecordBatch) -> DataclassBatch:
def dataloader(self, remote: bool = False):
if not remote:
return map(self.pa_to_batch, self.to_batches())
readers = get_readers(2)
readers = get_readers()
return map(self.pa_to_batch, reader_utils.roundrobin(*readers))


Expand All @@ -116,7 +115,7 @@ def dataloader(self, remote: bool = False):
]


def get_readers(num_readers_per_worker: int):
def get_readers():
addresses = env.get_flight_server_addresses()

readers = []
Expand Down