Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Presets not found #474

Open
ShrutiKaha opened this issue Mar 3, 2021 · 3 comments
Open

Presets not found #474

ShrutiKaha opened this issue Mar 3, 2021 · 3 comments

Comments

@ShrutiKaha
Copy link

coach -l shows the list of available presets. But when I try to run any of the examples presets, a not found error is thrown.

For example,
(base) C:\Users\shrut>coach -p Atari_DQN -lvl breakout
←[91mThe given preset (C:\Users\shrut\AppData\Roaming\Python\Python38\site-packages\rl_coach\presets\Atari_DQN.py:graph_manager) cannot be found.←[0m

Also tried using the complete path to the preset, doesn't help.

@rajivranjansinghpolice
Copy link

I am also facing the same issue. Would be glad to get a response.

@rajivranjansinghpolice
Copy link

I found the issue. This needs a commit to the coach.py file.

if not os.path.exists(preset_path):
needs to be changed to
if not _os.path.exists(preset_path.encode('unicode_escape')):

Issue can be reproduced as below:-

preset_path = "C:\ProgramData\mambaforge\envs\rl\Lib\site-packages\rl_coach\presets\CartPole_ClippedPPO.py"
os.path.exists(preset_path)

returns False

os.path.abspath(preset_path)
returns
'C:\ProgramData\mambaforge\envs\rl\Lib\site-packages\rl_coach\presets\CartPole_ClippedPPO.py'

This is because \r is beingparsed as carriage return leading to the error.

os.path.exists(preset_path.encode('unicode_escape'))
returns True

@rajivranjansinghpolice
Copy link

further update.
the whole expand_preset function is problematic.concatenating ":graph_manager" string to preset needs to be reviewed.

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

No branches or pull requests

2 participants