• Lysandre Debut's avatar
    Fixing tests for Perceiver (#14745) · 3d66146a
    Lysandre Debut authored
    
    
    - Do not run image-classification pipeline (_CHECKPOINT_FOR_DOC uses the checkpoint for
    langage, which cannot load a FeatureExtractor so current logic fails).
    - Add a safeguard to not run tests when `tokenizer_class` or
    `feature_extractor_class` **are** defined, but cannot be loaded
    This happens for Perceiver for the "FastTokenizer" (which doesn't exist
    so None) and FeatureExtractor (which does exist but cannot be loaded
    because the checkpoint doesn't define one which is reasonable for the
    said checkpoint)
    - Added `get_vocab` function to `PerceiverTokenizer` since it is used by
    `fill-mask` pipeline when the argument `targets` is used to narrow a
    subset of possible values.
    Co-authored-by: default avatarNicolas Patry <patry.nicolas@protonmail.com>
    3d66146a
test_pipelines_image_classification.py 5.81 KB