1. 30 Jan, 2023 1 commit
  2. 25 Jan, 2023 1 commit
  3. 07 Oct, 2022 1 commit
    • Sylvain Gugger's avatar
      Rework pipeline tests (#19366) · 9ac586b3
      Sylvain Gugger authored
      * Rework pipeline tests
      
      * Try to fix Flax tests
      
      * Try to put it before
      
      * Use a new decorator instead
      
      * Remove ignore marker since it doesn't work
      
      * Filter pipeline tests
      
      * Woopsie
      
      * Use the fitlered list
      
      * Clean up and fake modif
      
      * Remove init
      
      * Revert fake modif
      9ac586b3
  4. 23 Feb, 2022 1 commit
  5. 29 Oct, 2021 1 commit
  6. 10 Sep, 2021 1 commit
    • Nicolas Patry's avatar
      [Large PR] Entire rework of pipelines. (#13308) · c63fcabf
      Nicolas Patry authored
      
      
      * Enabling dataset iteration on pipelines.
      
      Enabling dataset iteration on pipelines.
      
      Unifying parameters under `set_parameters` function.
      
      Small fix.
      
      Last fixes after rebase
      
      Remove print.
      
      Fixing text2text `generate_kwargs`
      
      No more `self.max_length`.
      
      Fixing tf only conversational.
      
      Consistency in start/stop index over TF/PT.
      
      Speeding up drastically on TF (nasty bug where max_length would increase
      a ton.)
      
      Adding test for support for non fast tokenizers.
      
      Fixign GPU usage on zero-shot.
      
      Fix working on Tf.
      
      Update src/transformers/pipelines/base.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      Update src/transformers/pipelines/base.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      Small cleanup.
      
      Remove all asserts + simple format.
      
      * Fixing audio-classification for large PR.
      
      * Overly explicity null checking.
      
      * Encapsulating GPU/CPU pytorch manipulation directly within `base.py`.
      
      * Removed internal state for parameters of the  pipeline.
      
      Instead of overriding implicitly internal state, we moved
      to real named arguments on every `preprocess`, `_forward`,
      `postprocess` function.
      
      Instead `_sanitize_parameters` will be used to split all kwargs
      of both __init__ and __call__ into the 3 kinds of named parameters.
      
      * Move import warnings.
      
      * Small fixes.
      
      * Quality.
      
      * Another small fix, using the CI to debug faster.
      
      * Last fixes.
      
      * Last fix.
      
      * Small cleanup of tensor moving.
      
      * is not None.
      
      * Adding a bunch of docs + a iteration test.
      
      * Fixing doc style.
      
      * KeyDataset = None guard.
      
      * RRemoving the Cuda test for pipelines (was testing).
      
      * Even more simple iteration test.
      
      * Correct import .
      
      * Long day.
      
      * Fixes in docs.
      
      * [WIP] migrating object detection.
      
      * Fixed the target_size bug.
      
      * Fixup.
      
      * Bad variable name.
      
      * Fixing `ensure_on_device` respects original ModelOutput.
      c63fcabf
  7. 26 Aug, 2021 2 commits
  8. 14 Jun, 2021 1 commit
  9. 07 Jun, 2021 1 commit
  10. 18 May, 2021 1 commit
  11. 05 Mar, 2021 1 commit
  12. 08 Feb, 2021 1 commit
    • Nicolas Patry's avatar
      Cleaning up `ConversationalPipeline` to support more than DialoGPT. (#10002) · b1aa4982
      Nicolas Patry authored
      * Cleaning up `ConversationalPipeline` to support more than DialoGPT.
      
      Currently ConversationalPipeline was heavily biased towards DialoGPT
      ,which is the default model for this pipeline.
      
      This PR proposes changes to put back the modifications specific to
      DialoGPT into tokenizer-specific behavior wherever possible, by
      creating `_build_conversation_input_ids` function that takes
      conversation as input, and returns a list of ints corresponding
      to the tokens. It feels natural to put here because all models
      have probably different strategies to build input_ids from the
      full conversation and it's the tokenizer's job to transform strings
      into tokens (and vice-versa)
      
      If `_build_conversation_input_ids` is missing, previous behavior is
      used so we don't break anything so far (except for blenderbot where it's a fix).
      
      This PR also contains a fix for too long inputs. There used
      to be dead code for trying to limit the size of incoming input.
      The introduced fixed is that we limit
      within `_build_conversation_input_ids` to `tokenizer.model_max_length`.
      It corresponds to the intent of the removed dead code and is actually
      better because it corresponds to `model_max_length` which is different
      from `max_length` (which is a default parameter for `generate`).
      
      - Removed `history` logic from the Conversation as it's not relevant
      anymore because tokenization logic has been moved to tokenizer.
      And tokenizer cannot save any cache, and conversation cannot know
      what is relevant or not.
      Also it's not usable from `blenderbot` because the input_ids are
      not append only (EOS tokens is always at the end).
      
      - Added `iter_texts` method on `Conversation` because all
      the code was literred with some form of this iteration of
      past/generated_responses.
      
      * Removing torch mention in types.
      
      * Adding type checking to `_build_conversation_input_ids`.
      
      * Fixing import in strings.
      b1aa4982
  13. 04 Feb, 2021 1 commit
  14. 28 Jan, 2021 1 commit
  15. 13 Jan, 2021 1 commit
    • Lysandre Debut's avatar
      Fix slow tests v4.2.0 (#9561) · c9495166
      Lysandre Debut authored
      * Fix conversational pipeline test
      
      * LayoutLM
      
      * ProphetNet
      
      * BART
      
      * Blenderbot & small
      
      * Marian
      
      * mBART
      
      * Pegasus
      
      * Tapas tokenizer
      
      * BERT2BERT test
      
      * Style
      
      * Example requirements
      
      * TF BERT2BERT test
      c9495166
  16. 10 Jan, 2021 1 commit
  17. 08 Jan, 2021 1 commit
  18. 07 Dec, 2020 1 commit
  19. 03 Nov, 2020 2 commits
  20. 23 Oct, 2020 1 commit