Add FlowM BlockWorld memory benchmark dataset support#1
Open
huskydoge wants to merge 1 commit intosimchowitzlabpublic:mainfrom
Open
Add FlowM BlockWorld memory benchmark dataset support#1huskydoge wants to merge 1 commit intosimchowitzlabpublic:mainfrom
huskydoge wants to merge 1 commit intosimchowitzlabpublic:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class BlockWorld support to the dataset layer so the training/evaluation pipeline can consume FlowM 3D memory benchmark episodes through the existing WorldModelDataset abstractions.
Changes:
- Adds a new
BlockWorldDataSourcefor RGB MP4 episodes with.ptaction sidecars and integrates it into the data source factory/export surface. - Adds a new Hydra dataset config group under
src/configs/dataset/memory/for BlockWorld train/validation paths and action sizing. - Updates repository docs and dataset references to include BlockWorld as a supported dataset family.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/wm_datasets/world_model_dataset.py |
Threads BlockWorld-specific loader kwargs through dataset creation helpers. |
src/wm_datasets/data_source/memory/blockworld_data_source.py |
Implements the new BlockWorld filesystem/video/action data source. |
src/wm_datasets/data_source/memory/__init__.py |
Exports the new memory data source package surface. |
src/wm_datasets/data_source/factory.py |
Registers blockworld in the data source factory. |
src/wm_datasets/data_source/__init__.py |
Re-exports BlockWorldDataSource from the data source package. |
src/wm_datasets/__init__.py |
Re-exports BlockWorldDataSource at the top-level dataset package. |
src/wm_datasets/README.md |
Documents BlockWorld in the dataset summary and loader kwargs list. |
src/configs/dataset/memory/blockworld.yaml |
Adds the concrete BlockWorld dataset config. |
src/configs/dataset/memory/base.yaml |
Defines the shared schema/defaults for memory dataset configs. |
docs/datasets/README.md |
Adds BlockWorld download, layout, config, and usage documentation. |
docs/config_system.md |
Notes the new memory dataset config family in the config system docs. |
docs/README.md |
Updates docs index entries to include BlockWorld. |
README.md |
Updates top-level dataset documentation references to include BlockWorld. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """Load explicit video paths from a file list.""" | ||
| file_list_path = Path(file_list).expanduser() | ||
| if not file_list_path.is_absolute(): | ||
| file_list_path = Path.cwd() / file_list_path |
Comment on lines
+110
to
+112
| stem = video_path.stem | ||
| if stem.endswith("_rgb"): | ||
| stem = stem[:-4] |
| """Load and cache one episode's action sequence.""" | ||
| if index not in self._action_cache: | ||
| _, _, action_path = self._episodes[index] | ||
| payload = torch.load(action_path, map_location=torch.device("cpu"), weights_only=False) |
| action_dim: 5 | ||
|
|
||
| spec: | ||
| action_dim: 5 |
Comment on lines
+79
to
+83
| action_path = self._action_path_from_video(video_path) | ||
| if not action_path.exists(): | ||
| raise FileNotFoundError( | ||
| f"Missing BlockWorld action file for {video_path}: expected {action_path}" | ||
| ) |
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.
Summary
This PR adds dataset support for FlowM's 3D Dynamic BlockWorld memory benchmark through nano-world-model's existing dataset/data-source interface.
Original code repo: https://github.com/hlillemark/flowm
Paper link: https://arxiv.org/abs/2601.01075
The integration is intentionally minimal:
BlockWorldDataSourceunderwm_datasets.data_source.memorydataset=memory/blockworldWorldModelDatasetvideo/action pathDepth videos are left untouched for now; this PR only wires the RGB/action path needed by NanoWM training.
Dataset Layout
Expected layout:
*_actions.ptmay contain either integer action ids or already-vectorized[T, 5]actions.Usage
Validation
I validated the integration with synthetic BlockWorld-style episodes matching the expected RGB MP4 + action sidecar layout.
Dataset and config smoke
Model loss smoke
Built NanoWM with the BlockWorld dataset config and
action_dim=5, then ran the diffusion training loss and backward pass.Full training smoke
Ran a one-step training smoke through the repo's normal
src/main.pyentrypoint with synthetic BlockWorld-style data.Command shape:
Relevant output:
Also ran:
No whitespace errors were reported.
Out-of-tree validation snippet
The following focused validation file was used to check the integration with synthetic BlockWorld-style episodes. It is not included in this PR.
Validation file used locally