openpi icon indicating copy to clipboard operation
openpi copied to clipboard

Cannot run the dataset conversion script

Open XiaoweiLinXL opened this issue 1 year ago • 2 comments

When I tried to follow the steps of fine-tuning on the Libero dataset:

  • I first got an error of module tensorflow_datasets not found. I used uv pip install to install this package.
  • Then I got module tensorflow not found. I used uv pip install to install it.
  • Then I got ImportError: Error importing tensorflow: AttributeError("module 'ml_dtypes' has no attribute 'int2'"). I cannot find a way to solve this issue. I tried to downgrade/upgrade ml-dtypes using uv pip install but I couldn't.

Has anyone had this issue before? Any advice is really appreciated! Thank you!

XiaoweiLinXL avatar Nov 19 '25 20:11 XiaoweiLinXL

The cause of this error is an incompatibility between the versions of ml_dtypes and tensorflow. The tensorflow version shown by uv pip list | grep tensorflow in your environment is different from the tensorflow version in uv.lock.

https://github.com/Physical-Intelligence/openpi/blob/175f89c31d1b2631a8ff3b678768f17489c5ead4/uv.lock#L4640

You should install tensorflow, tensorflow-datasets, and other related dependencies using: GIT_LFS_SKIP_SMUDGE=1 uv sync --group rlds

instead of uv pip install xxx.

winka9587 avatar Nov 20 '25 12:11 winka9587

The cause of this error is an incompatibility between the versions of ml_dtypes and tensorflow. The tensorflow version shown by uv pip list | grep tensorflow in your environment is different from the tensorflow version in uv.lock.

openpi/uv.lock

Line 4640 in 175f89c

version = "2.15.0" You should install tensorflow, tensorflow-datasets, and other related dependencies using: GIT_LFS_SKIP_SMUDGE=1 uv sync --group rlds

instead of uv pip install xxx.

Thank you, it works!

XiaoweiLinXL avatar Nov 20 '25 22:11 XiaoweiLinXL