Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #413 from microsoft/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
saidbleik authored Sep 18, 2019
2 parents b44c655 + cb60519 commit 8fb28e0
Show file tree
Hide file tree
Showing 19 changed files with 94 additions and 660 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ The following is a list of related repositories that we like and think are usefu


## Build Status
| Build Type | Branch | Status | | Branch | Status |
| --- | --- | --- | --- | --- | --- |
| **Linux CPU** | master | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/cpu_integration_tests_linux?branchName=master)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=50&branchName=master) | | staging | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/cpu_integration_tests_linux?branchName=staging)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=50&branchName=staging) |
| **Linux GPU** | master | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/gpu_integration_tests_linux?branchName=master)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=51&branchName=master) | | staging | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/gpu_integration_tests_linux?branchName=staging)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=51&branchName=staging) |
| Build | Branch | Status |
| --- | --- | --- |
| **Linux CPU** | master | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/cpu_integration_tests_linux?branchName=master)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=50&branchName=master) |
| **Linux CPU** | staging | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/cpu_integration_tests_linux?branchName=staging)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=50&branchName=staging) |
| **Linux GPU** | master | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/gpu_integration_tests_linux?branchName=master)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=51&branchName=master) |
| **Linux GPU** | staging | [![Build Status](https://dev.azure.com/best-practices/nlp/_apis/build/status/gpu_integration_tests_linux?branchName=staging)](https://dev.azure.com/best-practices/nlp/_build/latest?definitionId=51&branchName=staging) |
9 changes: 8 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

This folder contains examples and best practices, written in Jupyter notebooks, for building Natural Language Processing systems for the following scenarios.


|Category|Applications|Methods|Languages|
|---| ------------------------ | ------------------- |---|
|[Text Classification](text_classification)|Topic Classification|BERT, XLNet|en, hi, ar|
Expand All @@ -14,3 +13,11 @@ This folder contains examples and best practices, written in Jupyter notebooks,
|[Annotation](annotation)|Text Annotation|Doccano||
|[Model Explainability](model_explainability)|DNN Layer Explanation|DUUDNM (Guan et al.)|

## Data/Telemetry
The Azure Machine Learning notebooks collect browser usage data and send it to Microsoft to help improve our products and services. Read Microsoft's [privacy statement to learn more](https://privacy.microsoft.com/en-US/privacystatement).

To opt out of tracking, please go to the raw `.ipynb` files and remove the following line of code (the URL will be slightly different depending on the file):

```sh
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/text_classification/tc_bert_azureml.png)"
```
7 changes: 7 additions & 0 deletions examples/entailment/entailment_xnli_bert_azureml.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
"\n",
"**Note: To learn how to do pre-training on your own, please reference the [AzureML-BERT repo](https://github.com/microsoft/AzureML-BERT) created by Microsoft.**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/entailment/entailment_xnli_bert_azureml.png)"
]
},
{
"cell_type": "code",
Expand Down
7 changes: 7 additions & 0 deletions examples/question_answering/bidaf_aml_deep_dive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"source": [
"# BiDAF Model Deep Dive on AzureML"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/question_answering/bidaf_aml_deep_dive.png)"
]
},
{
"cell_type": "markdown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
"# Question Answering: Fine-Tune BERT on AzureML (PyTorch)\n",
"**BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding** [\\[1\\]](#References)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/question_answering/pretrained_BERT_SQuAD_deep_dive_aml.png)"
]
},
{
"cell_type": "markdown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"), [BiDAF](https://www.semanticscholar.org/paper/Bidirectional-Attention-Flow-for-Machine-Seo-Kembhavi/007ab5528b3bd310a80d553cccad4b78dc496b02\n",
"), using Azure Container Instances ([ACI](https://azure.microsoft.com/en-us/services/container-instances/))."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/question_answering/bidaf_quickstart.png)"
]
},
{
"cell_type": "markdown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"source": [
"# Local Automated Machine Learning Model with ACI Deployment for Predicting Sentence Similarity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/sentence_similarity/automl_local_deployment_aci.png)"
]
},
{
"cell_type": "markdown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"source": [
"# AzureML Pipeline, AutoML, AKS Deployment for Sentence Similarity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/sentence_similarity/automl_with_pipelines_deployment_aks.png)"
]
},
{
"cell_type": "markdown",
Expand Down
7 changes: 7 additions & 0 deletions examples/sentence_similarity/bert_senteval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"source": [
"# Parallel Experimentation with BERT on AzureML"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/sentence_similarity/bert_senteval.png)"
]
},
{
"cell_type": "markdown",
Expand Down
7 changes: 7 additions & 0 deletions examples/sentence_similarity/gensen_aml_deep_dive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
"# Training GenSen on AzureML with SNLI Dataset\n",
"**GenSen: Learning General Purpose Distributed Sentence Representations via Large Scale Multi-task Learning** [\\[1\\]](#References)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/sentence_similarity/gensen_aml_deep_dive.png)"
]
},
{
"cell_type": "markdown",
Expand Down
7 changes: 7 additions & 0 deletions examples/text_classification/tc_bert_azureml.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"# Text Classification of MultiNLI Sentences using BERT with Azure ML Pipelines"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/nlp/examples/text_classification/tc_bert_azureml.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
3 changes: 1 addition & 2 deletions examples/text_classification/tc_mnli_bert.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
"import torch\n",
"import torch.nn as nn\n",
"\n",
"from utils_nlp.dataset.multinli import load_pandas_df\n",
"from utils_nlp.eval.classification import eval_classification\n",
"from utils_nlp.dataset.multinli import load_pandas_df\n",
"from utils_nlp.models.bert.sequence_classification import BERTSequenceClassifier\n",
"from utils_nlp.models.bert.common import Language, Tokenizer\n",
"from utils_nlp.common.timer import Timer"
Expand Down
13 changes: 7 additions & 6 deletions tests/integration/test_notebooks_text_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,19 @@ def test_tc_dac_bert_ar(notebooks, tmp):
NUM_GPUS=1,
DATA_FOLDER=tmp,
BERT_CACHE_DIR=tmp,
BATCH_SIZE=32,
MAX_LEN=175,
BATCH_SIZE=16,
NUM_EPOCHS=1,
TRAIN_SIZE=0.8,
NUM_ROWS=15000,
NUM_ROWS=8000,
RANDOM_STATE=0,
),
)
result = sb.read_notebook(OUTPUT_NOTEBOOK).scraps.data_dict
assert pytest.approx(result["accuracy"], 0.93, abs=ABS_TOL)
assert pytest.approx(result["precision"], 0.91, abs=ABS_TOL)
assert pytest.approx(result["recall"], 0.91, abs=ABS_TOL)
assert pytest.approx(result["f1"], 0.91, abs=ABS_TOL)
assert pytest.approx(result["accuracy"], 0.871, abs=ABS_TOL)
assert pytest.approx(result["precision"], 0.865, abs=ABS_TOL)
assert pytest.approx(result["recall"], 0.852, abs=ABS_TOL)
assert pytest.approx(result["f1"], 0.845, abs=ABS_TOL)


@pytest.mark.gpu
Expand Down
36 changes: 0 additions & 36 deletions tools/repo_metrics/README.md

This file was deleted.

Empty file removed tools/repo_metrics/__init__.py
Empty file.
13 changes: 0 additions & 13 deletions tools/repo_metrics/config_template.py

This file was deleted.

Loading

0 comments on commit 8fb28e0

Please sign in to comment.