Merge pull request #461 from microsoft/hlu/remove_pytorch_transformers_dependency
Remove pytorch-transformers from dependencies.
This commit is contained in:
Коммит
c556e978f7
|
@ -18,7 +18,7 @@ General Public License.
|
|||
|
||||
--
|
||||
|
||||
https://github.com/huggingface/pytorch-transformers
|
||||
https://github.com/huggingface/transformers
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
@ -664,3 +664,5 @@ https://github.com/allenai/bi-att-flow
|
|||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ The following is a list of related repositories that we like and think are usefu
|
|||
|
||||
|||
|
||||
|---|---|
|
||||
|[pytorch-transformers](https://github.com/huggingface/pytorch-transformers)|A great PyTorch library from Hugging Face with implementations of popular transformer-based models. We've been using their package extensively in this repo and greatly appreciate their effort.|
|
||||
|[transformers](https://github.com/huggingface/transformers)|A great PyTorch library from Hugging Face with implementations of popular transformer-based models. We've been using their package extensively in this repo and greatly appreciate their effort.|
|
||||
|[Azure Machine Learning Notebooks](https://github.com/Azure/MachineLearningNotebooks/)|ML and deep learning examples with Azure Machine Learning.|
|
||||
|[AzureML-BERT](https://github.com/Microsoft/AzureML-BERT)|End-to-end recipes for pre-training and fine-tuning BERT using Azure Machine Learning service.|
|
||||
|[MASS](https://github.com/microsoft/MASS)|MASS: Masked Sequence to Sequence Pre-training for Language Generation.|
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"**BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding** [\\[1\\]](#References)"
|
||||
]
|
||||
},
|
||||
{
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
|
@ -188,7 +188,7 @@
|
|||
"source": [
|
||||
"# Model configuration\n",
|
||||
"DATA_FOLDER = './squad'\n",
|
||||
"PROJECT_FOLDER = './pytorch-transformers'\n",
|
||||
"PROJECT_FOLDER = './transformers'\n",
|
||||
"EXPERIMENT_NAME = 'NLP-QA-BERT-deepdive'\n",
|
||||
"BERT_MODEL = 'bert-large-uncased'\n",
|
||||
"TARGET_GRADIENT_STEPS = 16\n",
|
||||
|
@ -713,7 +713,7 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!git clone -b v0.4.0 https://github.com/huggingface/pytorch-transformers.git"
|
||||
"!git clone -b v0.4.0 https://github.com/huggingface/transformers.git"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -735,20 +735,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'./pytorch-transformers\\\\bert_run_squad_azureml.py'"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"shutil.copy(EVALUATE_SQAD_PATH, project_folder)\n",
|
||||
"shutil.copy(BERT_UTIL_PATH, project_folder)\n",
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
"\n",
|
||||
"Using a pre-trained XLNet model, we can fine-tune the model for text classification by training it on the MNLI dataset [\\[4\\]](#References). The Multi-Genre Natural Language Inference (MultiNLI) corpus is a crowd-sourced collection of 433k sentence pairs annotated with textual entailment information. \n",
|
||||
"\n",
|
||||
"This notebook contains an end-to-end walkthrough of a pipeline to run PyTorch-Transformer's reimplementation [\\[5\\]](#References) of the XLNet model."
|
||||
"This notebook contains an end-to-end walkthrough of a pipeline to run Transformer's reimplementation [\\[5\\]](#References) of the XLNet model."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -572,7 +572,7 @@
|
|||
"**See figure below for the step-by-step tokenization process** \n",
|
||||
"<img src=\"https://i.imgur.com/o6ewGgd.jpg\" width=\"1000\">\n",
|
||||
"\n",
|
||||
"*For more information on XLNet's input format, see pytorch-transformer [implementation](https://github.com/huggingface/pytorch-transformers/blob/master/examples/utils_glue.py)*"
|
||||
"*For more information on XLNet's input format, see transformer [implementation](https://github.com/huggingface/pytorch-transformers/blob/master/examples/utils_glue.py)*"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -946,7 +946,7 @@
|
|||
"2. Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina, [*BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding*](https://arxiv.org/abs/1810.04805), ACL, 2018.\n",
|
||||
"3. Dai, Zihang, Zhilin Yang, Yiming Yang, William W. Cohen, Jaime Carbonell, Quoc V. Le, and Ruslan Salakhutdinov. [*Transformer-xl: Attentive language models beyond a fixed-length context.*](https://arxiv.org/pdf/1901.02860), 2019.\n",
|
||||
"4. Adina Williams, Nikita Nangia, Samuel R. Bowman. [*A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference*](https://www.nyu.edu/projects/bowman/multinli/paper.pdf), 2016. Dataset available at (https://www.nyu.edu/projects/bowman/multinli/).\n",
|
||||
"5. PyTorch-Transformers: a library of state-of-the-art pre-trained models for Natural Language Processing (NLP). Repository available at (https://github.com/huggingface/pytorch-transformers)."
|
||||
"5. Transformers: a library of state-of-the-art pre-trained models for Natural Language Processing (NLP). Repository available at (https://github.com/huggingface/transformers)."
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -93,7 +93,7 @@ def test_bert_qa_runs(notebooks, subscription_id, resource_group, workspace_name
|
|||
parameters=dict(
|
||||
AZUREML_CONFIG_PATH=".",
|
||||
DATA_FOLDER="./tests/integration/squad",
|
||||
PROJECT_FOLDER="./tests/integration/pytorch-transformers",
|
||||
PROJECT_FOLDER="./tests/integration/transformers",
|
||||
EXPERIMENT_NAME="NLP-QA-BERT-deepdive",
|
||||
BERT_UTIL_PATH="./utils_nlp/azureml/azureml_bert_util.py",
|
||||
EVALUATE_SQAD_PATH="./utils_nlp/eval/evaluate_squad.py",
|
||||
|
|
|
@ -70,7 +70,6 @@ PIP_BASE = {
|
|||
"nteract-scrapbook": "nteract-scrapbook>=0.2.1",
|
||||
"pydocumentdb": "pydocumentdb>=2.3.3",
|
||||
"pytorch-pretrained-bert": "pytorch-pretrained-bert>=0.6",
|
||||
"pytorch-transformers": "pytorch-transformers>=1.2.0",
|
||||
"tqdm": "tqdm==4.31.1",
|
||||
"pyemd": "pyemd==0.5.1",
|
||||
"ipywebrtc": "ipywebrtc==0.4.3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# BERT-based Classes
|
||||
|
||||
This folder contains utility functions and classes based on the implementation of [PyTorch-Transformers](https://github.com/huggingface/pytorch-transformers).
|
||||
This folder contains utility functions and classes based on the implementation of [Transformers](https://github.com/huggingface/transformers).
|
||||
|
||||
## Summary
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
# This script reuses some code from
|
||||
# https://github.com/huggingface/pytorch-transformers/blob/master/examples
|
||||
# https://github.com/huggingface/transformers/blob/master/examples
|
||||
# /run_glue.py
|
||||
|
||||
import csv
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
# This script reuses some code from
|
||||
# https://github.com/huggingface/pytorch-transformers/blob/master/examples
|
||||
# https://github.com/huggingface/transformers/blob/master/examples
|
||||
# /run_glue.py
|
||||
|
||||
from collections import namedtuple
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# XLNet-based Classes
|
||||
|
||||
This folder contains utility functions and classes based on the implementation of [PyTorch-Transformers](https://github.com/huggingface/pytorch-transformers).
|
||||
This folder contains utility functions and classes based on the implementation of [Transformers](https://github.com/huggingface/transformers).
|
||||
|
||||
## Summary
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
|
||||
# This script reuses some code from
|
||||
# https://github.com/huggingface/pytorch-transformers/blob/master/examples/utils_glue.py
|
||||
# https://github.com/huggingface/transformers/blob/master/examples/utils_glue.py
|
||||
from enum import Enum
|
||||
from pytorch_transformers import XLNetTokenizer
|
||||
from transformers import XLNetTokenizer
|
||||
from mlflow import log_metric, log_param, log_artifact
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import numpy as np
|
|||
from collections import namedtuple
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
from pytorch_transformers import (
|
||||
from transformers import (
|
||||
XLNetConfig,
|
||||
XLNetForSequenceClassification,
|
||||
AdamW,
|
||||
|
|
Загрузка…
Ссылка в новой задаче