Skip to content

data_features_name_mapping doesn't work #138

@shuheng-liu

Description

@shuheng-liu

System Info

N/A

Information

  • One of the scripts in the src/opentau/scripts/ folder of OpenTau
  • My own task or dataset (give details below)

Reproduction

Remove the following section from standard_data_format_mapping.py

"physical-intelligence/libero": {
    "camera0": "image",
    "camera1": "wrist_image",
    "state": "state",
    "actions": "actions",
    "prompt": "task",
    "response": "response",
},

and add the following to pi05_training_config.json

"data_features_name_mapping": {
    "camera0": "image",
    "camera1": "wrist_image",
    "state": "state",
    "actions": "actions",
    "prompt": "task",
    "response": "response"
}

and train with

accelerate launch src/opentau/scripts/train.py --config_path=configs/examples/pi05_training_config.json

This results in

Traceback (most recent call last):
  File "/path/to/OpenTau/src/opentau/scripts/train.py", line 456, in <module>
    train()
  File "/path/to/OpenTau/src/opentau/configs/parser.py", line 388, in wrapper_inner
    response = fn(cfg, *args, **kwargs)
  File "/path/to/OpenTau/src/opentau/scripts/train.py", line 183, in train
    train_dataset, val_dataset = make_dataset_mixture(cfg)
  File "/path/to/OpenTau/src/opentau/datasets/factory.py", line 247, in make_dataset_mixture
    res = make_dataset(dataset_cfg, cfg, return_advantage_input=return_advantage_input)
  File "/path/to/OpenTau/src/opentau/datasets/factory.py", line 193, in make_dataset
    (dt_mean, dt_std, dt_lower, dt_upper), f2g = resolve_delta_timestamps(train_cfg, cfg, ds_meta)
  File "/path/to/OpenTau/src/opentau/datasets/factory.py", line 128, in resolve_delta_timestamps
    name_map = DATA_FEATURES_NAME_MAPPING[dataset_cfg.repo_id]
KeyError: 'physical-intelligence/libero'

Expected behavior

It should work without an error as dataset config should update the preset DATA_FEATURES_NAME_MAPPING registry.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingimportantSomething that's very important and necessary

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions