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

renaming and making sure baseline is name consistent #2

Merged
merged 1 commit into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
.idea/
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

import grid2op
import l2rpn_baselines.pandapowerOPF.pp_functions as ppf
import l2rpn_baselines.PandapowerOPFAgent.pp_functions as ppf
import pandapower as pp
from grid2op.Agent import Agent

Expand All @@ -19,7 +19,7 @@ def make_logger():
return _logger


class PandapowerAgent(Agent):
class PandapowerOPFAgent(Agent):
"""
The purpose of this agent is to supply a usable base for power system calculations based on the grid2op backend.
Incoming observations are automatically parsed into a pandapower grid. The grid can then be used for any
Expand Down
6 changes: 3 additions & 3 deletions l2rpn_baselines/pandapowerOPF/__init__.py → __init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
__all__ = [
"PandapowerAgent",
"PandapowerOPFAgent",
"evaluate",
]

from l2rpn_baselines.pandapowerOPF.pandapowerOPFAgent import PandapowerAgent
from l2rpn_baselines.pandapowerOPF.evaluate import evaluate
from l2rpn_baselines.PandapowerOPFAgent.PandapowerOPFAgent import PandapowerOPFAgent
from l2rpn_baselines.PandapowerOPFAgent.evaluate import evaluate
"""
In the __init__ file, it is expected to export 3 classes with names that depends on the name you gave to your baseline.
For example, say you chose to write a baseline with the awesome name "XXX" (what an imagination!) you should export
Expand Down
4 changes: 2 additions & 2 deletions l2rpn_baselines/pandapowerOPF/evaluate.py → evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from grid2op.Runner import Runner

from l2rpn_baselines.pandapowerOPF.pandapowerOPFAgent import PandapowerAgent
from l2rpn_baselines.PandapowerOPFAgent.PandapowerOPFAgent import PandapowerOPFAgent
from l2rpn_baselines.utils.save_log_gif import save_log_gif


Expand Down Expand Up @@ -59,7 +59,7 @@ def evaluate(env,
runner_params["verbose"] = verbose

# Instantiate agent
agent = PandapowerAgent(env.action_space,
agent = PandapowerOPFAgent(env.action_space,
env.init_grid_path, # load initial pandapower grid
acceptable_loading_pct=98.0, # which transformer and line loading is acceptable
min_loss_reduction_mwt=10., # how big should a loss reduction be to justify an action
Expand Down
File renamed without changes.