Made more pacakge friendly, auto model downloader #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thanks for the awesome library!
Note: I further added functionality to download the models automatically to save the users any extra steps, this is done in the example as well, please see the note at the bottom.
I did have some issue with paths throughout and installing it as a local package is broken due to:
json
config files not being included when the package is actually installed usingpip
module
, a folder containing an__init__.py
file.This PR essentially makes the library more package friendly by allowing the user to install the library using pip:
Fixes
The pull request addressed these issues by:
json
files required for the code to run are included using aMANIFEST.in
. (docs)__init__.py
files where missing.__file__
.README.md
to take out the requirement of theexport PYTHONPATH=$PWD
Benefits
A user should now just be able to import and use nasbench301 as a package as they would any other third-party package downloaded from github, without having to do the export step mentioned in the
README.md
. (assuming they have downloaded thenb_models
v0.9 or v1.0)Test
This was tested with my own code that uses all 3 models. I have also tested this by running the
example.py
.Updated Example and Model Downloading
To make it easier to run the example I included a script to download the models and updated the example to use it if the models do not exist.
If the library is installed using
pip install nasbench301
, the downloader defaults to deleting the zip files afterwards to prevent any bloat into the environment it's installed into.