From a8d34e534e2bf4900ea225e5608981b5b9a0c706 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Tue, 24 Dec 2019 08:46:08 +0100 Subject: [PATCH] Remove [--editable] in install instructions. Use -e only in docs targeted at contributors. If a user copy-pastes command line with [--editable], they will hit an error. If they don't know the --editable option, we're giving them a choice to make before they can move forwards, but this isn't a choice they need to make right now. --- CONTRIBUTING.md | 4 ++++ README.md | 4 ++-- docs/README.md | 2 +- docs/source/installation.md | 2 +- examples/README.md | 2 +- examples/pplm/README.md | 2 +- examples/summarization/README.md | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 220ad02670..7ff83ce0cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,6 +124,10 @@ Follow these steps to start contributing: $ pip install -e .[dev] ``` + (If transformers was already installed in the virtual environment, remove + it with `pip uninstall transformers` before reinstalling it in editable + mode with the `-e` flag.) + Right now, we need an unreleased version of `isort` to avoid a [bug](https://github.com/timothycrosley/isort/pull/1000): diff --git a/README.md b/README.md index f11fceebe8..7a96004c58 100644 --- a/README.md +++ b/README.md @@ -93,14 +93,14 @@ When TensorFlow 2.0 and/or PyTorch has been installed, you can install from sour ```bash git clone https://github.com/huggingface/transformers cd transformers -pip install [--editable] . +pip install . ``` When you update the repository, you should upgrade the transformers installation and its dependencies as follows: ```bash git pull -pip install --upgrade [--editable] . +pip install --upgrade . ``` ### Run the examples diff --git a/docs/README.md b/docs/README.md index be9fe95b2b..1c989d8c90 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ To generate the documentation, you first have to build it. Several packages are you can install them with the following command, at the root of the code repository: ```bash -pip install .[docs] +pip install -e .[docs] ``` ## Packages installed diff --git a/docs/source/installation.md b/docs/source/installation.md index 513c6f2b40..f4b7781ea9 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -17,7 +17,7 @@ To install from source, clone the repository and install with: ``` bash git clone https://github.com/huggingface/transformers.git cd transformers -pip install [--editable] . +pip install . ``` ## Tests diff --git a/examples/README.md b/examples/README.md index e311686ede..b0a9f978f8 100644 --- a/examples/README.md +++ b/examples/README.md @@ -10,7 +10,7 @@ Execute the following steps in a new virtual environment: ```bash git clone https://github.com/huggingface/transformers cd transformers -pip install [--editable] . +pip install . pip install -r ./examples/requirements.txt ``` diff --git a/examples/pplm/README.md b/examples/pplm/README.md index b12205854a..ed105f95cf 100644 --- a/examples/pplm/README.md +++ b/examples/pplm/README.md @@ -15,7 +15,7 @@ Please check out the repo under uber-research for more information: https://gith ```bash git clone https://github.com/huggingface/transformers && cd transformers -pip install [--editable] . +pip install . pip install nltk torchtext # additional requirements. cd examples/pplm ``` diff --git a/examples/summarization/README.md b/examples/summarization/README.md index b98581e8e5..250c4bcfe8 100644 --- a/examples/summarization/README.md +++ b/examples/summarization/README.md @@ -10,7 +10,7 @@ The model is loaded with the pre-trained weights for the abstractive summarizati ``` git clone https://github.com/huggingface/transformers && cd transformers -pip install [--editable] . +pip install . pip install nltk py-rouge cd examples/summarization ```