You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation should be adapted, for the SAC as:
importgrid2opfromgrid2op.RewardimportL2RPNRewardfroml2rpn_baselines.utilsimportTrainingParamfroml2rpn_baselines.SACimporttrainfroml2rpn_baselines.utilsimportNNParam# define the environmentenv=grid2op.make("l2rpn_case14_sandbox",
reward_class=L2RPNReward)
# use the default training parameterstp=TrainingParam()
# this will be the list of what part of the observation I want to keep# more information on https://grid2op.readthedocs.io/en/latest/observation.html#main-observation-attributesli_attr_obs_X= ["day_of_week", "hour_of_day", "minute_of_hour", "prod_p", "prod_v", "load_p", "load_q",
"actual_dispatch", "target_dispatch", "topo_vect", "time_before_cooldown_line",
"time_before_cooldown_sub", "rho", "timestep_overflow", "line_status"]
# neural network architectureobservation_size=NNParam.get_obs_size(env, li_attr_obs_X)
sizes_q= [800, 800, 800, 494, 494, 494] # sizes of each hidden layerssizes_v= [800, 800] # sizes of each hidden layerssizes_pol= [800, 800, 800, 494, 494, 494] # sizes of each hidden layerskwargs_archi= {'observation_size': observation_size,
'sizes': sizes_q,
'activs': ["relu"for_inrange(len(sizes_q))],
"list_attr_obs": li_attr_obs_X,
"sizes_value": sizes_v,
"activs_value": ["relu"for_inrange(len(sizes_v))],
"sizes_policy": sizes_pol,
"activs_policy": ["relu"for_inrange(len(sizes_pol))]
}
# select some part of the action# more information at https://grid2op.readthedocs.io/en/latest/converter.html#grid2op.Converter.IdToAct.init_converterkwargs_converters= {"all_actions": None,
"set_line_status": False,
"change_bus_vect": True,
"set_topo_vect": False
}
# define the name of the modelnm_="AnneOnymous"save_path="/WHERE/I/SAVED/THE/MODEL"logs_dir="/WHERE/I/SAVED/THE/LOGS"try:
train(env,
name=nm_,
iterations=10000,
save_path=save_path,
load_path=None,
logs_dir=logs_dir,
nb_env=1,
training_param=tp,
kwargs_converters=kwargs_converters,
kwargs_archi=kwargs_archi)
finally:
env.close()
The text was updated successfully, but these errors were encountered:
When copy pasting the documentation of the SAC train function (https://l2rpn-baselines.readthedocs.io/en/stable/SAC.html#l2rpn_baselines.SAC.train) the program does not work.
The documentation should be adapted, for the SAC as:
The text was updated successfully, but these errors were encountered: