Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zero-shot pipeline single seq output shape #6104

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

joeddav
Copy link
Contributor

@joeddav joeddav commented Jul 28, 2020

Fixes zero shot pipelines bug that returns sequence as a list rather than a str when a single sequence is passed as a list.

@codecov
Copy link

codecov bot commented Jul 28, 2020

Codecov Report

Merging #6104 into master will decrease coverage by 1.54%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6104      +/-   ##
==========================================
- Coverage   77.77%   76.23%   -1.55%     
==========================================
  Files         146      146              
  Lines       26325    26325              
==========================================
- Hits        20474    20068     -406     
- Misses       5851     6257     +406     
Impacted Files Coverage Δ
src/transformers/pipelines.py 78.50% <ø> (ø)
src/transformers/data/data_collator.py 19.82% <0.00%> (-77.59%) ⬇️
...c/transformers/modeling_tf_transfo_xl_utilities.py 9.90% <0.00%> (-76.24%) ⬇️
src/transformers/modeling_tf_transfo_xl.py 17.22% <0.00%> (-72.24%) ⬇️
src/transformers/tokenization_xlm.py 16.26% <0.00%> (-66.67%) ⬇️
...rc/transformers/data/datasets/language_modeling.py 34.69% <0.00%> (-57.15%) ⬇️
src/transformers/data/datasets/glue.py 50.74% <0.00%> (-35.83%) ⬇️
src/transformers/tokenization_bart.py 60.00% <0.00%> (-35.72%) ⬇️
src/transformers/modeling_tf_gpt2.py 65.42% <0.00%> (-29.91%) ⬇️
src/transformers/trainer_utils.py 60.00% <0.00%> (-25.72%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06834bc...23060b9. Read the comment docs.

@joeddav joeddav merged commit b1c8b76 into huggingface:master Jul 28, 2020
stas00 added a commit to stas00/transformers that referenced this pull request Jul 30, 2020
commit 54f9fbe
Author: Julien Plu <plu.julien@gmail.com>
Date:   Wed Jul 29 20:32:01 2020 +0200

    Rework TF trainer (huggingface#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

commit 3f94170
Author: Lysandre Debut <lysandre@huggingface.co>
Date:   Wed Jul 29 14:26:26 2020 -0400

    [WIP] Test TF Flaubert + Add {XLM, Flaubert}{TokenClassification, MultipleC… (huggingface#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

commit 8a8ae27
Author: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Date:   Wed Jul 29 12:28:12 2020 -0400

    Use google style to document properties (huggingface#6130)

    * Use google style to document properties

    * Update src/transformers/configuration_utils.py

    Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

    Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

commit fc64559
Author: Julien Plu <plu.julien@gmail.com>
Date:   Wed Jul 29 18:20:00 2020 +0200

    Fix TF CTRL model naming (huggingface#6134)

commit 641b873
Author: Lysandre Debut <lysandre@huggingface.co>
Date:   Wed Jul 29 11:38:15 2020 -0400

    XLNet PLM Readme (huggingface#6121)

commit 8d157c9
Author: Timo Moeller <timo.moeller@deepset.ai>
Date:   Wed Jul 29 17:34:16 2020 +0200

    add deepset/xlm-roberta-large-squad2 model card (huggingface#6128)

    * Add xlm-r QA model card

    * Add tags

commit 6c00285
Author: Funtowicz Morgan <mfuntowicz@users.noreply.github.com>
Date:   Wed Jul 29 13:21:29 2020 +0200

    Added capability to quantize a model while exporting through ONNX. (huggingface#6089)

    * Added capability to quantize a model while exporting through ONNX.

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    We do not support multiple extensions

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Reformat files

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * More quality

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Ensure test_generate_identified_name compares the same object types

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Added documentation everywhere on ONNX exporter

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Use pathlib.Path instead of plain-old string

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Use f-string everywhere

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Use the correct parameters for black formatting

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Use Python 3 super() style.

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Use packaging.version to ensure installed onnxruntime version match requirements

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Fixing imports sorting order.

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Missing raise(s)

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Added quantization documentation

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Fix some spelling.

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Fix bad list header format

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

commit 25de74c
Author: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Date:   Wed Jul 29 05:20:53 2020 -0400

    Use FutureWarning to deprecate (huggingface#6111)

commit 640550f
Author: Funtowicz Morgan <mfuntowicz@users.noreply.github.com>
Date:   Wed Jul 29 11:02:35 2020 +0200

    ONNX documentation (huggingface#5992)

    * Move torchscript and add ONNX documentation under modle_export

    Signed-off-by: Morgan Funtowicz <funtowiczmo@gmail.com>

    * Let's follow guidelines by the gurus: Renamed torchscript.rst to serialization.rst

    Signed-off-by: Morgan Funtowicz <funtowiczmo@gmail.com>

    * Remove previously introduced tree element

    Signed-off-by: Morgan Funtowicz <funtowiczmo@gmail.com>

    * WIP doc

    Signed-off-by: Morgan Funtowicz <funtowiczmo@gmail.com>

    * ONNX documentation

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Fix invalid link

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Improve spelling

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

    * Final wording pass

    Signed-off-by: Morgan Funtowicz <morgan@huggingface.co>

commit 92f8ce2
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 18:30:16 2020 -0400

    Fix deebert tests (huggingface#6102)

commit c49cd92
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 18:29:35 2020 -0400

    [Fix] position_ids tests again (huggingface#6100)

commit 40796c5
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 18:29:18 2020 -0400

    [fix] add bart to LM_MAPPING (huggingface#6099)

commit 5abe503
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 18:27:58 2020 -0400

    Fix huggingface#6096: MBartTokenizer's mask token (huggingface#6098)

commit b1c8b76
Author: Joe Davison <josephddavison@gmail.com>
Date:   Tue Jul 28 14:46:03 2020 -0400

    Fix zero-shot pipeline single seq output shape (huggingface#6104)

commit 06834bc
Author: Lysandre Debut <lysandre@huggingface.co>
Date:   Tue Jul 28 12:44:25 2020 -0400

    Logs should not be hidden behind a logger.info (huggingface#6097)

commit dafa296
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 11:24:23 2020 -0400

    [s2s] Delete useless method, log tokens_per_batch (huggingface#6081)

commit dc4755c
Author: Tanmay Thakur <thakurtanmay72@yahoo.com>
Date:   Tue Jul 28 19:30:23 2020 +0530

    create model-card for lordtt13/emo-mobilebert (huggingface#6030)

commit 28931f8
Author: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Date:   Tue Jul 28 09:48:39 2020 -0400

    Fix huggingface#6092 (huggingface#6093)

    * Fix huggingface#6092

    * Format

commit 5e97c82
Author: Manuel Romero <mrm8488@gmail.com>
Date:   Tue Jul 28 15:36:00 2020 +0200

    Create README.md (huggingface#6076)

commit 54f49af
Author: Clement <clementdelangue@gmail.Com>
Date:   Tue Jul 28 09:14:00 2020 -0400

    Add inference widget examples (huggingface#5825)

commit 0206efb
Author: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Date:   Tue Jul 28 09:08:20 2020 -0400

    Make all data collators accept dict (huggingface#6065)

    * Make all data collators accept dict

    * Style

commit 31a5486
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 08:41:27 2020 -0400

    github issue template suggests who to tag (huggingface#5790)

    Co-authored-by: Julien Chaumond <chaumond@gmail.com>
    Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
    Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
    Co-authored-by: Teven <teven.lescao@gmail.com>

commit f0c7008
Author: Stas Bekman <stas00@users.noreply.github.com>
Date:   Tue Jul 28 05:34:58 2020 -0700

    link to README.md (huggingface#6068)

    * add a link to README.md

    * Update README.md

commit 4f814fd
Author: Pavel Soriano <pavel.soriano@data.gouv.fr>
Date:   Tue Jul 28 14:33:52 2020 +0200

    [Model Card] camembert-base-squadFR-fquad-piaf (huggingface#6087)

commit 3c7fbf3
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Tue Jul 28 08:18:11 2020 -0400

    MBART: support summarization tasks where max_src_len > max_tgt_len (huggingface#6003)

    * MBART: support summarization tasks

    * fix test

    * Style

    * add tokenizer test

commit 842eb45
Author: Tanmay Thakur <thakurtanmay72@yahoo.com>
Date:   Tue Jul 28 13:55:12 2020 +0530

    New Community NB Add (huggingface#5824)

    Signed-off-by: lordtt13 <thakurtanmay72@yahoo.com>

commit 018d61f
Author: Andrés Felipe Cruz <bones.felipe@gmail.com>
Date:   Tue Jul 28 01:19:17 2020 -0700

    Moving transformers package import statements to relative imports in some files (huggingface#5796)

    * Moving rom transformers statements to relative imports in some files under src/

    * Import order

    Co-authored-by: Lysandre Debut <lysandre@huggingface.co>

commit 7214954
Author: Lysandre Debut <lysandre@huggingface.co>
Date:   Tue Jul 28 03:14:31 2020 -0400

    Should return a tuple for serialization (huggingface#6061)

commit 7a68d40
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Mon Jul 27 20:07:21 2020 -0400

    [s2s] Don't mention packed data in README (huggingface#6079)

commit b7345d2
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Mon Jul 27 20:00:44 2020 -0400

    [fix] no warning for position_ids buffer (huggingface#6063)

commit 1e00ef6
Author: Sam Shleifer <sshleifer@gmail.com>
Date:   Mon Jul 27 18:26:00 2020 -0400

    [s2s] dont document packing because it hurts performance (huggingface#6077)

commit 9d0d3a6
Author: sgugger <sylvain.gugger@gmail.com>
Date:   Mon Jul 27 18:03:09 2020 -0400

    Pin TF while we wait for a fix

commit 769e6ba
Author: Ramsri Goutham Golla <ramsrigouthamg@gmail.com>
Date:   Tue Jul 28 01:55:37 2020 +0530

    Create README.md (huggingface#6032)

    Adding model card - readme
@joeddav joeddav deleted the zero-shot-single-seq-fix branch August 28, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant