Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 70c5438

Browse files
authored
Backport #862 (#863)
* Fix Vocab with unknown_token remapped to != 0 via token_to_idx arg * Add test * Update test_pretrained_bert_models Confirmed that vocab[vocab.unknown_token] still == 0 for all models created prior to the flexible vocab PR. Ie: - book_corpus_wiki_en_uncased - wiki_multilingual_uncased - openwebtext_book_corpus_wiki_en_uncased - wiki_multilingual_cased - wiki_cn_cased * Use cuda 10.1 on CI * Disable false positive pylint warnings Fixed in master branch by #838 Fix does not apply here as it would require dropping py2. * Don't test against v1.6 beta and v1.4.1 at the same time. Test v0.7x branch only on v1.4 due to incompatible doctest output on both mxnet versions * Disable test_finetune_chinese_inference due to DNS error
1 parent a1d6b0e commit 70c5438

File tree

13 files changed

+30
-11
lines changed

13 files changed

+30
-11
lines changed

env/cpu/py2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ dependencies:
1717
- regex
1818
- pip:
1919
- pylint-quotes<0.2
20-
- mxnet-mkl>=1.4.1
20+
- mxnet-mkl==1.4.1
2121
- sentencepiece<0.2

env/cpu/py3-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ dependencies:
1717
- regex
1818
- pip:
1919
- pylint-quotes<0.2
20-
- mxnet-mkl>=1.5.0b20190407
20+
- mxnet-mkl==1.4.1
2121
- sacremoses
2222
- sentencepiece<0.2

env/cpu/py3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- regex
2828
- pip:
2929
- pylint-quotes<0.2
30-
- mxnet-mkl>=1.4.1
30+
- mxnet-mkl==1.4.1
3131
- sacremoses
3232
- sentencepiece<0.2
3333
- https://github.com/mli/mx-theme/tarball/v0.3.9

env/docker/py3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- regex
2828
- pip:
2929
- pylint-quotes<0.2
30-
- mxnet-cu101mkl>=1.4.1
30+
- mxnet-cu101mkl==1.4.1
3131
- sacremoses
3232
- sentencepiece<0.2
3333
- https://github.com/mli/mx-theme/tarball/v0.3.9

env/gpu/py2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ dependencies:
1717
- regex
1818
- pip:
1919
- pylint-quotes<0.2
20-
- mxnet-cu92mkl>=1.4.1
20+
- mxnet-cu101mkl==1.4.1
2121
- sentencepiece<0.2

env/gpu/py3-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- regex
2828
- pip:
2929
- pylint-quotes<0.2
30-
- mxnet-cu92mkl>=1.5.0b20190407
30+
- mxnet-cu101mkl==1.4.1
3131
- sacremoses
3232
- sentencepiece<0.2
3333
- https://github.com/mli/mx-theme/tarball/v0.3.9

env/gpu/py3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- regex
2828
- pip:
2929
- pylint-quotes<0.2
30-
- mxnet-cu92mkl>=1.4.1
30+
- mxnet-cu101mkl==1.4.1
3131
- sacremoses
3232
- sentencepiece<0.2
3333
- https://github.com/mli/mx-theme/tarball/v0.3.9

scripts/parsing/parser/biaffine_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def flatten_numpy(arr):
253253
# seq_len x batch_size
254254

255255
if is_train or arc_targets is not None:
256-
correct = np.equal(arc_preds.asnumpy(), arc_targets)
256+
correct = np.equal(arc_preds.asnumpy(), arc_targets) # pylint: disable=assignment-from-no-return
257257
arc_correct = correct.astype(np.float32) * mask
258258
arc_accuracy = np.sum(arc_correct) / num_tokens
259259
targets_1D = flatten_numpy(arc_targets)

scripts/parsing/parser/evaluate/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def evaluate_official_script(parser, vocab, num_buckets_test, test_batch_size,
6969
gold_arc = gold_arc[1:length + 1]
7070
gold_rel = gold_rel[1:length + 1]
7171

72-
arc_mask = np.equal(pred_arc, gold_arc)
72+
arc_mask = np.equal(pred_arc, gold_arc) # pylint: disable=assignment-from-no-return
7373
uc += np.sum(arc_mask)
7474
total += length
7575

scripts/tests/test_scripts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_finetune_inference(dataset):
360360
@pytest.mark.remote_required
361361
@pytest.mark.integration
362362
@pytest.mark.parametrize('dataset', ['XNLI', 'LCQMC', 'ChnSentiCorp'])
363-
@pytest.mark.skipif(datetime.date.today() < datetime.date(2019, 7, 18),
363+
@pytest.mark.skipif(datetime.date.today() < datetime.date(2019, 8, 18),
364364
reason='Disabled for 4 weeks due to DNS error.')
365365
def test_finetune_chinese_inference(dataset):
366366
arguments = ['--log_interval', '100', '--epsilon', '1e-8', '--optimizer',

0 commit comments

Comments
 (0)