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

[CI] Test warnings #980

Merged
merged 32 commits into from
Oct 25, 2019
Merged

[CI] Test warnings #980

merged 32 commits into from
Oct 25, 2019

Conversation

leezu
Copy link
Contributor

@leezu leezu commented Oct 21, 2019

Description

Tell pytest to turn all warnings into errors.
For example, this helps to enforce that we don't run into problems like #978

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • Update gluonnlp.data.UnigramCandidateSampler to make use of MXNet random.uniform_like operator and drop constructor shape argument. Now the candidates_like argument during forward is used to specify shape of to be sampled candidates. This was the originally intended design, but had to wait for MXNet random.uniform_like operator being available in stable MXNet.

cc @dmlc/gluon-nlp-team

Fixes "PytestCollectionWarning: cannot collect test class 'TestNamedTuple'
because it has a __new__ constructor"
@leezu leezu requested a review from a team as a code owner October 21, 2019 18:24
@codecov
Copy link

codecov bot commented Oct 21, 2019

Codecov Report

Merging #980 into master will increase coverage by 8.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #980      +/-   ##
==========================================
+ Coverage   81.47%   90.01%   +8.53%     
==========================================
  Files          67       67              
  Lines        6371     6482     +111     
==========================================
+ Hits         5191     5835     +644     
+ Misses       1180      647     -533
Impacted Files Coverage Δ
src/gluonnlp/data/batchify/batchify.py 95.27% <ø> (-0.79%) ⬇️
src/gluonnlp/data/glue.py 98.63% <ø> (+1.81%) ⬆️
src/gluonnlp/data/word_embedding_evaluation.py 92.39% <ø> (+3.38%) ⬆️
src/gluonnlp/data/transforms.py 86% <ø> (ø) ⬆️
src/gluonnlp/vocab/subwords.py 87.23% <100%> (+0.27%) ⬆️
src/gluonnlp/data/candidate_sampler.py 91.83% <100%> (-0.48%) ⬇️
src/gluonnlp/embedding/token_embedding.py 92.01% <100%> (+2.89%) ⬆️
src/gluonnlp/model/attention_cell.py 96.45% <0%> (+2.05%) ⬆️
... and 18 more

@@ -12,28 +12,28 @@ def test_list():
passthrough = batchify.List()(data)
assert passthrough == data

TestNamedTuple = namedtuple('TestNamedTuple', ['data', 'label'])
MyNamedTuple = namedtuple('MyNamedTuple', ['data', 'label'])
Copy link
Contributor Author

@leezu leezu Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mli
Copy link
Member

mli commented Oct 23, 2019

Job PR-980/14 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/14/index.html

@mli
Copy link
Member

mli commented Oct 24, 2019

Job PR-980/15 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/15/index.html

@mli
Copy link
Member

mli commented Oct 24, 2019

Job PR-980/16 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/16/index.html

@mli
Copy link
Member

mli commented Oct 24, 2019

Job PR-980/18 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/18/index.html

@mli
Copy link
Member

mli commented Oct 24, 2019

Job PR-980/19 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/19/index.html

@mli
Copy link
Member

mli commented Oct 25, 2019

Job PR-980/20 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/20/index.html

@leezu leezu requested a review from sxjscience October 25, 2019 04:54
@leezu leezu added the release focus Progress focus for release label Oct 25, 2019
Copy link
Member

@szha szha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please document all API changes in the PR comment to be added to release note later.

@leezu
Copy link
Contributor Author

leezu commented Oct 25, 2019

Yes, I'll add them now. Thanks

@mli
Copy link
Member

mli commented Oct 25, 2019

Job PR-980/21 is complete.
Docs are uploaded to http://gluon-nlp-staging.s3-accelerate.dualstack.amazonaws.com/PR-980/21/index.html

@leezu leezu merged commit 7c4fd12 into dmlc:master Oct 25, 2019
@leezu leezu deleted the warningserror branch October 25, 2019 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API change release focus Progress focus for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants