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

Conversation

sxjscience
Copy link
Member

Description

During the implementation, I find that sometimes we need to have the following functionality:

for sample in data_loader:
     foo(sample.data, sample.label)

Now, the feature is available via NamedTuple, we can combine NamedTuple and the other batchify functions.

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

  • NamedTuple, tests

cc @dmlc/gluon-nlp-team

@sxjscience sxjscience requested a review from a team as a code owner October 3, 2019 21:51
@codecov
Copy link

codecov bot commented Oct 3, 2019

Codecov Report

Merging #959 into master will increase coverage by 0.02%.
The diff coverage is 95.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #959      +/-   ##
==========================================
+ Coverage   90.75%   90.78%   +0.02%     
==========================================
  Files          67       67              
  Lines        6384     6423      +39     
==========================================
+ Hits         5794     5831      +37     
- Misses        590      592       +2
Impacted Files Coverage Δ
src/gluonnlp/data/batchify/batchify.py 96.06% <95.12%> (-0.53%) ⬇️

@sxjscience sxjscience changed the title [FEATURE] Add NamedTuple batchify [FEATURE][WIP] Add NamedTuple batchify Oct 3, 2019
@mli
Copy link
Member

mli commented Oct 3, 2019

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

@sxjscience sxjscience changed the title [FEATURE][WIP] Add NamedTuple batchify [FEATURE] Add NamedTuple + Dict batchify Oct 4, 2019
@sxjscience sxjscience force-pushed the named_tuple_batchify branch from 13b73c5 to 0bd0a36 Compare October 4, 2019 23:07
@mli
Copy link
Member

mli commented Oct 5, 2019

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

@mli
Copy link
Member

mli commented Oct 7, 2019

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

@mli
Copy link
Member

mli commented Oct 7, 2019

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

@mli
Copy link
Member

mli commented Oct 7, 2019

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

@mli
Copy link
Member

mli commented Oct 8, 2019

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

try to fix doc test

Update batchify.py

update

fix

fix error + add test

add more tests

Update batchify.py

add more tests

add more tests

fix examples

fix example docstring

try to fix

try fo fix

fix

try to fix

Update batchify.py

update doc

Update batchify.py

Update batchify.py

retrigger CI
@sxjscience sxjscience force-pushed the named_tuple_batchify branch from 15b39e2 to fd4aeb9 Compare October 8, 2019 22:20
@mli
Copy link
Member

mli commented Oct 8, 2019

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

@mli
Copy link
Member

mli commented Oct 8, 2019

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

@szha szha added the release focus Progress focus for release label Oct 8, 2019
@sxjscience sxjscience merged commit c3cac54 into dmlc:master Oct 9, 2019
@sxjscience sxjscience deleted the named_tuple_batchify branch October 9, 2019 00:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release focus Progress focus for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants