DeepMimic icon indicating copy to clipboard operation
DeepMimic copied to clipboard

mpi_run.py does not work but DeepMimic.py does

Open yjc765 opened this issue 5 years ago • 4 comments

Hello everyone, when I ran python mpi_run.py --arg_file args/train_humanoid3d_spinkick_args.txt --num_workers 4 to train the agent as the introduction says, there was error like

Running with 4 workers
cmd: mpiexec -n 4 python DeepMimic_Optimizer.py --arg_file args/train_humanoid3d_spinkick_args.txt --num_workers 4
  File "DeepMimic_Optimizer.py", line 25
    Logger.print('Shutting down...')
               ^
SyntaxError: invalid syntax
-------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
  File "DeepMimic_Optimizer.py", line 25
    Logger.print('Shutting down...')
               ^
SyntaxError: invalid syntax
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[1583,1],1]
  Exit code:    1
--------------------------------------------------------------------------

But if I ran python3 DeepMimic.py --arg_file args/train_humanoid3d_spinkick_args.txt --num_workers 4 instead, it worked nicely and started training, but only the statistics of first iteration has been logged to 'agent_log.txt'.

image

Can anyone help me with these problems or has anyone faced the same problem?

yjc765 avatar Nov 13 '19 12:11 yjc765

hello everyone,

i am getting this error anytime i run deepmimic.py. Can anyone please proffer a solution.

Traceback (most recent call last): File "DeepMimic.py", line 9, in from env.deepmimic_env import DeepMimicEnv File "/home/ola/DeepMimic/env/deepmimic_env.py", line 2, in from env.env import Env File "/home/ola/DeepMimic/env/env.py", line 4, in from learning.normalizer import Normalizer File "/home/ola/DeepMimic/learning/normalizer.py", line 3, in import util.mpi_util as MPIUtil File "/home/ola/DeepMimic/util/mpi_util.py", line 2, in from mpi4py import MPI ImportError: No module named 'mpi4py'

OlalekanIsola avatar Feb 26 '20 21:02 OlalekanIsola

Looks like maybe mpi4py hasn't been installed?

xbpeng avatar Mar 03 '20 05:03 xbpeng

Hello I have fixed this issue

in the file mpi_run.py, there is a part where it runs the DeepMimic_optimizer.py file with python. You have to change the default python to "python3" in that part.

It looks like: cmd = 'mpiexec -n {:d} python3 DeepMimic_Optimizer.py '.format(num_workers)

lordNil avatar May 28 '20 17:05 lordNil

ah ok, thanks for pointing that out.

xbpeng avatar May 28 '20 18:05 xbpeng