diffusion_policy icon indicating copy to clipboard operation
diffusion_policy copied to clipboard

full_key: task.dataset

Open coderpracticer opened this issue 1 year ago • 13 comments

Has anyone meets the same error?

Error executing job with overrides: [] Error locating target 'diffusion_policy.dataset.pusht_image_dataset.PushTImageDataset', set env var HYDRA_FULL_ERROR=1 to see chained exception. full_key: task.dataset

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

coderpracticer avatar Jul 25 '24 10:07 coderpracticer

Have you solved?

LemonQC avatar Sep 26 '24 03:09 LemonQC

Just installing all required packages as in yaml file. The locating error means hydra cannot import the target correctly. You can check by "from diffusion_policy.dataset.pusht_image_dataset import PushTImageDataset". It will probably show some module missing errors.

geyan21 avatar Oct 10 '24 07:10 geyan21

hello @coderpracticer ,have you tackle this question? can you share with me? it's great important for me. if so ,thank you very muck

ShouZhengAI avatar Nov 02 '24 13:11 ShouZhengAI

@LemonQC Have you solved?i need your help

ShouZhengAI avatar Nov 02 '24 13:11 ShouZhengAI

Just installing all required packages as in yaml file. The locating error means hydra cannot import the target correctly. You can check by "from diffusion_policy.dataset.pusht_image_dataset import PushTImageDataset". It will probably show some module missing errors.

it's not used for me, could you see my errors?

(robodiff) asrock@asrock:~/quanbao/ShouZheng/DP$ python train.py --config-dir=. --config-name=image_pusht_diffusion_policy_cnn.yaml training.seed=42 training.device=cuda:0 hydra.run.dir='data/outputs/${now:%Y.%m.%d}/${now:%H.%M.%S}_${name}_${task_name}'
/home/asrock/.local/lib/python3.9/site-packages/torchvision/datapoints/__init__.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
  warnings.warn(_BETA_TRANSFORMS_WARNING)
/home/asrock/.local/lib/python3.9/site-packages/torchvision/transforms/v2/__init__.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
  warnings.warn(_BETA_TRANSFORMS_WARNING)

============= Initialized Observation Utils with Obs Spec =============

using obs modality: low_dim with keys: ['agent_pos']
using obs modality: rgb with keys: ['image']
using obs modality: depth with keys: []
using obs modality: scan with keys: []
/home/asrock/.local/lib/python3.9/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/asrock/.local/lib/python3.9/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
[2024-11-02 21:29:23,839][diffusion_policy.model.diffusion.conditional_unet1d][INFO] - number of parameters: 2.515119e+08
Diffusion params: 2.515119e+08
Vision params: 1.119709e+07
Error executing job with overrides: ['training.seed=42', 'training.device=cuda:0']
Error locating target 'diffusion_policy.env_runner.pusht_image_runner.PushTImageRunner', set env var HYDRA_FULL_ERROR=1 to see chained exception.
full_key: task.env_runner

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

all the instructions are copied 😂,and input step by step followed with official

ShouZhengAI avatar Nov 02 '24 13:11 ShouZhengAI

I have the same issue with you. Do you have solved it? @ShouZhengAI

Cocatric avatar Jan 08 '25 09:01 Cocatric

Just installing all required packages as in yaml file. The locating error means hydra cannot import the target correctly. You can check by "from diffusion_policy.dataset.pusht_image_dataset import PushTImageDataset". It will probably show some module missing errors.

it's not used for me, could you see my errors?

(robodiff) asrock@asrock:~/quanbao/ShouZheng/DP$ python train.py --config-dir=. --config-name=image_pusht_diffusion_policy_cnn.yaml training.seed=42 training.device=cuda:0 hydra.run.dir='data/outputs/${now:%Y.%m.%d}/${now:%H.%M.%S}_${name}_${task_name}'
/home/asrock/.local/lib/python3.9/site-packages/torchvision/datapoints/__init__.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
  warnings.warn(_BETA_TRANSFORMS_WARNING)
/home/asrock/.local/lib/python3.9/site-packages/torchvision/transforms/v2/__init__.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753, and you can also check out https://github.com/pytorch/vision/issues/7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
  warnings.warn(_BETA_TRANSFORMS_WARNING)

============= Initialized Observation Utils with Obs Spec =============

using obs modality: low_dim with keys: ['agent_pos']
using obs modality: rgb with keys: ['image']
using obs modality: depth with keys: []
using obs modality: scan with keys: []
/home/asrock/.local/lib/python3.9/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/home/asrock/.local/lib/python3.9/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
[2024-11-02 21:29:23,839][diffusion_policy.model.diffusion.conditional_unet1d][INFO] - number of parameters: 2.515119e+08
Diffusion params: 2.515119e+08
Vision params: 1.119709e+07
Error executing job with overrides: ['training.seed=42', 'training.device=cuda:0']
Error locating target 'diffusion_policy.env_runner.pusht_image_runner.PushTImageRunner', set env var HYDRA_FULL_ERROR=1 to see chained exception.
full_key: task.env_runner

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

all the instructions are copied 😂,and input step by step followed with official

I have the same issue with you. Do you have solved it?

Cocatric avatar Jan 08 '25 09:01 Cocatric

You may create init.py under diffusion_policy/env_runner

from diffusion_policy.env_runner.pusht_image_runner import PushTImageRunner
__all__ = ['PushTImageRunner']

@Cocatric

quas-modo avatar Jan 27 '25 15:01 quas-modo

  1. When running python train.py --....., it shows "Error locating target 'diffusion_policy.datsset..... PushTImageDataset'. Set the environment variable HYDRA_FULL_ERROR=1 to see the chained exception", etc.

I was required to set HYDRA.. =1. I've set it by running export HYDRA_....=1 in the terminal and also set it in PyCharm, but neither of them worked. I've tried both relative and absolute paths, but they didn't work either.

Solution: The "Error locating target ''" error is caused by errors or syntax issues in the code of the corresponding diffusion_policy.datsset..... PushTImageDataset. So it can't be called through the YAML file. In the file of the corresponding class, use an instance to test whether there are problems with the code in this file.

It was found that it was a problem with importing the numba package. numba 0.56.4 is not compatible with the numpy package (the environment configuration document specified 1.23.3). After changing numpy to 1.23.4, the errors in the code were successfully resolved.

  1. Issues with the gym environment

The version requirement is gym==0.21.0, but various errors occurred. When I tried to install it myself, I couldn't find version 0.21.0, only 0.22.0, so I installed that, but it also caused various errors.

Solution: Installing version 0.21.0 is too old. I needed to set pip==21 and wheel==0.38.0 to install gym 0.21.0. I can downgrade setuptools to version 65.5.0 and wheel to version 0.38.0, and then install it.

  1. Modifying the number of num_worker

zycrobot avatar Mar 10 '25 08:03 zycrobot

may be due to missing dataset or incorrect path

humphreyde avatar Apr 23 '25 06:04 humphreyde

This is probably because one of the modules in your wandb library (wandb/proto/wandb_base_pb2.py) is failing when trying to create a FieldDescriptor. You can downgrade the protobuf package to 3.20.x by using the command pip install protobuf==3.20.0

Junb0Dong avatar May 07 '25 02:05 Junb0Dong

I solved the problem by aligning the versions of numpy and numba. The version I am using now: numpy: 1.22.4 numba: 0.53.1. Hopefully it helps!

Mirage415 avatar Oct 18 '25 04:10 Mirage415

just update the task.zarr_path to "diffusion_policy/data/pusht/pusht_cchi_v7_replay.zarr" in image_pusht_diffusion_policy_cnn.yaml

zhjin-real avatar Nov 06 '25 12:11 zhjin-real