Closed ezio-melotti closed 5 years ago
The logic in get_steps is pretty simple. If you ask for min_step 1 nsteps 100, it will try to get all step data for steps >= 1 and <= 1+100-1. It will return data for all step numbers found on ModelRecord && StepRecord. So from the perspective of this route, the only thing that can prevent all data being returned is if it isn't in both StepRecord and ModelRecord.
From further discussion, it seems passing step_num= 100 to get_step_to only results in steps 1-99 being calculated.
In get_step in game_runner.py it looks like the code should run up to and including step_num, unless agent_model.is_terminated. So I'm not sure if the agent_model is somehow being terminated in the penultimate step. But Iurii will be better able to answer this than me.
I think this is caused by the fix applied in #81. I tried to revert to the parent changeset and I received all the steps (from 1 to 100 inclusive), even though the last step of each batch (including step 100) were missing the values as reported in #81.
On a 100 hours simulation, I request steps 1-100 (inclusive), but I only get steps 1-99 and the FE gets stuck asking for the 100th step. I also tried asking for steps 0-99, but the first step I receive is step 1. I'm not sure if this is because step 100 doesn't exist so the server has nothing to return, or if it's because I requested 10 steps so the server is waiting for more steps before returning them all.
The request I send after receiving step 99 includes
'min_step_num': 100, 'n_steps': 10
.@breathnach @Pebody can you look into this?