Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EvaluationResearch opened this issue Jun 29, 2021 · 4 comments
Open

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

EvaluationResearch opened this issue Jun 29, 2021 · 4 comments

Comments

@EvaluationResearch
Copy link

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
Copy link
Author

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
Copy link

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!

@AZ1229-forever
Copy link

Have you solved this problem, I have also encountered this problem, how to solve it, can you share the solution, looking forward to your answer

@datutu-L
Copy link

Have you solved this problem, I have also encountered this problem, how to solve it, can you share the solution, looking forward to your answer

Try removing the -- in front of the command line arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants