Feat: add dataset module in tracel core#166
Open
Zatiji wants to merge 20 commits into
Open
Conversation
This reverts commit 5ec562b.
This reverts commit 5ec562b.
…ai/tracel into feat/add-dataset-modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch adds dataset streaming from Station, so you can pull a Station-hosted dataset into training as a
burn::data::dataset::Dataset<T>.Concretely:
A
DatasetProvidertrait +DatasetModule(tracel-core/src/dataset/mod.rs): the abstraction for fetching pages of raw dataset items over the network.AnnotationDataset<T>(burn.rs): wraps that in burn'sDataset<T>trait: builds a lightweight index of valid items on first use, decodes each item as JSON into T, skips malformed items cleanly.Station wiring (
station.rs): implementsDatasetProviderby calling tracel-client's dataset HTTP endpoints, plus a not-found error path that reports whether it's the dataset or the version that's missing.Plugged into Context:
context.datasets()returns aDatasetModulewhen connected via Station,Noneotherwise, same pattern as the existingmodel_registry().Exposed publicly as
tracel::dataset::{AnnotationDataset, DatasetModule}.Usage:
context.datasets().unwrap().as_burn_dataset::<MyItem>(name, version) gives you aburn::Dataset<MyItem>ready to hand to a Dataloader.Note: caching is out of scope for this PR. It'll be added in a follow-up once the core logic here is approved