-
Notifications
You must be signed in to change notification settings - Fork 538
Conversation
Fixes "PytestCollectionWarning: cannot collect test class 'TestNamedTuple' because it has a __new__ constructor"
Codecov Report
@@ 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
|
@@ -12,28 +12,28 @@ def test_list(): | |||
passthrough = batchify.List()(data) | |||
assert passthrough == data | |||
|
|||
TestNamedTuple = namedtuple('TestNamedTuple', ['data', 'label']) | |||
MyNamedTuple = namedtuple('MyNamedTuple', ['data', 'label']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sxjscience FYI
Fixes "UserWarning: New dataset dataset.TOY registered with name toy isoverriding existing dataset scripts.machine_translation.dataset.TOY"
Fixes 'UserWarning: The 0-th input to HybridBlock is not used by any computation. Is this intended?'
By deleting files again
Job PR-980/14 is complete. |
Job PR-980/15 is complete. |
Job PR-980/16 is complete. |
Job PR-980/18 is complete. |
Job PR-980/19 is complete. |
Job PR-980/20 is complete. |
There was a problem hiding this 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.
Yes, I'll add them now. Thanks |
Job PR-980/21 is complete. |
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
Changes
gluonnlp.data.UnigramCandidateSampler
to make use of MXNetrandom.uniform_like
operator and drop constructorshape
argument. Now thecandidates_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 MXNetrandom.uniform_like
operator being available in stable MXNet.cc @dmlc/gluon-nlp-team