allenai / deep_qa

A deep NLP library, based on Keras / tf, focused on question answering (but useful for other NLP too)
Apache License 2.0
404 stars 133 forks source link

Make deep_qa pip-installable #210

Closed DeNeutoy closed 7 years ago

codecov-io commented 7 years ago

Codecov Report

Merging #210 into master will increase coverage by 0.18%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage    80.4%   80.59%   +0.18%     
==========================================
  Files         102      102              
  Lines        5283     5283              
==========================================
+ Hits         4248     4258      +10     
+ Misses       1035     1025      -10
Impacted Files Coverage Δ
deep_qa/layers/backend/batch_dot.py 95.45% <ø> (+1.51%) :white_check_mark:
deep_qa/tensors/similarity_functions/linear.py 95.83% <ø> (+2.08%) :white_check_mark:
deep_qa/layers/overlap.py 100% <ø> (+3.33%) :white_check_mark:
deep_qa/tensors/backend.py 94.11% <ø> (+3.92%) :white_check_mark:
deep_qa/tensors/similarity_functions/bilinear.py 100% <ø> (+5.26%) :white_check_mark:
deep_qa/layers/encoders/positional_encoder.py 91.17% <ø> (+5.88%) :white_check_mark:
deep_qa/common/checks.py 81.48% <ø> (+7.4%) :white_check_mark:

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 5ad371a...2390bb6. Read the comment docs.

DeNeutoy commented 7 years ago

Ok I think this works now: if you run python setup.py sdist from the top level directory, it should create a compressed package which is pip installable. This is what we have to upload to pypi when we are ready. I tested it by copying the tar file to an aws instance and installing it - I was able to import encoders etc, so at least the basic functionality of the package works.

nelson-liu commented 7 years ago

hmm still looks like the rst is still not rendering properly (https://github.com/DeNeutoy/deep_qa/blob/4b56a4c99aaf9b3ef5fce0afe8eff2aa29c20e8e/README.rst)

DeNeutoy commented 7 years ago

@matt-gardner It would be good if you could look over this (given your name's on it haha). I don't see how we can really test this without just putting it on pypi and seeing if it works - I feel like there will be small things we'll have to figure out that are different from the local checks I have done - I can do this once you are basically happy with the metadata etc.

To test: run python setup.py sdist at the top level directory, which will create a tar file in a /dist directory. Copy that to an ec2 instance/ virtual env or something and see if you can install and use the package using pip (after decompressing it).

One other thing I think might be good is that you can set up python scripts to run as CLI arguments - it would be cool if we could have run_solver.py as a command like deep-qa-run which you could just call with a JSON argument file. I'll try adding that if you think it's a good idea.

If that works for you I can try getting it on Pypi this afternoon.

matt-gardner commented 7 years ago

We definitely want the setup.py - are you closing this so you can open a fresh PR?