Exemple #1
0
 def get_dataset_iterator_view(
         iterator: DatasetIteratorIF,
         meta: DatasetMeta,
         indices: List[int],
         view_tags: Dict[str, Any] = None) -> InformedDatasetIteratorIF:
     iterator = HigherOrderDatasetFactory.get_dataset_iterator_view(
         iterator, indices, view_tags)
     return InformedDatasetIterator(iterator, meta)
Exemple #2
0
    def test_plain_iterator_reporting(self, mnist_factory):
        iterator, iterator_meta = mnist_factory.get_dataset_iterator(
            split="train")
        dataset_meta = MetaFactory.get_dataset_meta(
            identifier="id x",
            dataset_name="MNIST",
            dataset_tag="train",
            iterator_meta=iterator_meta)

        informed_iterator = InformedDatasetIterator(iterator, dataset_meta)
        report = DatasetIteratorReportGenerator.generate_report(
            informed_iterator)
        print(report)
        assert report.length == 60000 and not report.sub_reports
Exemple #3
0
 def get_dataset_iterator_view(iterator: DatasetIteratorIF, meta: DatasetMeta, indices: List[int]) -> InformedDatasetIteratorIF:
     iterator = HigherOrderDatasetFactory.get_dataset_iterator_view(iterator, indices)
     return InformedDatasetIterator(iterator, meta)
Exemple #4
0
 def get_combined_dataset_iterator(iterators: List[DatasetIteratorIF], meta: DatasetMeta) -> InformedDatasetIteratorIF:
     iterator = HigherOrderDatasetFactory.get_combined_dataset_iterator(iterators)
     return InformedDatasetIterator(iterator, meta)
Exemple #5
0
 def get_dataset_iterator(iterator: DatasetIteratorIF, meta: DatasetMeta) -> InformedDatasetIteratorIF:
     return InformedDatasetIterator(iterator, meta)
Exemple #6
0
 def get_in_memory_dataset_iterator(
         iterator: DatasetIteratorIF,
         meta: DatasetMeta) -> InformedDatasetIteratorIF:
     in_memory_iterator = InMemoryDatasetIterator(iterator)
     return InformedDatasetIterator(in_memory_iterator, meta)