I am going through the tuition of Grid2op. When I run the given "4_TrainingAnAgent", the following error happened, I wonder what is wrong here.
AttributeError Traceback (most recent call last)
<ipython-input-4-e7ce00cdeec4> in <module>
10 env.seed(0) # this is to ensure all sources of randomness in the environment are reproducible
11 my_agent = RandomAgent(env.action_space)
---> 12 my_agent.seed(0) # this is to ensure that all actions made by this random agent will be the same
AttributeError: 'RandomAgent' object has no attribute 'seed'
The "seed" function has been added in grid2Op version 0.9.3 (https://github.com/rte-france/Grid2Op/issues/108).
Make sure to use at least this version if you want to use this functionality (you can comment the given line on the notebook).
I remind that the version on which run agent will be assessed is the grid2op 0.9.1.post1
Do not use this functionality in any code submitted on codalab, but of course you are more than encouraged to use them when you train your agent locally :-)
BenjaminPosted by: BDonnot @ June 1, 2020, 10:26 a.m.
edit (that i can not do here...)
In this sandbox competition, the version grid2op==0.8.1 is used and not the version grid2op==0.9.1.post1 as said in the previous post.Posted by: BDonnot @ June 1, 2020, 10:29 a.m.
Thank you for the explanation. But I still stuck at this Jupiter notebook. It seems both TensorFlow and Pytorch are required for the installation of l2rpn_baselines and TensorFlow must be the 2.2 version. My problem is that only version 2.0 works for my PC. I am trying to make this straight.Posted by: zhuozy17 @ June 2, 2020, 8:41 a.m.
If you don't want to install the dependencies of a python package, you can add the "--no-deps" when calling pip:
pip install l2rpn-baselines --no-deps
This way it will only install the package itself, and None of its dependencies. Be careful though, some functionalities of the said package might not work as expected as they might require their dependencies to work properly.
BenjaminPosted by: BDonnot @ June 2, 2020, 11:34 a.m.
Thank you again for your information. Now, I installed l2rpn-baselines but as you say, I hope there is no potential problem. I installed TensorFlow 2.2 and torch 1.5. But the package requires torch in version 1.4 only. The higher version also doesn't work. I think maybe this could be improved in the future.
You are totally correct, we will update the dependencies in the next release. We already put a github issue there https://github.com/rte-france/Grid2Op/issues/97
If you spot some out of date dependencies, it would be awesome if you could put them there :-) It would save us some time to check latest version of the packages we allow using in the competition.
However, once a competition has started, to ensure maximum reproducibility and fairness between participants, we cannot change the "setting" of the competition, and this includes the requirement packages :-)Posted by: BDonnot @ June 2, 2020, 1:50 p.m.