bert_dataset_provider.py 397 Bytes
Newer Older
mandoxzhang's avatar
mandoxzhang committed
1
class BertDatasetProviderInterface:
2

mandoxzhang's avatar
mandoxzhang committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
    def get_shard(self, index, shuffle=True):
        raise NotImplementedError

    def release_shard(self, index):
        raise NotImplementedError

    def prefetch_shard(self, index):
        raise NotImplementedError

    def get_batch(self, batch_iter):
        raise NotImplementedError

    def prefetch_batch(self):
        raise NotImplementedError