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

Cannot test codes due to outdated documentation #13

Open
ayansengupta17 opened this issue Nov 12, 2020 · 3 comments
Open

Cannot test codes due to outdated documentation #13

ayansengupta17 opened this issue Nov 12, 2020 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@ayansengupta17
Copy link

Documentation for running codes:

source activate
cd RLGC/src/py
python trainIEEE39LoadSheddingAgent_discrete_action.py

Problems and custom fixes:

  1. There is no file folder src/ as py/
  2. I found "trainIEEE39LoadSheddingAgent_discrete_action.py " under examples/IEEE39_load_shedding
  3. Running the file "trainIEEE39LoadSheddingAgent_discrete_action.py" throws import error
    ModuleNotFoundError: No module named 'PowerDynSimEnvDef_v7' because of code snippet
    from PowerDynSimEnvDef_v7 import PowerDynSimEnv
  4. I found PowerDynSimEnvDef_v7 under \src\environments
  5. Copied PowerDynSimEnvDef_v7 to examples/IEEE39_load_shedding and tried running trainIEEE39LoadSheddingAgent_discrete_action.py
  6. Got error Error: Unable to access jarfile .....IEEE39_load_shedding/lib/RLGCJavaServer1.0.0_alpha.jar
  7. Found RLGCJavaServer1.0.0_alpha.jar under \RLGC\lib\ and copied to examples/IEEE39_load_shedding/lib/
  8. Finally got an error from Py4JJava error
    y4j.protocol.Py4JJavaError: An error occurred while calling t.initStudyCase.
    : java.io.FileNotFoundException: C:\Users\0000011369979\Documents\Work\FY2020_2\kochi\RLGC\RLGC_env\RLGC\examples\IEEE39_load_shedding\testData\IEEE39\json\IEEE39_dyn_config.json (The system cannot find the path specified)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
    at java.base/java.io.FileInputStream.(FileInputStream.java:155)
    ...
  9. It was file path error again, copied IEEE39 from testData to IEEE39_load_shedding/testData/
  10. Encountered error
    Traceback (most recent call last):
    File "C:/Users/0000011369979/Documents/Work/FY2020_2/kochi/RLGC/RLGC_env/RLGC/examples/IEEE39_load_shedding/trainIEEE39LoadSheddingAgent_discrete_action.py", line 125, in
    train(total_steps, lr, env, model_path, final_saved_model,saved_model_dir)
    File "C:/Users/0000011369979/Documents/Work/FY2020_2/kochi/RLGC/RLGC_env/RLGC/examples/IEEE39_load_shedding/trainIEEE39LoadSheddingAgent_discrete_action.py", line 90, in train
    load_path=model_path
    TypeError: learn() got an unexpected keyword argument 'network'

I finally gave up. It seems there are a lot of issues regarding Paths. Moreover, I would like to know a simpler way of testing the author's code.

@RL4Grid
Copy link
Contributor

RL4Grid commented Nov 17, 2020

Thanks for opening the issue. I am sorry to learn about the bad experience you had with our codes. We restructured the codes in the hope that the new structure is clearer and easier to follow. We will test it again and update the document accordingly.

@RL4Grid
Copy link
Contributor

RL4Grid commented Dec 16, 2020

I have tested the codes with VS Code IDE on windows, they run well without the errors that you mentioned above. Could you report your testing environment like using Linux/Mac/Windows, using cmd or IDE? @ayansengupta17

@RL4Grid RL4Grid added help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested labels Dec 24, 2020
@zhangtjtongxue
Copy link

Dear professor
I encountered the same problem as above mentioned, and the project was run in pycharm on a Windows system. The problem step 6 "Got error Error: Unable to access jarfile .....IEEE39_load_shedding/lib/RLGCJavaServer1.0.0_alpha.jar", i still can't solve it. Looking forward to your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants