()
| 2398 | |
| 2399 | |
| 2400 | def test_iterable_dataset_cast_column(): |
| 2401 | ex_iterable = ExamplesIterable(generate_examples_fn, {"label": 10}) |
| 2402 | features = Features({"id": Value("int64"), "label": Value("int64")}) |
| 2403 | dataset = IterableDataset(ex_iterable, info=DatasetInfo(features=features)) |
| 2404 | casted_dataset = dataset.cast_column("label", Value("bool")) |
| 2405 | casted_features = features.copy() |
| 2406 | casted_features["label"] = Value("bool") |
| 2407 | assert list(casted_dataset) == [casted_features.encode_example(ex) for _, ex in ex_iterable] |
| 2408 | |
| 2409 | |
| 2410 | def test_iterable_dataset_cast(): |
nothing calls this directly
no test coverage detected