1. 19 Dec, 2022 1 commit
  2. 16 Dec, 2022 2 commits
  3. 15 Dec, 2022 3 commits
  4. 13 Dec, 2022 1 commit
  5. 12 Dec, 2022 1 commit
  6. 08 Dec, 2022 1 commit
    • Nathan Raw's avatar
      Add video classification pipeline (#20151) · 9e56aff5
      Nathan Raw authored
      * 🚧 wip video classification pipeline
      
      * 🚧 wip - add is_decord_available check
      
      * 🐛 add missing import
      
      *  add tests
      
      * 🔧 add decord to setup extras
      
      * 🚧 add is_decord_available
      
      *  add video-classification pipeline
      
      * 📝 add video classification pipe to docs
      
      * 🐛 add missing VideoClassificationPipeline import
      
      * 📌 add decord install in test runner
      
      *  fix url inputs to video-classification pipeline
      
      *  updates from review
      
      * 📝 add video cls pipeline to docs
      
      * 📝 add docstring
      
      * 🔥 remove unused import
      
      * 🔥 remove some code
      
      * 📝 docfix
      9e56aff5
  7. 07 Dec, 2022 1 commit
  8. 06 Dec, 2022 1 commit
  9. 05 Dec, 2022 2 commits
  10. 21 Nov, 2022 1 commit
    • NielsRogge's avatar
      Add Audio Spectogram Transformer (#19981) · 4973d2a0
      NielsRogge authored
      
      
      * First draft
      
      * Make conversion script work
      
      * Add id2label mapping, run code quality
      
      * Fix copies
      
      * Add first draft of feature extractor
      
      * Update conversion script to use feature extractor
      
      * Make more tests pass
      
      * Add docs
      
      * update input_features to input_values + pad by default to max length
      
      * Fix doc tests
      
      * Add feature extractor tests
      
      * Add proper padding/truncation to feature extractor
      
      * Add support for conversion of all audioset checkpoints
      
      * Improve docs and extend conversion script
      
      * Fix README
      
      * Rename spectogram to spectrogram
      
      * Fix copies
      
      * Add integration test
      
      * Remove dummy conv
      
      * Update to ast
      
      * Update organization
      
      * Fix init
      
      * Rename model to AST
      
      * Add require_torchaudio annotator
      
      * Move import of ASTFeatureExtractor under a is_speech_available
      
      * Fix rebase
      
      * Add pipeline config
      
      * Update name of classifier head
      
      * Rename time_dimension and frequency_dimension for clarity
      
      * Remove print statement
      
      * Fix pipeline test
      
      * Fix pipeline test
      
      * Fix index table
      
      * Fix init
      
      * Fix conversion script
      
      * Rename to ForAudioClassification
      
      * Fix index table
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      4973d2a0
  11. 18 Nov, 2022 1 commit
    • Nicolas Patry's avatar
      [Proposal] Breaking change `zero-shot-object-detection` for improved consistency. (#20280) · 8e777b3b
      Nicolas Patry authored
      * [Proposal] Breaking change `zero-shot-object-detection` for improved
      consistency.
      
      This is a proposal to modify the output of `zero-shot-object-detection`
      to provide better alignment with other pipelines.
      
      The output is now strictly the same as `object-detection` whereas before
      it would output lists of lists.
      
      The name `candidate_labels` is used throughout for consistency with
      other `zero-shot` pipelines.
      
      The pipeline is changed to `ChunkPipeline` to support batching cleanly.
      
      This removes all the lists and list of lists shenanigans, it's now a
      matter of the base pipeline handling all this not this specific one.
      
      **Breaking change**: It did remove complex calls potentials `pipe(images = [image1, image2],
      text_queries=[candidates1, candidates2])` to support only
      `pipe([{"image": image1, "candidate_labels": candidates1}, {"image": image2, "candidate_labels": candidates2}])`
      when dealing with lists and/or datasets.
      We could keep them, but it will add a lot of complexity to the code
      base, since the pipeline is rather young, I'd rather break to keep the
      code simpler, but we can revert this.
      
      **Breaking change**: The name of the argument is now `image` instead of
      `images` since it expects by default only 1 image. This is revertable
      like the previous one.
      
      **Breaking change**: The types is now simplified and flattened:
      
      `pipe(inputs) == [{**object1}, {**object2}]`
      instead of the previous
      `pipe(inputs) == [[{**object1}, {**object1}], [{**object2}]]`
      Where the different instances would be grouped by candidate labels
      within lists.
      IMHO this is not really desirable, since it would output empty lists and
      is only adding superflous indirection compared to
      `zero-shot-object-detection`.
      
      It is relatively change free in terms of how the results, it does change
      computation however since now the batching is handled by the pipeline
      itself. It **did** change the results for the small models so there
      seems to be a real difference in how the models handle this.
      
      * Fixing the doctests.
      
      * Behind is_torch_available.
      8e777b3b
  12. 15 Nov, 2022 2 commits
    • Younes Belkada's avatar
      Add Switch transformers (#19323) · 163ac3d3
      Younes Belkada authored
      
      
      * first commit
      
      * add more comments
      
      * add router v1
      
      * clean up
      
      - remove `tf` modeling files
      
      * clean up
      
      - remove `tf` modeling files
      
      * clean up
      
      * v0 routers
      
      * added more router
      
      - Implemented `ExpertsChooseMaskedRouter`
      
      - added tests
      - 2 more routers to implement
      
      * last router
      
      * improved docstring
      
      - completed the docstring in `router.py`
      - added more args in the config
      
      * v0 sparse mlp
      
      * replace wrong naming
      
      * forward pass run
      
      * update MOE layer
      
      * small router update
      
      * fixup
      
      * consistency
      
      * remove scatter router
      
      * remove abstract layer
      
      * update test and model for integration testing
      
      * v1 conversion
      
      * update
      
      * hardcode hack
      
      * all keys match
      
      * add gin conversion, without additional libraries
      
      * update conversion sctipy
      
      * delete router file
      
      * update tests wrt router deletion
      
      * fix router issues
      
      * update expert code
      
      * update, logits match, code needsREFACTORING
      
      * Refactor code
      Co-authored-by: default avatarYounes Belkada <younesbelkada@users.noreply.github.com>
      
      * add generate tests
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      
      * add support for router loss
      Co-authored-by: default avatarYounes Belkada <younesbelkada@users.noreply.github.com>
      
      * fix forward error
      
      * refactor a bit
      
      * remove `FlaxSwitchTransformers` modules
      
      * more tests pass
      
      * Update code
      Co-authored-by: default avatarYounes Belkada <younesbelkada@users.noreply.github.com>
      
      * fixup
      
      * fix tests
      
      * fix doc
      
      * fix doc + tokenization
      
      * fix tokenizer test
      
      * fix test
      
      * fix loss output
      
      * update code for backward pass
      
      * add loss support
      
      * update documentation
      
      * fix documentation, clean tokenizer
      
      * more doc fix, cleanup example_switch
      
      * fix failing test
      
      * fix test
      
      * fix test
      
      * fix loss issue
      
      * move layer
      
      * update doc and fix router capacity usage
      
      * fixup
      
      * add sparse mlp index for documentation on hub
      
      * fixup
      
      * test sparse mix architecture
      
      * Apply suggestions from code review
      
      * Update docs/source/en/model_doc/switch_transformers.mdx
      
      * fixup on update
      
      * fix tests
      
      * fix another test
      
      * attempt fix
      
      * Update src/transformers/models/switch_transformers/configuration_switch_transformers.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/switch_transformers/convert_switch_transformers_original_flax_checkpoint_to_pytorch.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * try
      
      * all tests pass
      
      * fix jitter noise
      
      * Apply suggestions from code review
      
      * doc tests pass
      
      * Update src/transformers/models/switch_transformers/modeling_switch_transformers.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/switch_transformers/modeling_switch_transformers.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * remove assert
      
      * change config order
      
      * fix readme japanese
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * remove parallelizable tests + add one liners
      
      * remove ONNX config
      
      * fix nits
      
      - add `T5Tokenizer` in auto mapping
      - remove `Switch Transformers` from ONNX supported models
      
      * remove `_get_router`
      
      * remove asserts
      
      * add check in test for `router_dtype`
      
      * add `SwitchTransformersConfig` in `run_pipeline_test`
      
      * Update tests/pipelines/test_pipelines_summarization.py
      
      * add huge model conversion script
      
      * fix slow tests
      
      - add better casting for `Linear8bitLt`
      - remove `torchscript` tests
      
      * add make dir
      
      * style on new script
      
      * fix nits
      
      - doctest
      - remove `_keys_to_ignore_on_load_unexpected`
      
      * Update src/transformers/models/switch_transformers/configuration_switch_transformers.py
      
      * add google as authors
      
      * fix year
      
      * remove last `assert` statements
      
      * standardize vertical spaces
      
      * fix failing import
      
      * fix another failing test
      
      * Remove strange àuthorized_keys`
      
      * removing todo and padding that is never used
      Co-authored-by: default avatarArthur Zucker <arthur.zucker@gmail.com>
      Co-authored-by: default avatarybelkada <younes@huggingface.co>
      Co-authored-by: default avatarYounes Belkada <younesbelkada@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarArthur Zucker <arthur@huggingface.co>
      163ac3d3
    • Yih-Dar's avatar
      Make `ImageSegmentationPipelineTests` less flaky (#20147) · f9909fbf
      Yih-Dar authored
      
      
      * Fix ImageSegmentationPipelineTests
      
      * Use 0.9
      
      * no zip
      
      * links to show images
      
      * links to show images
      
      * rebase
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      f9909fbf
  13. 14 Nov, 2022 2 commits
  14. 10 Nov, 2022 2 commits
  15. 03 Nov, 2022 1 commit
  16. 26 Oct, 2022 1 commit
    • Nicolas Patry's avatar
      Factored out some code in the `image-segmentation` pipeline. (#19727) · 5fd5990d
      Nicolas Patry authored
      * Factored out some code in the image-segmentation pipeline
      
      Re-enable `small_model_pt`.
      
      Re-enable `small_model_pt`.
      
      Enabling the current test with the current values.
      
      Debugging the values on the CI.
      
      More logs ? Printing doesn't work ?
      
      Using the CI values instead. Seems to be a Pillow sensitivity.
      
      Added a test showcasing that models not supporting some tasks get a
      clear error.
      
      Factored out code.
      
      Further factor out.
      
      Fixup.
      
      Bad rebase.
      
      Put `panoptic` before `instance` as it should be a superset.
      
      * Fixing tests.
      
      * Adding subtasks tests
      
      + Fixes `instance` segmentation which was broken due to default and
      non kwargs arguments.
      
      * Fix bad replace.
      5fd5990d
  17. 24 Oct, 2022 1 commit
  18. 21 Oct, 2022 2 commits
  19. 20 Oct, 2022 1 commit
  20. 19 Oct, 2022 1 commit
  21. 18 Oct, 2022 6 commits
  22. 17 Oct, 2022 5 commits
  23. 14 Oct, 2022 1 commit
    • Nicolas Patry's avatar
      Improve error messaging for ASR pipeline. (#19570) · 463226e2
      Nicolas Patry authored
      * Improve error messaging for ASR pipeline.
      
      - Raise error early (in `_sanitize`) so users don't waste time trying to
        run queries with invalid params.
      
      - Fix the error was after using `config.inputs_to_logits_ratio` so our
        check was masked by the failing property does not exist.
      
      - Added some manual check on s2t for the error message.
        No non ctc model seems to be used by the default runner (they are all
        skipped).
      
      * Removing pdb.
      
      * Stop the early error it doesn't really work :(.
      463226e2