(iter_type, data_definition)
| 147 | |
| 148 | @nottest |
| 149 | def test_api_fw_check2(iter_type, data_definition): |
| 150 | root, annotations = data_paths() |
| 151 | |
| 152 | pipe = DetectionPipeline(BATCH_SIZE, 0, root, annotations) |
| 153 | pipe.schedule_run() |
| 154 | pipe.share_outputs() |
| 155 | pipe.release_outputs() |
| 156 | pipe.schedule_run() |
| 157 | pipe.outputs() |
| 158 | with assert_raises( |
| 159 | RuntimeError, |
| 160 | glob=( |
| 161 | "Mixing pipeline API type. Currently used: PipelineAPIType.SCHEDULED," |
| 162 | " but trying to use PipelineAPIType.ITERATOR" |
| 163 | ), |
| 164 | ): |
| 165 | train_loader = iter_type( |
| 166 | [pipe], data_definition, EPOCH_SIZE, auto_reset=False, dynamic_shape=True |
| 167 | ) |
| 168 | train_loader.__next__() |
| 169 | # disable check |
| 170 | pipe.enable_api_check(False) |
| 171 | try: |
| 172 | train_loader = iter_type( |
| 173 | [pipe], data_definition, EPOCH_SIZE, auto_reset=False, dynamic_shape=True |
| 174 | ) |
| 175 | train_loader.__next__() |
| 176 | assert True |
| 177 | except RuntimeError: |
| 178 | assert False |
| 179 | yield check, iter_type |
| 180 | |
| 181 | |
| 182 | def check(iter_type): |
no test coverage detected