From b2c863a3196150850d17548f25ee0575bccb8224 Mon Sep 17 00:00:00 2001 From: Steven Liu <59462357+stevhliu@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:29:23 -0800 Subject: [PATCH] Remove double brackets (#20307) * remove double brackets * oops get other bracket --- src/transformers/pipelines/audio_classification.py | 2 +- src/transformers/pipelines/automatic_speech_recognition.py | 2 +- src/transformers/pipelines/conversational.py | 2 +- src/transformers/pipelines/depth_estimation.py | 2 +- src/transformers/pipelines/document_question_answering.py | 2 +- src/transformers/pipelines/feature_extraction.py | 2 +- src/transformers/pipelines/fill_mask.py | 2 +- src/transformers/pipelines/image_classification.py | 2 +- src/transformers/pipelines/image_to_text.py | 2 +- src/transformers/pipelines/object_detection.py | 2 +- src/transformers/pipelines/question_answering.py | 2 +- src/transformers/pipelines/table_question_answering.py | 2 +- src/transformers/pipelines/text2text_generation.py | 2 +- src/transformers/pipelines/text_classification.py | 2 +- src/transformers/pipelines/text_generation.py | 2 +- src/transformers/pipelines/token_classification.py | 2 +- src/transformers/pipelines/visual_question_answering.py | 2 +- src/transformers/pipelines/zero_shot_classification.py | 2 +- src/transformers/pipelines/zero_shot_image_classification.py | 2 +- src/transformers/pipelines/zero_shot_object_detection.py | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/transformers/pipelines/audio_classification.py b/src/transformers/pipelines/audio_classification.py index 045997961f0..a58247d4128 100644 --- a/src/transformers/pipelines/audio_classification.py +++ b/src/transformers/pipelines/audio_classification.py @@ -81,7 +81,7 @@ class AudioClassificationPipeline(Pipeline): [{'score': 0.997, 'label': '_unknown_'}, {'score': 0.002, 'label': 'left'}, {'score': 0.0, 'label': 'yes'}, {'score': 0.0, 'label': 'down'}, {'score': 0.0, 'label': 'stop'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This pipeline can currently be loaded from [`pipeline`] using the following task identifier: diff --git a/src/transformers/pipelines/automatic_speech_recognition.py b/src/transformers/pipelines/automatic_speech_recognition.py index 5569be33c92..09f3abd6988 100644 --- a/src/transformers/pipelines/automatic_speech_recognition.py +++ b/src/transformers/pipelines/automatic_speech_recognition.py @@ -118,7 +118,7 @@ class AutomaticSpeechRecognitionPipeline(ChunkPipeline): {'text': ' He hoped there would be stew for dinner, turnips and carrots and bruised potatoes and fat mutton pieces to be ladled out in thick, peppered flour fat and sauce.'} ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) Arguments: model ([`PreTrainedModel`] or [`TFPreTrainedModel`]): diff --git a/src/transformers/pipelines/conversational.py b/src/transformers/pipelines/conversational.py index 950b87bf9aa..2b5758d47c2 100644 --- a/src/transformers/pipelines/conversational.py +++ b/src/transformers/pipelines/conversational.py @@ -181,7 +181,7 @@ class ConversationalPipeline(Pipeline): "It's a comedy." ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This conversational pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"conversational"`. diff --git a/src/transformers/pipelines/depth_estimation.py b/src/transformers/pipelines/depth_estimation.py index d53c81bdf0c..ef3b661d68c 100644 --- a/src/transformers/pipelines/depth_estimation.py +++ b/src/transformers/pipelines/depth_estimation.py @@ -36,7 +36,7 @@ class DepthEstimationPipeline(Pipeline): torch.Size([1, 384, 384]) ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This depth estimation pipeline can currently be loaded from [`pipeline`] using the following task identifier: diff --git a/src/transformers/pipelines/document_question_answering.py b/src/transformers/pipelines/document_question_answering.py index ce1c129b9a8..d3708fb1b5c 100644 --- a/src/transformers/pipelines/document_question_answering.py +++ b/src/transformers/pipelines/document_question_answering.py @@ -119,7 +119,7 @@ class DocumentQuestionAnsweringPipeline(ChunkPipeline): [{'score': 0.425, 'answer': 'us-001', 'start': 16, 'end': 16}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This document question answering pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"document-question-answering"`. diff --git a/src/transformers/pipelines/feature_extraction.py b/src/transformers/pipelines/feature_extraction.py index e05e55621d5..212ad0a1219 100644 --- a/src/transformers/pipelines/feature_extraction.py +++ b/src/transformers/pipelines/feature_extraction.py @@ -20,7 +20,7 @@ class FeatureExtractionPipeline(Pipeline): torch.Size([1, 8, 768]) ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This feature extraction pipeline can currently be loaded from [`pipeline`] using the task identifier: `"feature-extraction"`. diff --git a/src/transformers/pipelines/fill_mask.py b/src/transformers/pipelines/fill_mask.py index 6f460494f5e..fd977a72f8e 100644 --- a/src/transformers/pipelines/fill_mask.py +++ b/src/transformers/pipelines/fill_mask.py @@ -46,7 +46,7 @@ class FillMaskPipeline(Pipeline): [{'score': 0.042, 'token': 3291, 'token_str': 'problem', 'sequence': 'this is a simple problem.'}, {'score': 0.031, 'token': 3160, 'token_str': 'question', 'sequence': 'this is a simple question.'}, {'score': 0.03, 'token': 8522, 'token_str': 'equation', 'sequence': 'this is a simple equation.'}, {'score': 0.027, 'token': 2028, 'token_str': 'one', 'sequence': 'this is a simple one.'}, {'score': 0.024, 'token': 3627, 'token_str': 'rule', 'sequence': 'this is a simple rule.'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This mask filling pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"fill-mask"`. diff --git a/src/transformers/pipelines/image_classification.py b/src/transformers/pipelines/image_classification.py index 5f448d829b9..6e9d519fb4b 100644 --- a/src/transformers/pipelines/image_classification.py +++ b/src/transformers/pipelines/image_classification.py @@ -44,7 +44,7 @@ class ImageClassificationPipeline(Pipeline): [{'score': 0.442, 'label': 'macaw'}, {'score': 0.088, 'label': 'popinjay'}, {'score': 0.075, 'label': 'parrot'}, {'score': 0.073, 'label': 'parodist, lampooner'}, {'score': 0.046, 'label': 'poll, poll_parrot'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This image classification pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"image-classification"`. diff --git a/src/transformers/pipelines/image_to_text.py b/src/transformers/pipelines/image_to_text.py index f55d253d791..2053d241630 100644 --- a/src/transformers/pipelines/image_to_text.py +++ b/src/transformers/pipelines/image_to_text.py @@ -40,7 +40,7 @@ class ImageToTextPipeline(Pipeline): [{'generated_text': 'two birds are standing next to each other '}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This image to text pipeline can currently be loaded from pipeline() using the following task identifier: "image-to-text". diff --git a/src/transformers/pipelines/object_detection.py b/src/transformers/pipelines/object_detection.py index c0c4c40def5..e418438310b 100644 --- a/src/transformers/pipelines/object_detection.py +++ b/src/transformers/pipelines/object_detection.py @@ -38,7 +38,7 @@ class ObjectDetectionPipeline(Pipeline): >>> # x, y are expressed relative to the top left hand corner. ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This object detection pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"object-detection"`. diff --git a/src/transformers/pipelines/question_answering.py b/src/transformers/pipelines/question_answering.py index 63307d2c3f0..4607398ad86 100644 --- a/src/transformers/pipelines/question_answering.py +++ b/src/transformers/pipelines/question_answering.py @@ -236,7 +236,7 @@ class QuestionAnsweringPipeline(ChunkPipeline): {'score': 0.9191, 'start': 34, 'end': 40, 'answer': 'Berlin'} ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This question answering pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"question-answering"`. diff --git a/src/transformers/pipelines/table_question_answering.py b/src/transformers/pipelines/table_question_answering.py index 8a2e7bad010..615037a6d96 100644 --- a/src/transformers/pipelines/table_question_answering.py +++ b/src/transformers/pipelines/table_question_answering.py @@ -107,7 +107,7 @@ class TableQuestionAnsweringPipeline(Pipeline): {'answer': 'AVERAGE > 36542', 'coordinates': [(0, 1)], 'cells': ['36542'], 'aggregator': 'AVERAGE'} ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This tabular question answering pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"table-question-answering"`. diff --git a/src/transformers/pipelines/text2text_generation.py b/src/transformers/pipelines/text2text_generation.py index 443e6a3554b..a9f73218ad5 100644 --- a/src/transformers/pipelines/text2text_generation.py +++ b/src/transformers/pipelines/text2text_generation.py @@ -39,7 +39,7 @@ class Text2TextGenerationPipeline(Pipeline): [{'generated_text': 'question: Who created the RuPERTa-base?'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This Text2TextGenerationPipeline pipeline can currently be loaded from [`pipeline`] using the following task diff --git a/src/transformers/pipelines/text_classification.py b/src/transformers/pipelines/text_classification.py index 008eb0bb86e..e58c31ad58a 100644 --- a/src/transformers/pipelines/text_classification.py +++ b/src/transformers/pipelines/text_classification.py @@ -63,7 +63,7 @@ class TextClassificationPipeline(Pipeline): [{'label': 'NEGATIVE', 'score': 0.996}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This text classification pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"sentiment-analysis"` (for classifying sequences according to positive or negative sentiments). diff --git a/src/transformers/pipelines/text_generation.py b/src/transformers/pipelines/text_generation.py index 33ca788e45e..2ac4cdeaf51 100644 --- a/src/transformers/pipelines/text_generation.py +++ b/src/transformers/pipelines/text_generation.py @@ -36,7 +36,7 @@ class TextGenerationPipeline(Pipeline): >>> outputs = generator("My tart needs some", num_return_sequences=4, return_full_text=False) ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This language generation pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"text-generation"`. diff --git a/src/transformers/pipelines/token_classification.py b/src/transformers/pipelines/token_classification.py index 03242eea470..963f491db7e 100644 --- a/src/transformers/pipelines/token_classification.py +++ b/src/transformers/pipelines/token_classification.py @@ -110,7 +110,7 @@ class TokenClassificationPipeline(Pipeline): [{'entity_group': 'PRON', 'score': 0.999, 'word': 'my', 'start': 0, 'end': 2}, {'entity_group': 'NOUN', 'score': 0.997, 'word': 'name', 'start': 3, 'end': 7}, {'entity_group': 'AUX', 'score': 0.994, 'word': 'is', 'start': 8, 'end': 10}, {'entity_group': 'PROPN', 'score': 0.999, 'word': 'sarah', 'start': 11, 'end': 16}, {'entity_group': 'CCONJ', 'score': 0.999, 'word': 'and', 'start': 17, 'end': 20}, {'entity_group': 'PRON', 'score': 0.999, 'word': 'i', 'start': 21, 'end': 22}, {'entity_group': 'VERB', 'score': 0.998, 'word': 'live', 'start': 23, 'end': 27}, {'entity_group': 'ADP', 'score': 0.999, 'word': 'in', 'start': 28, 'end': 30}, {'entity_group': 'PROPN', 'score': 0.999, 'word': 'london', 'start': 31, 'end': 37}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This token recognition pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"ner"` (for predicting the classes of tokens in a sequence: person, organisation, location or miscellaneous). diff --git a/src/transformers/pipelines/visual_question_answering.py b/src/transformers/pipelines/visual_question_answering.py index d2e952b0f5b..05a2b9f7362 100644 --- a/src/transformers/pipelines/visual_question_answering.py +++ b/src/transformers/pipelines/visual_question_answering.py @@ -41,7 +41,7 @@ class VisualQuestionAnsweringPipeline(Pipeline): [{'score': 0.996, 'answer': 'no'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This visual question answering pipeline can currently be loaded from [`pipeline`] using the following task identifiers: `"visual-question-answering", "vqa"`. diff --git a/src/transformers/pipelines/zero_shot_classification.py b/src/transformers/pipelines/zero_shot_classification.py index 99c707990a6..413591cf905 100644 --- a/src/transformers/pipelines/zero_shot_classification.py +++ b/src/transformers/pipelines/zero_shot_classification.py @@ -74,7 +74,7 @@ class ZeroShotClassificationPipeline(ChunkPipeline): {'sequence': 'I have a problem with my iphone that needs to be resolved asap!!', 'labels': ['english', 'german'], 'scores': [0.814, 0.186]} ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This NLI pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"zero-shot-classification"`. diff --git a/src/transformers/pipelines/zero_shot_image_classification.py b/src/transformers/pipelines/zero_shot_image_classification.py index f9ebf7bb8e7..1b7cd5f17f7 100644 --- a/src/transformers/pipelines/zero_shot_image_classification.py +++ b/src/transformers/pipelines/zero_shot_image_classification.py @@ -52,7 +52,7 @@ class ZeroShotImageClassificationPipeline(ChunkPipeline): [{'score': 0.996, 'label': 'black and white'}, {'score': 0.003, 'label': 'photorealist'}, {'score': 0.0, 'label': 'painting'}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This image classification pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"zero-shot-image-classification"`. diff --git a/src/transformers/pipelines/zero_shot_object_detection.py b/src/transformers/pipelines/zero_shot_object_detection.py index 83a4969a7f6..f6192caf9c5 100644 --- a/src/transformers/pipelines/zero_shot_object_detection.py +++ b/src/transformers/pipelines/zero_shot_object_detection.py @@ -44,7 +44,7 @@ class ZeroShotObjectDetectionPipeline(ChunkPipeline): [{'score': 0.119, 'label': 'bird', 'box': {'xmin': 71, 'ymin': 170, 'xmax': 410, 'ymax': 508}}] ``` - [Learn more about the basics of using a pipeline in the [pipeline tutorial]](../pipeline_tutorial) + Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) This object detection pipeline can currently be loaded from [`pipeline`] using the following task identifier: `"zero-shot-object-detection"`.