full_key: task.dataset
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.
Have you solved?
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.
hello @coderpracticer ,have you tackle this question? can you share with me? it's great important for me. if so ,thank you very muck
@LemonQC Have you solved?i need your help
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? @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
I have the same issue with you. Do you have solved it?
You may create init.py under diffusion_policy/env_runner
from diffusion_policy.env_runner.pusht_image_runner import PushTImageRunner
__all__ = ['PushTImageRunner']
@Cocatric
- 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.
- Issues with the
gymenvironment
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.
- Modifying the number of
num_worker
may be due to missing dataset or incorrect path
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
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!
just update the task.zarr_path to "diffusion_policy/data/pusht/pusht_cchi_v7_replay.zarr" in image_pusht_diffusion_policy_cnn.yaml