RPC Dataloader
This library implements a variant of the PyTorch Dataloader using remote workers. It allows to distribute workers over remote servers rather than the one running the main script.
To use it, start one or several worker daemons on remote computers. The machines running the data loaders will dispatch requests for items to the workers and await the returned values.
Though similar to torch.rpc, this library uses its own implementation of RPC (Remote Procedure Call) which is simpler (no initialization) and does not conflict with the one from pytorch.
Installation
pip install rpcdataloader
Usage
To use the RPC dataloader, start a few workers either from the command line:
python -m rpcdataloader.launch --host=0.0.0.0 --port=6543
or by calling rpcdataloader.run_worker directly from a python script.
Then instantiate a remote dataset and dataloader:
dataset = rpcdataloader.RPCDataset(
workers=['node01:6543', 'node02:5432'],
dataset=torchvision.datasets.ImageFolder,
root=args.data_path + "/train",
transform=train_transform,
)
dataloader = rpcdataloader.RPCDataloader(
dataset
batch_size=2,
shuffle=True,
pin_memory=True)
for minibatch in dataloader:
...
Further reading
Metadata
Release files for rpcdataloader 0.2.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 |
|---|---|---|---|---|
| rpcdataloader-0.2.1.tar.gz | 21.7 kB | Without provenance | Details for rpcdataloader-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rpcdataloader-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for rpcdataloader-0.2.1-py3-none-any.whl |
Total release size: 39.6 kB
Release files / rpcdataloader-0.2.1.tar.gz
| Download URL | rpcdataloader-0.2.1.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ac494650615bc4339911f90231471abf233fe5de2f170c224ebc6a5e4a3ba03
|
|
BLAKE2b-256 checksum How to use checksums |
d8d086241eaecc6e447332e835376dc06c2f988d7f75e1ca41377f28937747f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / rpcdataloader-0.2.1-py3-none-any.whl
| Download URL | rpcdataloader-0.2.1-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d0e44adfa508e9499dbb0e38a5e4a6855675e22bbdd45ec449116a9ab52e663
|
|
BLAKE2b-256 checksum How to use checksums |
21ba0318a039ed6f8d6fe03ae7a8f7edeb0e4cb64d4f4014d54f18bf7e4a0aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for rpcdataloader 0.2.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.