From 14352274fc1689b30616ba2ad6acd53c17603c56 Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Tue, 18 Jul 2023 15:53:02 +0200 Subject: [PATCH] remove graphcore --- .../workflows/build_main_documentation.yml | 14 +------ .github/workflows/build_pr_documentation.yml | 14 +------ docs/combine_docs.py | 2 +- docs/source/installation.mdx | 1 - docs/source/quicktour.mdx | 40 ------------------- 5 files changed, 3 insertions(+), 68 deletions(-) diff --git a/.github/workflows/build_main_documentation.yml b/.github/workflows/build_main_documentation.yml index e73f31f24f..4d365024cb 100644 --- a/.github/workflows/build_main_documentation.yml +++ b/.github/workflows/build_main_documentation.yml @@ -38,11 +38,6 @@ jobs: repository: 'huggingface/optimum-habana' path: optimum-habana - - uses: actions/checkout@v2 - with: - repository: 'huggingface/optimum-graphcore' - path: optimum-graphcore - - uses: actions/checkout@v2 with: repository: 'huggingface/optimum-intel' @@ -71,13 +66,6 @@ jobs: pip install black cd .. - - name: Make Graphcore documentation - run: | - cd optimum-graphcore - make doc BUILD_DIR=graphcore-doc-build VERSION=${{ env.VERSION }} - sudo mv graphcore-doc-build ../optimum - cd .. - - name: Make Habana documentation run: | cd optimum-habana @@ -105,7 +93,7 @@ jobs: - name: Combine subpackage documentation run: | cd optimum - sudo python docs/combine_docs.py --subpackages graphcore habana intel neuron --version ${{ env.VERSION }} + sudo python docs/combine_docs.py --subpackages habana intel neuron --version ${{ env.VERSION }} cd .. - name: Push to repositories diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index be045a48ae..e680124023 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -37,11 +37,6 @@ jobs: repository: 'huggingface/optimum-habana' path: optimum-habana - - uses: actions/checkout@v2 - with: - repository: 'huggingface/optimum-graphcore' - path: optimum-graphcore - - uses: actions/checkout@v2 with: repository: 'huggingface/optimum-intel' @@ -56,13 +51,6 @@ jobs: pip install black cd .. - - name: Make Graphcore documentation - run: | - cd optimum-graphcore - make doc BUILD_DIR=graphcore-doc-build VERSION=pr_$PR_NUMBER - sudo mv graphcore-doc-build ../optimum - cd .. - - name: Make Habana documentation run: | cd optimum-habana @@ -87,7 +75,7 @@ jobs: - name: Combine subpackage documentation run: | cd optimum - sudo python docs/combine_docs.py --subpackages graphcore habana intel neuron --version pr_$PR_NUMBER + sudo python docs/combine_docs.py --subpackages habana intel neuron --version pr_$PR_NUMBER sudo mv optimum-doc-build ../ cd .. diff --git a/docs/combine_docs.py b/docs/combine_docs.py index 8715f1a8f4..9c91a3d873 100755 --- a/docs/combine_docs.py +++ b/docs/combine_docs.py @@ -13,7 +13,7 @@ parser.add_argument( "--subpackages", nargs="+", - help="Subpackages to integrate docs with Optimum. Use hardware partner names like `habana`, `graphcore`, or `intel`", + help="Subpackages to integrate docs with Optimum. Use hardware partner names like `habana`, `neuron`, or `intel`", ) parser.add_argument("--version", type=str, default="main", help="The version of the Optimum docs") diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx index 895ead2566..1ed7fa609a 100644 --- a/docs/source/installation.mdx +++ b/docs/source/installation.mdx @@ -25,7 +25,6 @@ If you'd like to use the accelerator-specific features of 🤗 Optimum, you can | [ONNX runtime](https://onnxruntime.ai/docs/) | `python -m pip install optimum[onnxruntime]` | | [Intel Neural Compressor (INC)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/neural-compressor.html) | `python -m pip install optimum[neural-compressor]`| | [Intel OpenVINO](https://docs.openvino.ai/latest/index.html) | `python -m pip install optimum[openvino,nncf]` | -| [Graphcore IPU](https://www.graphcore.ai/products/ipu) | `python -m pip install optimum[graphcore]` | | [Habana Gaudi Processor (HPU)](https://habana.ai/training/) | `python -m pip install optimum[habana]` | diff --git a/docs/source/quicktour.mdx b/docs/source/quicktour.mdx index 507aee155e..06f9cefdbf 100644 --- a/docs/source/quicktour.mdx +++ b/docs/source/quicktour.mdx @@ -129,46 +129,6 @@ To train transformers on Habana's Gaudi processors, 🤗 Optimum provides a `Gau You can find more examples in the [documentation](https://huggingface.co/docs/optimum/habana/quickstart) and in the [examples](https://github.com/huggingface/optimum-habana/tree/main/examples). - -#### Graphcore - -To train transformers on Graphcore's IPUs, 🤗 Optimum provides a `IPUTrainer` that is very similar to the 🤗 Transformers [Trainer](https://huggingface.co/docs/transformers/main_classes/trainer). Here is a simple example: - -```diff -- from transformers import Trainer, TrainingArguments -+ from optimum.graphcore import IPUConfig, IPUTrainer, IPUTrainingArguments - - # Download a pretrained model from the Hub - model = AutoModelForXxx.from_pretrained("bert-base-uncased") - - # Define the training arguments -- training_args = TrainingArguments( -+ training_args = IPUTrainingArguments( - output_dir="path/to/save/folder/", -+ ipu_config_name="Graphcore/bert-base-ipu", # Any IPUConfig on the Hub or stored locally - ... - ) - - # Define the configuration to compile and put the model on the IPU -+ ipu_config = IPUConfig.from_pretrained(training_args.ipu_config_name) - - # Initialize the trainer -- trainer = Trainer( -+ trainer = IPUTrainer( - model=model, -+ ipu_config=ipu_config - args=training_args, - train_dataset=train_dataset - ... - ) - - # Use Graphcore IPU for training! - trainer.train() -``` - -You can find more examples in the [documentation](https://huggingface.co/docs/optimum/graphcore/quickstart) and in the [examples](https://github.com/huggingface/optimum-graphcore/tree/main/examples). - - #### ONNX Runtime To train transformers with ONNX Runtime's acceleration features, 🤗 Optimum provides a `ORTTrainer` that is very similar to the 🤗 Transformers [Trainer](https://huggingface.co/docs/transformers/main_classes/trainer). Here is a simple example: