PyTorch Parquet Data Loader
This library holds a number of classes which help reading data from Parquet files into the PyTorch ecosystem easily! Although this library is intended to be used for natural language processing projects and with NLP libraries, it is extremely flexible. Feel free to use, modify or fork this library in any way!
Supported Libraries
| Library | Requirements | Usage Notes |
|---|---|---|
| PyTorch-Lightning | Requires PyArrow and (optionally) Petastorm | The more basic PyArrow implementation is far easier to understand, but not battle tested. |
| Transformers | Can be used with either PyTorch-Lightning implementation, but Petastorm casts data types from one format to another several times midway, which can impare performance | |
| AllenNLP | PyArrow | Not implemented yet |
Please look here for further information on using Petastorm with Hugging Face Transformers.
Difference from Petastorm
Petastorm is a great (albeit complex) library for using Parquet files in a large variety of situations. Although they have basic PyTorch support, their solution is tough to understand. This can make it difficult to debug and modify for personal use.
Alternatively, PyParquetLoaders is focused on providing Python classes which are easy to use, understand and modify.
This means anyone can get started with their PyTorch models reasonably quickly, even if they're doing something slightly different/unique.
Currently PyParquetLoaders supports PyTorch-Lightning and Hugging Face Transformers, with AllenNLP support comming soon!
Usage Guide
To use a Parquet file for training a PyTorch model simply choose and import the right data set/loader (for your library of choice). Then you can simply try and use it just as you would for any other (simple) text/image file (look at your libraries relavent docs). Some examples are included in the Tests.py script.
Developer/Contributor Guide
To help develop/extend this library please use the following workflow:
- Fork and clone the repository
- Make your modifications
- Test your modifications (run tests with
python -m pytestand install in test mode withpip install -e .) - Commit (
git commit -m "description of changes") and push (git push) your changes - Create a pull request
Feel free to add any feature you see fit, or fix/report any bug you find (with GitHub Issues). When creating a pull request please ensure you've carefully described what you're doing, why and a brief overview of your changes. The commits should be small, only changing one feature at a time.
Metadata
Release files for pyparquetloaders 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyparquetloaders-0.1.tar.gz | 3.1 kB | Without provenance | Details for pyparquetloaders-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyparquetloaders-0.1-py3-none-any.whl | Python 3 | none | any | Details for pyparquetloaders-0.1-py3-none-any.whl |
Total release size: 6.7 kB
Release files / pyparquetloaders-0.1.tar.gz
| Download URL | pyparquetloaders-0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0c4ca33815498b7718ac497fdfc1ebde02235815db3a5c6a844ed7f9c9fd2b7
|
|
BLAKE2b-256 checksum How to use checksums |
59f1b58bff39bdd49a30c44032e61aca6ff64a4bf3786d7d47521adb3e09cd24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Release files / pyparquetloaders-0.1-py3-none-any.whl
| Download URL | pyparquetloaders-0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd911e2f30652521863a5a9c3b6b116196118e94b2aeda2b17225006d1bc65d5
|
|
BLAKE2b-256 checksum How to use checksums |
2e5fe6f90e019809ce19967f3fa41e13839e096f480814a9107e00f8cb183eb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for pyparquetloaders 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.