# Training works in ray 1.3, how to get it to work in ray 1.13?

**URL:** <https://discuss.ray.io/t/training-works-in-ray-1-3-how-to-get-it-to-work-in-ray-1-13/15977>\
**Category:** RLlib\
**Created:** [October 9, 2024, 6:57pm UTC](https://discuss.ray.io/t/training-works-in-ray-1-3-how-to-get-it-to-work-in-ray-1-13/15977 "2024-10-09T18:57:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/christopher/32/6625_2.png) [@christopher](https://discuss.ray.io/u/christopher)\
**Post date:** [October 9, 2024, 6:57pm UTC](https://discuss.ray.io/t/training-works-in-ray-1-3-how-to-get-it-to-work-in-ray-1-13/15977/1 "2024-10-09T18:57:27Z")

</div>

I used ray 1.3 and python 3.7 and training1.py and rollout1.py was successful. Training exhibited mean reward going up and reduced episode reward over time.  
I’m trying to get the training/rollout script to work in ray 1.13 and python 3.8 because there’s a complementary policy trained with ray1.13/python3.8 that needs to be integrated with the policy from training1.py and rollout1.py. so I’m trying to get everything functioning on the same environment.

If I train in ray 1.13 and set the following: config[“\_disable\_preprocessor\_api”]=True,  
I get this error:

(PPOTrainer pid=44716) File “C:\Users\christopher\AppData\Local\anaconda3\envs\RLCLEANUPENV\lib\site-packages\ray\rllib\models\modelv2.py”, line 411, in restore\_original\_dimensions  
(PPOTrainer pid=44716) return \_unpack\_obs(obs, original\_space, tensorlib=tensorlib)  
(PPOTrainer pid=44716) File " C:\Users\christopher\AppData\Local\anaconda3\envs\RLCLEANUPENV\lib\site-packages\ray\rllib\models\modelv2.py", line 445, in \_unpack\_obs  
(PPOTrainer pid=44716) raise ValueError(  
(PPOTrainer pid=44716) ValueError: Expected flattened obs shape of […, 80], got (?, 23)  
Traceback (most recent call last):  
File “train.py”, line 87, in   
tune.run(ppo.PPOTrainer, config=my\_config, stop=stop\_dict, local\_dir=output\_dir,  
File " C:\Users\christopher\AppData\Local\anaconda3\envs\RLCLEANUPENV \lib\site-packages\ray\tune\tune.py", line  
741, in run  
raise TuneError(“Trials did not complete”, incomplete\_trials)  
ray.tune.error.TuneError: (‘Trials did not complete’, [PPOTrainer\_MultiAgentTravelingSalesman\_30ef6\_00000])

when I set config[“\_disable\_preprocessor\_api”]=True, training can occur but the rewards are decreasing instead of increasing.

I’m using  
observation\_dict = {“pos”: MultiDiscrete([20 for i in range(self.agent\_count)]),  
“visited”: Box(low=np.NINF, high=np.inf, shape=(20, 1))  
}  
self.observation\_space = spaces.Dict(observation\_dict)  
self.action\_space = MultiDiscrete([20 for i in range(self.agent\_count)])

What can I do to get training/rollout script to work in ray 1.13 if it is already works in 1.3?  
THanks!
