# Restored Policy gives action that is out of bound

**URL:** <https://discuss.ray.io/t/restored-policy-gives-action-that-is-out-of-bound/9623>\
**Category:** Checkpointing, Restoring\
**Created:** [March 4, 2023, 2:47am UTC](https://discuss.ray.io/t/restored-policy-gives-action-that-is-out-of-bound/9623 "2023-03-04T02:47:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hxwwayne](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/hxwwayne/32/4010_2.png) [@hxwwayne](https://discuss.ray.io/u/hxwwayne)\
**Post date:** [March 4, 2023, 2:47am UTC](https://discuss.ray.io/t/restored-policy-gives-action-that-is-out-of-bound/9623/1 "2023-03-04T02:47:12Z")

</div>

Hi,

I used PPO to train the agent and saved the policy using checkpoint. But when I restored the policy and using compute single action function to get action, the policy will output action that out of action spaces. So, I want to know if I did something wrong or there are problems in Rllib.

By the way, trainer.compute single action will not output action that is out of bound.

---

<div class="post-metadata">

**Author:** ![arturn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/arturn/32/2096_2.png) [@arturn](https://discuss.ray.io/u/arturn)\
**Post date:** [April 13, 2023, 11:06pm UTC](https://discuss.ray.io/t/restored-policy-gives-action-that-is-out-of-bound/9623/2 "2023-04-13T23:06:40Z")

</div>

Have a look at what I wrote over [here](https://discuss.ray.io/t/compute-single-action-obs-state-of-policy-and-algo-different-performance/9579).  
Algorithm unsquashes actions.
