shariqiqbal2810 / maddpg-pytorch

PyTorch Implementation of MADDPG (Lowe et. al. 2017)
MIT License
552 stars 128 forks source link

How to set env_id, model_name in train.py #39

Open EvaluationResearch opened 3 years ago

EvaluationResearch commented 3 years ago

hi, I‘m running into the following error: parser.add_argument("env_id", type=str, default="simple_tag", help="name of the scenario script") parser.add_argument("model_name", default="./model/", help="Name of directory to store " + "model/training contents") main.py: error: the following arguments are required: env_id, model_name

and when simple run: python main.py --env_id simple_tag --model_name ./model/ the error will be pops up:main.py: error: unrecognized arguments: --env_id --model_name

I am not clear how to set these arguments, would you help leave me an example to add_argument run main.py?

Thanks.

EvaluationResearch commented 3 years ago

maybe I can take the following command as an example you have provided in other query: python main.py simple_speaker_listener examplemodel --n_episodes 4000 --discrete_action

but the error still happened when :python main.py simple_tag model on win10 , the error: File "main.py", line 155, in run(config) File "main.py", line 44, in run os.makedirs(log_dir) File "C:\Users\hp\AppData\Local\Programs\Python\Python35\lib\os.py", line 226, in makedirs head, tail = path.split(name) File "C:\Users\hp\AppData\Local\Programs\Python\Python35\lib\ntpath.py", line 204, in split d, p = splitdrive(p) File "C:\Users\hp\AppData\Local\Programs\Python\Python35\lib\ntpath.py", line 139, in splitdrive if len(p) >= 2: TypeError: object of type 'WindowsPath' has no len()

when python main.py simple_tag model on ubuntu 16, the error: Traceback (most recent call last): File "main.py", line 155, in run(config) File "main.py", line 44, in run os.makedirs(log_dir) File "/usr/local/lib/python3.5/os.py", line 226, in makedirs head, tail = path.split(name) File "/usr/local/lib/python3.5/posixpath.py", line 103, in split i = p.rfind(sep) + 1 AttributeError: 'PosixPath' object has no attribute 'rfind'

all the errors seem related to the "path“.

Would you help take a look?

datutu-L commented 1 month ago

hi, I‘m running into the following error: parser.add_argument("env_id", type=str, default="simple_tag", help="name of the scenario script") parser.add_argument("model_name", default="./model/", help="Name of directory to store " + "model/training contents") main.py: error: the following arguments are required: env_id, model_name

and when simple run: python main.py --env_id simple_tag --model_name ./model/ the error will be pops up:main.py: error: unrecognized arguments: --env_id --model_name

I am not clear how to set these arguments, would you help leave me an example to add_argument run main.py?

Thanks.

May I ask if you remember how it was resolved, I had the same problem. Looking forward to your reply, thanks!