Skip to content

Refactor dataset loader to support multi-source datasets#64

Open
hany606 wants to merge 5 commits into
gbionics:mainfrom
hany606:pr/change_dataset_structure
Open

Refactor dataset loader to support multi-source datasets#64
hany606 wants to merge 5 commits into
gbionics:mainfrom
hany606:pr/change_dataset_structure

Conversation

@hany606

@hany606 hany606 commented May 19, 2026

Copy link
Copy Markdown
Member

Summary

Refactors AMPLoader to accept motion datasets from multiple directories via a sources parameter, instead of being limited to a single dataset_path_root.

Changes

  • amp_rsl_rl/utils/motion_loader.pyAMPLoader.__init__ now takes a keyword-only sources: List[Dict] parameter. Each dict has "dataset_path" (root directory) and "motions" (name→weight mapping). Removes the old dataset_path_root/datasets parameters.
  • amp_rsl_rl/runners/amp_on_policy_runner.py — Passes sources=self.dataset_cfg["sources"] to AMPLoader. Updated docstring.
  • example/load_amp_dataset.py — Updated to use new API.
  • benchmarking/benchmark_download_and_loader.py — Updated to use new API.

Breaking Changes

AMPLoader no longer accepts dataset_path_root or datasets as arguments. Callers must pass:

AMPLoader(
    device=...,
    simulation_dt=...,
    slow_down_factor=...,
    sources=[{"dataset_path": "/path/to/dir", "motions": {"Walk": 1.0, "Run": 0.5}}],
)

Motivation

The old API forced all motions to live under a single directory. This makes it impossible to compose motion priors from different retargeting pipelines or dataset collections without copying files around. The new sources list allows mixing motions from arbitrary paths.

@hany606 hany606 self-assigned this May 19, 2026
@hany606 hany606 requested a review from GiulioRomualdi as a code owner May 19, 2026 11:54
@isorrentino

Copy link
Copy Markdown

Hi @hany606 can you solve the conflicts and rebase on main?

@hany606

hany606 commented May 22, 2026

Copy link
Copy Markdown
Member Author

@isorrentino Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants