-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/python packaging #310
Conversation
also better __repr__ method for JavaObjectWrapper
Here is a list of the largest jar files amongst ND4J's dependencies:
|
I guess we can exclude |
I don't know how to exclude platform-specific versions since they all come under one maven module, e.g. http://central.maven.org/maven2/org/bytedeco/javacpp-presets/openblas/0.3.0-1.4.2/
shadowJar is now 41MB (macosx only)
shadowJar is now 79MB
I've got ND4J's dependencies down to 75MB but I don't think I can go any further. We could split our python package up into 3 different versions (for 3 platforms) but that feels like introducing unnecessary complexity.
|
Is it possible for |
Request to increase PiPI file size limit: pypi/warehouse#4979 |
We could do something like that, but I don't want to be dependent on internet connectivity at runtime. I think any pulling down of dependencies ought to happen at installation time. |
We've been given an increased limit of 100MB now |
…le KEANU_ND4J_CLASSPATH
…u-python directory
…he environment variable APPVEYOR_BUILD_FOLDER
…eature/python-packaging
keanu-python/setup.py
Outdated
|
||
def readme(): | ||
with open('README.rst', "r") as f: | ||
return f.read() | ||
|
||
version_string = '0.0.14.dev8' |
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.
It could be 0.0.15.dev0
if we want to follow java Keanu.
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.
Looks good. Just some nits.
if nd4j_path is None: | ||
return keanu_path | ||
else: | ||
return os.pathsep.join([keanu_path, os.path.join(nd4j_path, "*")]) |
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.
Is this for appveyor?
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.
yes, it's for Windows.
For now, Windows users have to download a 40MB jar (mkl-dnn) and set an environment variable to point to it
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.
😢
@@ -0,0 +1,10 @@ | |||
# Root logger option |
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.
Just curious, is this related to this PR?
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.
it's related to me trying to debug why it was freezing on Windows!
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.
and it will be useful to have this in our main branch
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.
Some more comments
author='Improbable Worlds', | ||
author_email='keanu-engineering@improbable.io', | ||
url='https://github.com/improbable-research/keanu', | ||
license='MIT', | ||
packages=['keanu'], | ||
packages=find_packages(exclude=["examples"]), |
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.
Should we also exclude tests?
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.
that seems to happen automatically
version_string = '0.0.15.dev0' | ||
|
||
# If you don't remove the old directories, it tends to put the excluded module "examples" into the bdist | ||
for dir_name in ("keanu-%s.dist-info" % version_string, "keanu.egg-info", "build", "dist"): |
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.
It seems like we can get around this bug my adding some more stuff to our MANIFEST.in
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.
I don't think so - see e.g. pypa/setuptools#511
This PR makes it possible for us to deploy our python package to PyPi so that users can
pip install keanu
.Currently you also need to put all your ND4J dependencies into a local directory and point to it with an environment variable
KEANU_ND4J_CLASSPATH
. This is only because of its size (around 250MB) - there is a 60MB limit on PyPi, although this will be extended if we request it.Next step: see if we can strip ND4J down to just the bits we need, and measure its size.