Optimize the inspection of the dataset
#1
by
albertvillanova
HF staff
- opened
Please note that to inspect the dataset we use functions like get_dataset_config_names
and get_dataset_split_names
, which call the method _split_generators
of the dataset loading script. This is why we recommend this method to be as light as possible, so that the calls to previous functions are executed immediately. All the costly processing, loading and parsing should be implemented in the _generate_examples
method instead.
This PR moves some costly processing functions (loading of ans2label, _load_features
) from _split_generators
to _generate_examples
method. This way the calls to functions get_dataset_config_names
and get_dataset_split_names
have no performance issues.
albertvillanova
changed pull request status to
open