dmlc / gluon-nlp

NLP made easy
https://nlp.gluon.ai/
Apache License 2.0
2.56k stars 538 forks source link

[FEATURE] gpt2 generation scripts #1354

Closed hutao965 closed 3 years ago

hutao965 commented 4 years ago

Checklist

Essentials

Changes

cc @dmlc/gluon-nlp-team

codecov[bot] commented 4 years ago

Codecov Report

Merging #1354 into master will increase coverage by 10.87%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1354       +/-   ##
===========================================
+ Coverage   70.87%   81.75%   +10.87%     
===========================================
  Files         105       52       -53     
  Lines       12483     6894     -5589     
===========================================
- Hits         8847     5636     -3211     
+ Misses       3636     1258     -2378     
Impacted Files Coverage Δ
src/gluonnlp/models/gpt2.py 90.94% <100.00%> (-7.25%) :arrow_down:
src/gluonnlp/sequence_sampler.py 87.34% <100.00%> (ø)
src/gluonnlp/models/xlmr.py 58.82% <0.00%> (-29.42%) :arrow_down:
src/gluonnlp/models/__init__.py 67.74% <0.00%> (-29.04%) :arrow_down:
src/gluonnlp/models/electra.py 57.89% <0.00%> (-18.56%) :arrow_down:
src/gluonnlp/models/bart.py 70.62% <0.00%> (-15.63%) :arrow_down:
src/gluonnlp/utils/config.py 61.53% <0.00%> (-15.39%) :arrow_down:
src/gluonnlp/models/roberta.py 84.38% <0.00%> (-9.29%) :arrow_down:
src/gluonnlp/utils/misc.py 51.08% <0.00%> (-7.74%) :arrow_down:
src/gluonnlp/models/albert.py 87.80% <0.00%> (-7.67%) :arrow_down:
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0223686...d84f53f. Read the comment docs.

sxjscience commented 4 years ago

@hymzoque Would you also add from . import gpt2 in https://github.com/dmlc/gluon-nlp/blob/master/src/gluonnlp/models/__init__.py#L12?

sxjscience commented 4 years ago

Let me do it in https://github.com/dmlc/gluon-nlp/pull/1355

brettkoonce commented 3 years ago

you might rename

scripts/genertate

to

scripts/generate
sxjscience commented 3 years ago

@hymzoque Would you check why the GPU test is failing? In fact you may click the details and download the artifact.