Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

combine training data from multiple sources #953

Closed
Closed
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
6 changes: 3 additions & 3 deletions pytext/data/batch_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ class RandomizedBatchSampler(BaseBatchSampler):
"""
This sampler takes in a dictionary of iterators and returns batches according
to the specified probabilities by `unnormalized_iterator_probs`. We cycle through
the iterators (restarting any that "run out") indefinitely. Set epoch_size in
Data.Config.
the iterators (restarting any that "run out") indefinitely. Set batches_per_epoch
in Trainer.Config.

Example:

Iterator A: [A, B, C, D], Iterator B: [a, b]

epoch_size = 3, unnormalized_iterator_probs = {"A": 0, "B": 1}
batches_per_epoch = 3, unnormalized_iterator_probs = {"A": 0, "B": 1}
Epoch 1 = [a, b, a]
Epoch 2 = [b, a, b]

Expand Down