feat(train): the parquet format for CachedDataset
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start with CachedDataset in packages/pipekit-train/src/pipekit_train/dataset.py and the existing zarr path at commit 3b9582d; trace its writer, reader, cache invalidation, and serialization behavior. Then inspect the train-extras dependency configuration and tests for CachedDataset. Done means parquet round trips preserve array dtype and shape, content hash changes and invalidation rebuild the cache, and a pickled dataset reads in a new process.
Written by the indexing model from the issue text.
Description
Problem / Request
Support CachedDataset(format="parquet"), for caching tabular (input, target) pairs.
User Story
As a user with small tabular samples, I want a cache I can read with ordinary dataframe tools, so that I can inspect it without zarr.
Motivation
format already lists "parquet" and "tfrecord", but the constructor raises NotImplementedError for anything except "zarr" at 3b9582d.
Either format should work or leave the signature.
tfrecord stays deferred: nothing asks for it, and its likely users were the Lightning and Keras backends.
Proposed API
# proposed (this issue); samples are flat numeric arrays
cached = CachedDataset(source=simulation, cache_dir="cache/", format="parquet")
x, y = cached[3]
- Each row holds one sample, with each array stored as a list column plus its shape.
pyarrowjoins a new[parquet]extra and is imported lazily, as zarr is.content_hash,invalidate,in_memoryand pickling behave as they do for zarr.- Remote URIs follow the same fsspec path as zarr.
References & Existing Code
CachedDatasetinpackages/pipekit-train/src/pipekit_train/dataset.py@3b9582d.- geostack
docs/reports/11_pipekit_train.md, workstream A4.
Implementation Steps
- Add a parquet writer and reader behind the existing
formatargument. - Add the
[parquet]extra, and add it to thetrain-extrasgroup. - Narrow
format's type if tfrecord stays out.
Definition of Done
- Code lands at the intended path.
- Tests pass:
make test. - Lint + typecheck pass:
make lint && make typecheck. - Docstrings (Google-style) on all public symbols.
Testing
- A round trip through parquet equals the source to 0, in dtype and shape, for several array shapes.
- A changed content hash misses the cache, and
invalidateforces a rebuild. - A dataset pickled after reading still reads in a new process.
Documentation
-
CachedDataset's docstring.
Relationships
- Parent (theme epic): #145
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 3h 50m
- Merged PRs (30d)
- 143
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jejjohnson/pipekit
-
area:code layer:0-primitives priority:p2 type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jejjohnson/pipekit#296 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 57/100
jejjohnson/pipekit#411 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jejjohnson/pipekit#410 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 5/5 Over a week Newbie friendliness 38/100
jejjohnson/pipekit#409 ·
Maintainers usually reply within 1 day
-
area:code type:feature
Difficulty 3/5 1-2 days Newbie friendliness 75/100
jejjohnson/pipekit#408 ·
Maintainers usually reply within 1 day
All issues in jejjohnson/pipekit
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day