feat(train): SnapshotDataset folds the Icechunk snapshot id into content_hash

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with pipekit_train/dataset.py, especially hash_config and CachedDataset, and read the linked Recipe registries design page for context. Use a local Icechunk repository with two commits to verify that a newly built dataset gets a different hash after the branch advances while the existing dataset remains pinned. Done also includes a doctested docstring example, a package README line, and an updated design-page status.

Written by the indexing model from the issue text.

Description

area:code priority:p2 type:feature

Problem / Request

content_hash hashes the config, so the same path after the data changed gives the same hash and caches go stale silently.

Proposed API

import pipekit_train as pkt

# proposed (J)
dataset = pkt.SnapshotDataset(repo_uri, ref="main", group="train")
dataset.snapshot_id                             # resolved at construction
dataset.content_hash                            # hash_config(config, snapshot_id)

References & Existing Code

Implementation Steps

  1. Resolve ref to a snapshot id at construction.
  2. content_hash = hash_config(config, snapshot_id).
  3. Reads go through the pinned snapshot only.

Definition of Done

  • A new commit on the branch changes the hash of a newly built dataset and not of the existing one.

Testing

Local Icechunk repo; two commits.

Documentation

  • Docstring with a doctested example; a line in the package README.
  • Update the design page's status for this workstream.

Relationships

  • Parent: #234

Pins checked: geostack 343d60e, geotoolz 640670c, pipekit 9e86a56.


Generated by Claude Code

Dominant language
Python
Stars
0
Forks
0
Avg merge
3h 50m
Merged PRs (30d)
143

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jejjohnson/pipekit

All issues in jejjohnson/pipekit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.