-
Notifications
You must be signed in to change notification settings - Fork 83
Description
I am running the pi0.5 policy wit this command:
python src/lerobot/scripts/lerobot_train.py --dataset.repo_id=bangboomtata/robotics-demo --policy.type=pi05 --output_dir=./outputs/pi05_training --job_name=pi05_training --policy.pretrained_path=lerobot/pi05_base --policy.compile_model=true --policy.gradient_checkpointing=true --policy.dtype=bfloat16 --policy.device=cuda --policy.push_to_hub=false
I have tried transformers version 4.41.0, 4.41.2, 4.45.2, 4.53.2, 4.57.1 but all resulted in ValueError: An incorrect transformer version is used. The full error log is as below:
INFO 2025-12-19 10:09:09 ot_train.py:163 {'batch_size': 8,
'checkpoint_path': None,
'dataset': {'episodes': None,
'image_transforms': {'enable': False,
'max_num_transforms': 3,
'random_order': False,
'tfs': {'affine': {'kwargs': {'degrees': [-5.0,
5.0],
'translate': [0.05,
0.05]},
'type': 'RandomAffine',
'weight': 1.0},
'brightness': {'kwargs': {'brightness': [0.8,
1.2]},
'type': 'ColorJitter',
'weight': 1.0},
'contrast': {'kwargs': {'contrast': [0.8,
1.2]},
'type': 'ColorJitter',
'weight': 1.0},
'hue': {'kwargs': {'hue': [-0.05,
0.05]},
'type': 'ColorJitter',
'weight': 1.0},
'saturation': {'kwargs': {'saturation': [0.5,
1.5]},
'type': 'ColorJitter',
'weight': 1.0},
'sharpness': {'kwargs': {'sharpness': [0.5,
1.5]},
'type': 'SharpnessJitter',
'weight': 1.0}}},
'repo_id': 'bangboomtata/robotics-demo',
'revision': None,
'root': None,
'streaming': False,
'use_imagenet_stats': True,
'video_backend': 'torchcodec'},
'env': None,
'eval': {'batch_size': 50, 'n_episodes': 50, 'use_async_envs': False},
'eval_freq': 20000,
'job_name': 'pi05_training',
'log_freq': 200,
'num_workers': 4,
'optimizer': {'betas': [0.9, 0.95],
'eps': 1e-08,
'grad_clip_norm': 1.0,
'lr': 2.5e-05,
'type': 'adamw',
'weight_decay': 0.01},
'output_dir': 'outputs/pi05_training',
'policy': {'action_expert_variant': 'gemma_300m',
'chunk_size': 50,
'compile_mode': 'max-autotune',
'compile_model': True,
'device': 'cuda',
'dtype': 'bfloat16',
'empty_cameras': 0,
'gradient_checkpointing': True,
'image_resolution': [224, 224],
'input_features': {},
'license': None,
'max_action_dim': 32,
'max_period': 4.0,
'max_state_dim': 32,
'min_period': 0.004,
'n_action_steps': 50,
'n_obs_steps': 1,
'normalization_mapping': {'ACTION': <NormalizationMode.QUANTILES: 'QUANTILES'>,
'STATE': <NormalizationMode.QUANTILES: 'QUANTILES'>,
'VISUAL': <NormalizationMode.IDENTITY: 'IDENTITY'>},
'num_inference_steps': 10,
'optimizer_betas': [0.9, 0.95],
'optimizer_eps': 1e-08,
'optimizer_grad_clip_norm': 1.0,
'optimizer_lr': 2.5e-05,
'optimizer_weight_decay': 0.01,
'output_features': {},
'paligemma_variant': 'gemma_2b',
'pretrained_path': 'lerobot/pi05_base',
'private': None,
'push_to_hub': False,
'repo_id': None,
'scheduler_decay_lr': 2.5e-06,
'scheduler_decay_steps': 30000,
'scheduler_warmup_steps': 1000,
'tags': None,
'time_sampling_beta_alpha': 1.5,
'time_sampling_beta_beta': 1.0,
'time_sampling_offset': 0.001,
'time_sampling_scale': 0.999,
'tokenizer_max_length': 200,
'type': 'pi05',
'use_amp': False},
'rename_map': {},
'resume': False,
'save_checkpoint': True,
'save_freq': 20000,
'scheduler': {'decay_lr': 2.5e-06,
'num_decay_steps': 30000,
'num_warmup_steps': 1000,
'peak_lr': 2.5e-05,
'type': 'cosine_decay_with_warmup'},
'seed': 1000,
'steps': 100000,
'use_policy_training_preset': True,
'wandb': {'disable_artifact': False,
'enable': False,
'entity': None,
'mode': None,
'notes': None,
'project': 'lerobot',
'run_id': None}}
INFO 2025-12-19 10:09:09 ot_train.py:171 Logs will be saved locally.
INFO 2025-12-19 10:09:09 ot_train.py:183 Creating dataset
INFO 2025-12-19 10:09:10 ot_train.py:202 Creating policy
The PI05 model is a direct port of the OpenPI implementation.
This implementation follows the original OpenPI structure for compatibility.
Original implementation: https://github.com/Physical-Intelligence/openpi
torch_dtype is deprecated! Use dtype instead!
Traceback (most recent call last):
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/scripts/lerobot_train.py", line 448, in
main()
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/scripts/lerobot_train.py", line 444, in main
train()
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/configs/parser.py", line 233, in wrapper_inner
response = fn(cfg, *args, **kwargs)
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/scripts/lerobot_train.py", line 203, in train
policy = make_policy(
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/policies/factory.py", line 413, in make_policy
policy = policy_cls.from_pretrained(**kwargs)
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/policies/pi05/modeling_pi05.py", line 893, in from_pretrained
model = cls(config, **kwargs)
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/policies/pi05/modeling_pi05.py", line 842, in init
self.model = PI05Pytorch(config)
File "/home/user/brian_ws/unitree_IL_lerobot/unitree_lerobot/lerobot/src/lerobot/policies/pi05/modeling_pi05.py", line 541, in init
raise ValueError(msg) from None
ValueError: An incorrect transformer version is used, please create an issue on https://github.com/huggingface/lerobot/issues
/home/user/miniforge3/envs/unitree_lerobot/lib/python3.10/site-packages/torch/cuda/init.py:287: UserWarning:
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(