uncertainty-baselines icon indicating copy to clipboard operation
uncertainty-baselines copied to clipboard

Fix a bug in SubsetDatasetBuilder (without failing the type checks hopefully)

Open BlackHC opened this issue 3 years ago • 0 comments

The fix for SubsetDatasetBuilder that simply forwarded the info field actually breaks get_num_examples: it returns the total number of examples in the original dataset and not the subset.

This should fix that and simplify the code.

From a type checking perspective, this adds a generic typevar that bounds on the clu.deterministic_data.DatasetBuilder protocol. This should lead to the correct types being passed through in get_num_examples.

TODO: How do I run the Google-internal type checker externally?

BlackHC avatar Mar 10 '22 17:03 BlackHC