# I'm having a good run in my custom environment, but sometimes I'm not collecting data into episodes

**URL:** <https://discuss.ray.io/t/im-having-a-good-run-in-my-custom-environment-but-sometimes-im-not-collecting-data-into-episodes/9485>\
**Category:** RLlib\
**Created:** [February 24, 2023, 9:57am UTC](https://discuss.ray.io/t/im-having-a-good-run-in-my-custom-environment-but-sometimes-im-not-collecting-data-into-episodes/9485 "2023-02-24T09:57:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangzhang](https://avatars.discourse-cdn.com/v4/letter/z/b77776/32.png) [@zhangzhang](https://discuss.ray.io/u/zhangzhang)\
**Post date:** [February 24, 2023, 9:57am UTC](https://discuss.ray.io/t/im-having-a-good-run-in-my-custom-environment-but-sometimes-im-not-collecting-data-into-episodes/9485/1 "2023-02-24T09:57:49Z")

</div>

I’m having a good run in my custom environment, but sometimes I’m not collecting data into episodes, I don’t know why?The worker environment is running normally.  
And the weird thing is, sometimes the data is collected, sometimes it’s not.There appears to be a data loss that has not been collected into episodes

Result for DDPPO\_test\_env\_9e629\_00000:  
agent\_timesteps\_total: 0  
counters:  
num\_agent\_steps\_sampled: 0  
num\_agent\_steps\_trained: 0  
num\_env\_steps\_sampled: 0  
num\_env\_steps\_trained: 0  
custom\_metrics: {}  
date: 2023-02-24\_09-54-26  
done: false  
episode\_len\_mean: .nan  
episode\_media: {}  
episode\_reward\_max: .nan  
episode\_reward\_mean: .nan  
episode\_reward\_min: .nan  
episodes\_this\_iter: 0  
episodes\_total: 0  
experiment\_id: 4754a76a9fc549a2a965e1a41b205d92  
hostname: georgezhang  
info:  
learner: {}  
num\_agent\_steps\_sampled: 0  
num\_agent\_steps\_trained: 0  
num\_env\_steps\_sampled: 0  
num\_env\_steps\_trained: 0  
iterations\_since\_restore: 4  
node\_ip: 10.19.196.43  
num\_agent\_steps\_sampled: 0  
num\_agent\_steps\_trained: 0  
num\_env\_steps\_sampled: 0  
num\_env\_steps\_sampled\_this\_iter: 0  
num\_env\_steps\_trained: 0  
num\_env\_steps\_trained\_this\_iter: 0  
num\_faulty\_episodes: 0  
num\_healthy\_workers: 4  
num\_recreated\_workers: 0  
num\_steps\_trained\_this\_iter: 0  
perf:  
cpu\_util\_percent: 8.98470588235294  
ram\_util\_percent: 39.48705882352941  
pid: 54432  
policy\_reward\_max: {}  
policy\_reward\_mean: {}  
policy\_reward\_min: {}  
sampler\_perf: {}  
sampler\_results:  
custom\_metrics: {}  
episode\_len\_mean: .nan  
episode\_media: {}  
episode\_reward\_max: .nan  
episode\_reward\_mean: .nan  
episode\_reward\_min: .nan  
episodes\_this\_iter: 0  
hist\_stats:  
episode\_lengths:   
episode\_reward:   
num\_faulty\_episodes: 0  
policy\_reward\_max: {}  
policy\_reward\_mean: {}  
policy\_reward\_min: {}  
sampler\_perf: {}  
time\_since\_restore: 240.15831351280212  
time\_this\_iter\_s: 60.04060769081116  
time\_total\_s: 240.15831351280212  
timers:  
training\_iteration\_time\_ms: 30.848  
timestamp: 1677232466  
timesteps\_since\_restore: 0  
timesteps\_total: 0  
training\_iteration: 4  
trial\_id: 9e629\_00000  
warmup\_time: 13.909451484680176  
== Status ==  
Current time: 2023-02-24 09:54:31 (running for 00:04:24.81)  
Memory usage on this node: 24.8/62.5 GiB  
Using FIFO scheduling algorithm.  
Resources requested: 21.0/80 CPUs, 1.6/2 GPUs, 0.0/80.5 GiB heap, 0.0/37.13 GiB objects (0.0/2.0 accelerator\_type:RTX)  
Result logdir: /rl-decision/ray\_results/test\_sumo\_reward  
Number of trials: 1/1 (1 RUNNING)  
±---------------------------±---------±-------------------±-------±-----------------±-----±---------±-----------------------±---------------------±---------------------+  
| Trial name | status | loc | iter | total time (s) | ts | reward | num\_recreated\_wor… | episode\_reward\_max | episode\_reward\_min |  
|----------------------------±---------±-------------------±-------±-----------------±-----±---------±-----------------------±---------------------±---------------------|  
| DDPPO\_test\_env\_9e629\_00000 | RUNNING | 10.19.196.43:54432 | 4 | 240.158 | 0 | nan | 0 | nan | nan |  
±---------------------------±---------±-------------------±-------±-----------------±-----±---------±-----------------------±---------------------±---------------------+

---

<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 17, 2023, 5:25pm UTC](https://discuss.ray.io/t/im-having-a-good-run-in-my-custom-environment-but-sometimes-im-not-collecting-data-into-episodes/9485/2 "2023-04-17T17:25:30Z")

</div>

Hi @zhangzhang , Please post a reproduction script!
