No project description provided
Project description
Python Bindings
How to install this
This project is currently work in progress, and is to be considered for all intents and porposes an alpha version.
To install the latest (alpha) release, run the following:
pip install ensmallen_graph
Compile the bindings
The project uses PyO3 and maturin. You need nightly rust in order to compile PyO3. This could be done by running:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh --default-toolchain nightly --profile default -y
Then we need to install maturin with:
cargo install maturin
And finally we can create the Wheels with:
maturin build --release
The wheels will be located in ./target/wheels/
.
Compile the bindings for multiple Python versions
By default maturin will build for the installed python version.
To install other Python versions just run:
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz
tar -xf Python-${PYTHON_VERSION}.tar.xz
(cd Python-${PYTHON_VERSION}; ./configure --enable-optimizations; make -j$(nproc); make -j$(nproc) install)
Where ${PYTHON_VERSION}
is the choosen version, such as 3.8.3
or 3.6.10
.
Solving the GLIBC__2.29__ not found error
This means that the linux package were built on a system with a really new Libc version. This can be solved by compiling your own bindings. In order to be compatible with as many systems as possible, we suggest to build them on the official Manylinux1 docker.
Exploiting Avx
The library vec_rand which is used in the crate can take advantage in using Avx instructions/
To compile the bindings with Avx Instructions you can run :
RUSTFLAGS=" -C target-cpu=native" maturin build --release --no-sdist
Compiling the bindings for Linux to push them to Pipy
In order to make the wheels usable by any linux system we must follow the manylinux1
standard.
This can be done by building the bindings inside a centos5 docker with:
sudo docker run --rm -v $(pwd):/io konstin2/maturin build --release
A tutorial on how the internals of Python's Cffi can be found here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ensmallen_graph-0.3.1-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f3b6027aac41ba662f45e5a1c605aec2090a0489eaee3fc71a3decf72b00aa1 |
|
MD5 | bfccf0d293dad391b3b85cf150985418 |
|
BLAKE2b-256 | ce32845126c2db6a836e78fde04b234a1ea47c9f24383cec055a05f8be2b70c8 |
Hashes for ensmallen_graph-0.3.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b72306a50a1fb01f28c8b6986ee1e93531c245996fd27bba9722e4fec70856b8 |
|
MD5 | b2682034c42e2423781e411277ac2661 |
|
BLAKE2b-256 | f3bb662b7dfeb4c195c92eb2a4da1f283b455b9e30c4d7877ff10a7b3da61318 |
Hashes for ensmallen_graph-0.3.1-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d63cd4fc70687f5827ee213ca99b9b0a86887f656f68a6dc8a7537ae10b0c404 |
|
MD5 | 8ddda26f412a6d257bb671f25fe8cdec |
|
BLAKE2b-256 | 13d8121a25a727911ebba624ada54bcbefbe38de4998abfbd6612d1f1a451e01 |
Hashes for ensmallen_graph-0.3.1-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a712f9f455f0dd91a017ef2a88abf3134e29f9c18acc18ce51808409f53fc59 |
|
MD5 | fa2e9e31118b829b0c9fea2488c406eb |
|
BLAKE2b-256 | aafecbfdfdd9c17449d1b2c4550c8a7a40cc40afddafbe07c8ae069dc6fe10e6 |
Hashes for ensmallen_graph-0.3.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 767fb187cdddf965832ee0d3362f682ed20856b5fe9f070055f9d81b7b6fe55b |
|
MD5 | cd504d21abcad62c4a0813974ccdf22b |
|
BLAKE2b-256 | 23e7253fdc1b8a040bfc5afeb93a1222992817eac1f1f1f97c1c4f990ed9fef3 |
Hashes for ensmallen_graph-0.3.1-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9c0a25afd0954a0ffead8a284ec28616351f05d8578c3f3bdaf6ad6e1e2bc6 |
|
MD5 | 86031c3c16c7b71a98d01a7faca54f2b |
|
BLAKE2b-256 | 65e6d4a14b48f62b7204c9302ac869c3b731e59d75adc109049c3474588c36f9 |
Hashes for ensmallen_graph-0.3.1-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3365354831e97a5666710de31d9e7ee9e4316fa008f8d2e4568be285faab66c3 |
|
MD5 | 39ec1070258d6b8f8efc857324bf7212 |
|
BLAKE2b-256 | 2e270236c25a1e51f60fecaeabeda57341b437ffe68d02aea7bb071203587802 |
Hashes for ensmallen_graph-0.3.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d5dc86e035058f51741876f4249d5464f1aa570a357cff1596f12a90427b2ab |
|
MD5 | 9bf4cf368c9f3997034c4238a8a87c86 |
|
BLAKE2b-256 | 6d82c968431ba6654cef80567d3e7c26f14f3201e6687ffb069d2550efe4ed9a |
Hashes for ensmallen_graph-0.3.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9146004be3b2ca100414c84eebc0039506b7546750ae1a47787744c42bf8311a |
|
MD5 | 9b7761c2853b091a4a9c4d26aa186e29 |
|
BLAKE2b-256 | b23c336cd53df23e398879b09903bab4337e3a5ce3dddb96af6575bfef6050ae |
Hashes for ensmallen_graph-0.3.1-cp35-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706b93ce9c39450c5f78e3053b13ab0f21c1e52bdd6eb691ced69285c9058ee7 |
|
MD5 | f50d2a5cf1f9c2831c4d02bdce19f0f6 |
|
BLAKE2b-256 | c74a35b71fa4565ea02e0d4e78762327cf87b2b495743e20e863aa88ee272e26 |
Hashes for ensmallen_graph-0.3.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f03be8c9202cc86f9b649ce7d7dd5d59a56d7e3d2d0e595f5ac993b5498202 |
|
MD5 | e0c68aad3eee4902da1404ee45925dac |
|
BLAKE2b-256 | 01e0c0510a37eb27d8e13b82916ab4f700553f4861effa002e772ab5df357eac |
Hashes for ensmallen_graph-0.3.1-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86aa37c73bc6f69be70a023de9828140d83a4d60cc8f543c57da1523262ce4fc |
|
MD5 | 3e2d058f8fbf280ed02bdb9cd3c352d6 |
|
BLAKE2b-256 | f35b1811d6659d92dc1c7d3b69c5874cb2bfee811a0f510e501a15477bf87d5c |