askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
360 stars 77 forks source link

Last Subgoal Never Triggers #97

Closed SamNPowers closed 3 years ago

SamNPowers commented 3 years ago

Occasionally, a traj_data.json is generated that does not have a Noop as the last planned action, for instance: traj_data.log (extension changed to log because it didn't let me upload .json)

When this happens this line: https://github.com/askforalfred/alfred/blob/f9a852d954c1c3fe62fab6e1dec8a9302740dad1/env/tasks.py#L22 computes a wrong number of subgoals, which causes this line: https://github.com/askforalfred/alfred/blob/f9a852d954c1c3fe62fab6e1dec8a9302740dad1/env/tasks.py#L85 to result in the goal_idx never progressing to the final subgoal.

An easy fix would be to just check that the last planned action is actually a No-op, and only remove it from the count if it is. But I'm not sure if the lack of No-op itself is an issue, as I'm not sure why the plan generates it in the first place.

Thanks!

MohitShridhar commented 3 years ago

@SamNPowers, great catch! Thank you. Fixed in https://github.com/askforalfred/alfred/commit/07367790324e939bb92236749912ea63726f07ed. Sorry for the delay.