[docs]defcheck_dataset_type(self,dataset,valid_dataset_types:list,location:str):asserttype(dataset)invalid_dataset_types,f"{location}: this preprocessing can only be applied to datasets of type: " \
f"{', '.join([dataset_type.__name__fordataset_typeinvalid_dataset_types])}. " \
f"Your dataset is a {type(dataset).__name__}. " \
f"Please use a different preprocessing, or omit the preprocessing for this dataset."
[docs]defkeeps_example_count(self)->bool:""" Defines if the preprocessing can be run with TrainMLModel instruction; to be able to run with it, the preprocessing cannot change the number of examples in the dataset """returnTrue