From c066598c23acb02ebfb9c3f1472ffa08115be697 Mon Sep 17 00:00:00 2001 From: Omar Sanseviero Date: Mon, 16 Aug 2021 15:45:19 +0200 Subject: [PATCH] Fix frameworks table so it's alphabetical (#13118) * Fix frameworks table so it's alphabetical * Update index.rst * Don't differentiate when sorting between upper and lower case --- docs/source/index.rst | 42 +++++++++++++++++++++--------------------- utils/check_table.py | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 3777650d9e..a70a1562a0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -315,10 +315,10 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | BART | ✅ | ✅ | ✅ | ✅ | ✅ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| BERT | ✅ | ✅ | ✅ | ✅ | ✅ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | BeiT | ❌ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| BERT | ✅ | ✅ | ✅ | ✅ | ✅ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Bert Generation | ✅ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | BigBird | ✅ | ✅ | ✅ | ❌ | ✅ | @@ -329,19 +329,15 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | BlenderbotSmall | ✅ | ❌ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| CLIP | ✅ | ✅ | ✅ | ❌ | ✅ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| CTRL | ✅ | ❌ | ✅ | ✅ | ❌ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | CamemBERT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Canine | ✅ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| CLIP | ✅ | ✅ | ✅ | ❌ | ✅ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | ConvBERT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| DETR | ❌ | ❌ | ✅ | ❌ | ❌ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| DPR | ✅ | ✅ | ✅ | ✅ | ❌ | +| CTRL | ✅ | ❌ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | DeBERTa | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ @@ -349,8 +345,12 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | DeiT | ❌ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| DETR | ❌ | ❌ | ✅ | ❌ | ❌ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | DistilBERT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| DPR | ✅ | ✅ | ✅ | ✅ | ❌ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | ELECTRA | ✅ | ✅ | ✅ | ✅ | ✅ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Encoder decoder | ❌ | ❌ | ✅ | ❌ | ❌ | @@ -367,26 +367,30 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | I-BERT | ❌ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| LayoutLM | ✅ | ✅ | ✅ | ✅ | ❌ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | LED | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| Longformer | ✅ | ✅ | ✅ | ✅ | ❌ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | LUKE | ✅ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | LXMERT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| LayoutLM | ✅ | ✅ | ✅ | ✅ | ❌ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| Longformer | ✅ | ✅ | ✅ | ✅ | ❌ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | M2M100 | ✅ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| MPNet | ✅ | ✅ | ✅ | ✅ | ❌ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Marian | ✅ | ❌ | ✅ | ✅ | ✅ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| mBART | ✅ | ✅ | ✅ | ✅ | ✅ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | MegatronBert | ❌ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | MobileBERT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| MPNet | ✅ | ✅ | ✅ | ✅ | ❌ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| mT5 | ✅ | ✅ | ✅ | ✅ | ✅ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | OpenAI GPT | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | OpenAI GPT-2 | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -417,10 +421,10 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Transformer-XL | ✅ | ❌ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| ViT | ❌ | ❌ | ✅ | ❌ | ✅ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | VisualBert | ❌ | ❌ | ✅ | ❌ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ +| ViT | ❌ | ❌ | ✅ | ❌ | ✅ | ++-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | Wav2Vec2 | ✅ | ❌ | ✅ | ✅ | ✅ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | XLM | ✅ | ❌ | ✅ | ✅ | ❌ | @@ -431,10 +435,6 @@ Flax), PyTorch, and/or TensorFlow. +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ | XLNet | ✅ | ✅ | ✅ | ✅ | ❌ | +-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| mBART | ✅ | ✅ | ✅ | ✅ | ✅ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ -| mT5 | ✅ | ✅ | ✅ | ✅ | ✅ | -+-----------------------------+----------------+----------------+-----------------+--------------------+--------------+ .. toctree:: :maxdepth: 2 diff --git a/utils/check_table.py b/utils/check_table.py index 4cb105b119..6376360969 100644 --- a/utils/check_table.py +++ b/utils/check_table.py @@ -131,7 +131,7 @@ def get_model_table_from_auto_modules(): # Let's build that table! model_names = list(model_name_to_config.keys()) - model_names.sort() + model_names.sort(key=str.lower) columns = ["Model", "Tokenizer slow", "Tokenizer fast", "PyTorch support", "TensorFlow support", "Flax Support"] # We'll need widths to properly display everything in the center (+2 is to leave one extra space on each side). widths = [len(c) + 2 for c in columns]