Skip to main content

List dataloaders

This repository contains an hyper-simple wrapper class that allows to iterate over a list of dataloaders in a transparent way.

Installation

pip install list-dataloaders

or directly from the repository:

pip install git+https://github.com/MorenoLaQuatra/list-dataloaders.git

Usage

from list_dataloaders import ListDataLoaders

list_dataloaders = []
train_dl1 = DataLoader(...)
train_dl2 = DataLoader(...)
train_dl3 = DataLoader(...)
list_dataloaders.append(train_dl1)
list_dataloaders.append(train_dl2)
list_dataloaders.append(train_dl3)

train_dls = ListDataLoaders(list_dataloaders)

for batch in train_dls:
    print(batch)

Options and parameters

The main class ListDataLoaders has the following parameters:

  • dataloaders: the list of dataloaders to iterate over
  • verbose: if True, prints the number of samples in each dataloader (default: False)
  • weight_by_num_samples: if True, the probability of sampling a dataloader is proportional to the number of samples in the dataloader (default: True)

License

This project is licensed under the terms of the MIT license.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Metadata

Release files for list-dataloaders 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for list-dataloaders 1.0.1
File Size Uploaded Provenance
list-dataloaders-1.0.1.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for list-dataloaders 1.0.1
File Interpreter ABI Platform
list_dataloaders-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / list-dataloaders-1.0.1.tar.gz

Download URL list-dataloaders-1.0.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5d19b0dbdc31482aebef0c02cc616bd7e48af759242f3324983b6c7500692941
BLAKE2b-256 checksum
How to use checksums
c0a27c1f8bc3014d1357bcfb1e34f2e710848f2d16555b19595921933007e228
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / list_dataloaders-1.0.1-py3-none-any.whl

Download URL list_dataloaders-1.0.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
178d726f2760698d5d315e9d98109a114bd4aed0a3195d38fa68ff5955daa490
BLAKE2b-256 checksum
How to use checksums
91e76886ce7bd543de77d678900335d2ea99e10271dd3cbadb62b3dc438c02a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for list-dataloaders 1.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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page