You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for developing this great repo. I'm interested in using the MPC modules of pypose. When I tried to run both examples in examples/mpc/ folder, I got some errors.
This is what I got when running examples/module/mpc/cartpole.py:
(leggedrobot) ➜ pypose git:(main) ✗ python3 examples/module/mpc/cartpole.py
Namespace(device='cpu', save='./examples/module/mpc/save/', show=False)
Traceback (most recent call last):
File "/Users/fenglongsong/Documents/GitHub/pypose/examples/module/mpc/cartpole.py", line 104, in <module>
traj_loss.backward()
File "/Users/fenglongsong/miniconda3/envs/leggedrobot/lib/python3.10/site-packages/torch/_tensor.py", line 522, in backward
torch.autograd.backward(
File "/Users/fenglongsong/miniconda3/envs/leggedrobot/lib/python3.10/site-packages/torch/autograd/__init__.py", line 266, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: Output 3 of UnbindBackward0 is a view and its base or another view of its base has been modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.
This is what I got when running examples/module/mpc/linear.py:
(leggedrobot) ➜ pypose git:(main) ✗ python3 examples/module/mpc/linear.py
Namespace(device='cpu', save='./examples/module/mpc/save/', show=False)
Traceback (most recent call last):
File "/Users/fenglongsong/Documents/GitHub/pypose/examples/module/mpc/linear.py", line 81, in <module>
traj_loss.backward()
File "/Users/fenglongsong/miniconda3/envs/leggedrobot/lib/python3.10/site-packages/torch/_tensor.py", line 522, in backward
torch.autograd.backward(
File "/Users/fenglongsong/miniconda3/envs/leggedrobot/lib/python3.10/site-packages/torch/autograd/__init__.py", line 266, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [5, 3]], which is output 0 of AsStridedBackward0, is at version 4; expected version 3 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
I'm not sure if this is a common issue. Can anyone provide any idea to fix it? Thanks a lot.
Best,
Fenglong
Versions
I'm running the example on MacOS with M2-chip, under conda environment.
(leggedrobot) ➜ pypose git:(main) ✗ python collect_env.py
Collecting environment information...
PyTorch version: 2.2.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.5 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.29.2
Libc version: N/A
Python version: 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:41:52) [Clang 15.0.7 ] (64-bit runtime)
Python platform: macOS-14.5-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.2.2
[pip3] torchkin==0.1.1
[pip3] torchlie==0.1.0
[pip3] torchvision==0.17.2
[conda] numpy 1.26.4 py310h3b2db8e_0
[conda] numpy-base 1.26.4 py310ha9811e2_0
[conda] torch 2.2.2 pypi_0 pypi
[conda] torchkin 0.1.1 pypi_0 pypi
[conda] torchlie 0.1.0 pypi_0 pypi
[conda] torchvision 0.17.2 pypi_0 pypi
The text was updated successfully, but these errors were encountered:
🐛 Describe the bug
Hi,
Thanks for developing this great repo. I'm interested in using the MPC modules of pypose. When I tried to run both examples in
examples/mpc/
folder, I got some errors.examples/module/mpc/cartpole.py
:examples/module/mpc/linear.py
:I'm not sure if this is a common issue. Can anyone provide any idea to fix it? Thanks a lot.
Best,
Fenglong
Versions
I'm running the example on MacOS with M2-chip, under conda environment.
The text was updated successfully, but these errors were encountered: