Installation
pip install metaflow-card-hf-dataset
Usage
After installing the module, you can add any HuggingFace dataset to your Metaflow tasks by using the @huggingface_dataset decorator. There are two ways to use the decorator:
- Via the
idargument, which is the dataset ID from HuggingFace. - Via the
artifact_idargument, which is the name of a FlowSpec artifact that contains the dataset ID.
Use the first if your workflow always reads from the same HuggingFace dataset ID. Use the second if your workflow pass in dataset IDs as parameters or changes them dynamically.
from metaflow import FlowSpec, step, huggingface_dataset, Parameter
class Flow(FlowSpec):
eval_ds = Parameter('eval_ds', default='argilla/databricks-dolly-15k-curated-en', help='HuggingFace dataset id.')
# Dynamically input: python flow.py run --eval_ds lighteval/mmlu
@huggingface_dataset(id="princeton-nlp/SWE-bench")
@step
def start(self):
self.another_one = 'wikimedia/wikipedia'
self.next(self.end)
@huggingface_dataset(artifact_id="another_one") # Use the dataset ID set to an artifact var.
@huggingface_dataset(artifact_id="eval_ds") # Use the dataset ID passed as a parameter.
@step
def end(self):
pass
if __name__ == '__main__':
Flow()
Metadata
Release files for metaflow-card-hf-dataset 0.0.6
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 |
|---|---|---|---|---|
| metaflow_card_hf_dataset-0.0.6.tar.gz | 8.0 kB | Without provenance | Details for metaflow_card_hf_dataset-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metaflow_card_hf_dataset-0.0.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for metaflow_card_hf_dataset-0.0.6-py2.py3-none-any.whl |
Total release size: 17.5 kB
Release files / metaflow_card_hf_dataset-0.0.6.tar.gz
| Download URL | metaflow_card_hf_dataset-0.0.6.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf09383f06c1bceaf0d3b94cac873ccefbf606a317818ee5125f23abbc93291f
|
|
BLAKE2b-256 checksum How to use checksums |
ce566c109556243aa9beddf5231a615a56425e28eee7b100e8b074b9acc2e8c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.5
|
Release files / metaflow_card_hf_dataset-0.0.6-py2.py3-none-any.whl
| Download URL | metaflow_card_hf_dataset-0.0.6-py2.py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5ae424432b2d7c30d097d2c18e1694923cd0acd602fb0e1fce70968c69ca3100
|
|
BLAKE2b-256 checksum How to use checksums |
527b623716a18a56d59faae7b43c58e43d3f868add4c7cb775a29ca6da78b849
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.5
|
Security for metaflow-card-hf-dataset 0.0.6
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.