Baselines of grid dispatching competition#709
Conversation
| @@ -0,0 +1,7 @@ | |||
| ## Baselines for grid dispatching competition | |||
There was a problem hiding this comment.
We can write in Chinese. The participants only come from China.
There was a problem hiding this comment.
Some of the participants are from Portugal.
| return env | ||
|
|
||
|
|
||
| if __name__ == '__main__': |
There was a problem hiding this comment.
We can remove the test code.
| low_bound = gen_p_action_space.low | ||
| high_bound = gen_p_action_space.high | ||
|
|
||
| mapped_action = low_bound + (action - (-1.0)) * ( |
There was a problem hiding this comment.
Why don't we use the action_mapping wrapper here?
There was a problem hiding this comment.
The current wrapper cannot support it. (We fix it in #673)
|
|
||
|
|
||
| class MaxTimestepWrapper(gym.Wrapper): | ||
| def __init__(self, env): |
There was a problem hiding this comment.
can we pass the max_timestep her instead of declaring it globally?
| critic_lr=CRITIC_LR) | ||
| self.agent = GridAgent(algorithm) | ||
|
|
||
| self.agent.restore("./paddle_pretrain_model") |
There was a problem hiding this comment.
What if the model does not exist?
There was a problem hiding this comment.
It will raise an exception.
|
|
||
| 2. Update the data path for distributed training (Using an absoluate path). | ||
| ```bash | ||
| export PWD=`pwd` |
There was a problem hiding this comment.
this line does not support the Windows system.
There was a problem hiding this comment.
Added Linux dependency.
|
|
||
| xparl start --port 8010 --cpu_num 6 | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Note that you only need to start the cluster once.
| xparl start --port 8010 --cpu_num 6 | ||
| ``` | ||
|
|
||
| 5. Run training script |
There was a problem hiding this comment.
start training.
| python train.py --actor_num 6 | ||
| ``` | ||
|
|
||
| 6. Visualize |
There was a problem hiding this comment.
visualize the training curve and other information.
| @@ -0,0 +1,60 @@ | |||
| ## SAC baseline for grid dispatching competition | |||
|
|
|||
| In this example, we provide a distributed SAC baseline based on PARL and paddlepaddle to solve the [grid dispatching competition](https://aistudio.baidu.com/aistudio/competition/detail/111) task. | |||
There was a problem hiding this comment.
to solve the task -> for the task.
| In this example, we provide a distributed SAC baseline based on PARL and paddlepaddle to solve the [grid dispatching competition](https://aistudio.baidu.com/aistudio/competition/detail/111) task. | ||
|
|
||
| ### Dependencies | ||
| * python3 |
No description provided.