1. 02 Nov, 2020 1 commit
  2. 29 Oct, 2020 1 commit
  3. 28 Oct, 2020 1 commit
  4. 27 Oct, 2020 1 commit
  5. 26 Oct, 2020 1 commit
    • Sylvain Gugger's avatar
      Doc styling (#8067) · 08f534d2
      Sylvain Gugger authored
      * Important files
      
      * Styling them all
      
      * Revert "Styling them all"
      
      This reverts commit 7d029395fdae8513b8281cbc2a6c239f8093503e.
      
      * Syling them for realsies
      
      * Fix syntax error
      
      * Fix benchmark_utils
      
      * More fixes
      
      * Fix modeling auto and script
      
      * Remove new line
      
      * Fixes
      
      * More fixes
      
      * Fix more files
      
      * Style
      
      * Add FSMT
      
      * More fixes
      
      * More fixes
      
      * More fixes
      
      * More fixes
      
      * Fixes
      
      * More fixes
      
      * More fixes
      
      * Last fixes
      
      * Make sphinx happy
      08f534d2
  6. 23 Oct, 2020 1 commit
  7. 22 Oct, 2020 2 commits
    • Julien Chaumond's avatar
      FillMaskPipeline: support passing top_k on __call__ (#7971) · ff65beaf
      Julien Chaumond authored
      * FillMaskPipeline: support passing top_k on __call__
      
      Also move from topk to top_k
      
      * migrate to new param name in tests
      
      * Review from @sgugger
      ff65beaf
    • Nicolas Patry's avatar
      Fixing the "translation", "translation_XX_to_YY" pipelines. (#7975) · 18ce6b8f
      Nicolas Patry authored
      
      
      * Actually make the "translation", "translation_XX_to_YY" task behave correctly.
      
      Background:
      - Currently "translation_cn_to_ar" does not work. (only 3 pairs are
      supported)
      - Some models, contain in their config the correct values for the (src,
      tgt) pair they can translate. It's usually just one pair, and we can
      infer it automatically from the `model.config.task_specific_params`. If
      it's not defined we can still probably load the TranslationPipeline
      nevertheless.
      
      Proposed fix:
      - A simplified version of what could become more general which is
      a `parametrized` task. "translation" + (src, tgt) in this instance
      it what we need in the general case. The way we go about it for now
      is simply parsing "translation_XX_to_YY". If cases of parametrized task arise
      we should preferably go in something closer to what `datasets` propose
      which is having a secondary argument `task_options`? that will be close
      to what that task requires.
      - Should be backward compatible in all cases for instance
      `pipeline(task="translation_en_to_de") should work out of the box.
      - Should provide a warning when a specific translation pair has been
      selected on behalf of the user using
      `model.config.task_specific_params`.
      
      * Update src/transformers/pipelines.py
      Co-authored-by: default avatarJulien Chaumond <chaumond@gmail.com>
      Co-authored-by: default avatarJulien Chaumond <chaumond@gmail.com>
      18ce6b8f
  8. 21 Oct, 2020 1 commit
    • Sam Shleifer's avatar
      Add TFBartForConditionalGeneration (#5411) · 82984215
      Sam Shleifer authored
      
      
      * half done
      
      * doc improvement
      
      * Cp test file
      
      * brokedn
      
      * broken test
      
      * undo some mess
      
      * ckpt
      
      * borked
      
      * Halfway
      
      * 6 passing
      
      * boom boom
      
      * Much progress but still 6
      
      * boom boom
      
      * merged master
      
      * 10 passing
      
      * boom boom
      
      * Style
      
      * no t5 changes
      
      * 13 passing
      
      * Integration test failing, but not gibberish
      
      * Frustrated
      
      * Merged master
      
      * 4 fail
      
      * 4 fail
      
      * fix return_dict
      
      * boom boom
      
      * Still only 4
      
      * prepare method
      
      * prepare method
      
      * before delete classif
      
      * Skip tests to avoid adding boilerplate
      
      * boom boom
      
      * fast tests passing
      
      * style
      
      * boom boom
      
      * Switch to supporting many input types
      
      * remove FIXMENORM
      
      * working
      
      * Fixed past_key_values/decoder_cached_states confusion
      
      * new broken test
      
      * Fix attention mask kwarg name
      
      * undo accidental
      
      * Style and reviewers
      
      * style
      
      * Docs and common tests
      
      * Cleaner assert messages
      
      * copy docs
      
      * style issues
      
      * Sphinx fix
      
      * Simplify caching logic
      
      * test does not require torch
      
      * copy _NoLayerEmbedTokens
      
      * Update src/transformers/modeling_tf_bart.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Update tests/test_modeling_tf_bart.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Update src/transformers/modeling_tf_bart.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Update src/transformers/modeling_tf_bart.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Update src/transformers/modeling_tf_bart.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * Line length and dont document None
      
      * Add pipeline test coverage
      
      * assert msg
      
      * At parity
      
      * Assert messages
      
      * mark slow
      
      * Update compile test
      
      * back in init
      
      * Merge master
      
      * Fix tests
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      82984215
  9. 16 Oct, 2020 1 commit
  10. 15 Oct, 2020 2 commits
  11. 13 Oct, 2020 2 commits
  12. 18 Sep, 2020 1 commit
  13. 17 Sep, 2020 1 commit
  14. 07 Sep, 2020 1 commit
  15. 02 Sep, 2020 1 commit
    • Suraj Patil's avatar
      [pipelines] Text2TextGenerationPipeline (#6744) · 4230d30f
      Suraj Patil authored
      * add Text2TextGenerationPipeline
      
      * remove max length warning
      
      * remove comments
      
      * remove input_length
      
      * fix typo
      
      * add tests
      
      * use TFAutoModelForSeq2SeqLM
      
      * doc
      
      * typo
      
      * add the doc below TextGenerationPipeline
      
      * doc nit
      
      * style
      
      * delete comment
      4230d30f
  16. 01 Sep, 2020 1 commit
  17. 26 Aug, 2020 2 commits
  18. 25 Aug, 2020 1 commit
  19. 24 Aug, 2020 1 commit
  20. 12 Aug, 2020 2 commits
  21. 04 Aug, 2020 1 commit
  22. 03 Aug, 2020 1 commit
  23. 30 Jul, 2020 2 commits
    • guillaume-be's avatar
      Addition of a DialoguePipeline (#5516) · e642c789
      guillaume-be authored
      
      
      * initial commit for pipeline implementation
      
      Addition of input processing and history concatenation
      
      * Conversation pipeline tested and working for single & multiple conversation inputs
      
      * Added docstrings for dialogue pipeline
      
      * Addition of dialogue pipeline integration tests
      
      * Delete test_t5.py
      
      * Fixed max code length
      
      * Updated styling
      
      * Fixed test broken by formatting tools
      
      * Removed unused import
      
      * Added unit test for DialoguePipeline
      
      * Fixed Tensorflow compatibility
      
      * Fixed multi-framework support using framework flag
      
      * - Fixed docstring
      - Added `min_length_for_response` as an initialization parameter
      - Renamed `*args` to `conversations`, `conversations` being a `Conversation` or a `List[Conversation]`
      - Updated truncation to truncate entire segments of conversations, instead of cutting in the middle of a user/bot input
      
      * - renamed pipeline name from dialogue to conversational
      - removed hardcoded default value of 1000 and use config.max_length instead
      - added `append_response` and `set_history` method to the Conversation class to avoid direct fields mutation
      - fixed bug in history truncation method
      
      * - Updated ConversationalPipeline to accept only active conversations (otherwise a ValueError is raised)
      
      * - Simplified input tensor conversion
      
      * - Updated attention_mask value for Tensorflow compatibility
      
      * - Updated last dialogue reference to conversational & fixed integration tests
      
      * Fixed conflict with master
      
      * Updates following review comments
      
      * Updated formatting
      
      * Added Conversation and ConversationalPipeline to the library __init__, addition of docstrings for Conversation, added both to the docs
      
      * Update src/transformers/pipelines.py
      
      Updated docsting following review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      e642c789
    • Sylvain Gugger's avatar
      Switch from return_tuple to return_dict (#6138) · 91cb9546
      Sylvain Gugger authored
      
      
      * Switch from return_tuple to return_dict
      
      * Fix test
      
      * [WIP] Test TF Flaubert + Add {XLM, Flaubert}{TokenClassification, MultipleC… (#5614)
      
      * Test TF Flaubert + Add {XLM, Flaubert}{TokenClassification, MultipleChoice} models and tests
      
      * AutoModels
      
      
      Tiny tweaks
      
      * Style
      
      * Final changes before merge
      
      * Re-order for simpler review
      
      * Final fixes
      
      * Addressing @sgugger's comments
      
      * Test MultipleChoice
      
      * Rework TF trainer (#6038)
      
      * Fully rework training/prediction loops
      
      * fix method name
      
      * Fix variable name
      
      * Fix property name
      
      * Fix scope
      
      * Fix method name
      
      * Fix tuple index
      
      * Fix tuple index
      
      * Fix indentation
      
      * Fix variable name
      
      * fix eval before log
      
      * Add drop remainder for test dataset
      
      * Fix step number + fix logging datetime
      
      * fix eval loss value
      
      * use global step instead of step + fix logging at step 0
      
      * Fix logging datetime
      
      * Fix global_step usage
      
      * Fix breaking loop + logging datetime
      
      * Fix step in prediction loop
      
      * Fix step breaking
      
      * Fix train/test loops
      
      * Force TF at least 2.2 for the trainer
      
      * Use assert_cardinality to facilitate the dataset size computation
      
      * Log steps per epoch
      
      * Make tfds compliant with TPU
      
      * Make tfds compliant with TPU
      
      * Use TF dataset enumerate instead of the Python one
      
      * revert previous commit
      
      * Fix data_dir
      
      * Apply style
      
      * rebase on master
      
      * Address Sylvain's comments
      
      * Address Sylvain's and Lysandre comments
      
      * Trigger CI
      
      * Remove unused import
      
      * Switch from return_tuple to return_dict
      
      * Fix test
      
      * Add recent model
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      Co-authored-by: default avatarJulien Plu <plu.julien@gmail.com>
      91cb9546
  24. 28 Jul, 2020 2 commits
  25. 27 Jul, 2020 2 commits
    • Suraj Patil's avatar
      Add new AutoModel classes in pipeline (#6062) · c8bdf7f4
      Suraj Patil authored
      * use new AutoModel classed
      
      * make style and quality
      c8bdf7f4
    • Joe Davison's avatar
      Zero shot classification pipeline (#5760) · 3deffc1d
      Joe Davison authored
      * add initial zero-shot pipeline
      
      * change default args
      
      * update default template
      
      * add label string splitting
      
      * add str labels support, remove nli from name
      
      * style
      
      * add input validation and working tf defaults
      
      * tests
      
      * quality check
      
      * add docstring to __call__
      
      * add slow tests
      
      * Change truncation to only_first
      
      also lower precision on tests for readibility
      
      * style
      3deffc1d
  26. 22 Jul, 2020 1 commit
  27. 12 Jul, 2020 1 commit
    • Kevin Canwen Xu's avatar
      Pipeline model type check (#5679) · 0befb513
      Kevin Canwen Xu authored
      * Add model type check for pipelines
      
      * Add model type check for pipelines
      
      * rename func
      
      * Fix the init parameters
      
      * Fix format
      
      * rollback unnecessary refactor
      0befb513
  28. 10 Jul, 2020 1 commit
    • Teven's avatar
      Fixed use of memories in XLNet (caching for language generation + warning when... · 227e0a40
      Teven authored
      Fixed use of memories in XLNet (caching for language generation + warning when loading improper memoryless model) (#5632)
      
      * Pytorch gpu => cpu proper device
      
      * Memoryless XLNet warning + fixed memories during generation
      
      * Revert "Pytorch gpu => cpu proper device"
      
      This reverts commit 93489b36
      
      * made black happy
      
      * TF generation with memories
      
      * dim => axis
      
      * added padding_text to TF XL models
      
      * Added comment, added TF
      227e0a40
  29. 09 Jul, 2020 2 commits
  30. 08 Jul, 2020 1 commit
    • Lorenzo Ampil's avatar
      Fix Inconsistent NER Grouping (Pipeline) (#4987) · 0cc4eae0
      Lorenzo Ampil authored
      
      
      * Add B I handling to grouping
      
      * Add fix to include separate entity as last token
      
      * move last_idx definition outside loop
      
      * Use first entity in entity group as reference for entity type
      
      * Add test cases
      
      * Take out extra class accidentally added
      
      * Return tf ner grouped test to original
      
      * Take out redundant last entity
      
      * Get last_idx safely
      Co-authored-by: default avatarColleterVi <36503688+ColleterVi@users.noreply.github.com>
      
      * Fix first entity comment
      
      * Create separate functions for group_sub_entities and group_entities (splitting call method to testable functions)
      
      * Take out unnecessary last_idx
      
      * Remove additional forward pass test
      
      * Move token classification basic tests to separate class
      
      * Move token classification basic tests back to monocolumninputtestcase
      
      * Move base ner tests to nerpipelinetests
      
      * Take out unused kwargs
      
      * Add back mandatory_keys argument
      
      * Add unitary tests for group_entities in _test_ner_pipeline
      
      * Fix last entity handling
      
      * Fix grouping fucntion used
      
      * Add typing to group_sub_entities and group_entities
      Co-authored-by: default avatarColleterVi <36503688+ColleterVi@users.noreply.github.com>
      0cc4eae0
  31. 03 Jul, 2020 1 commit