askforalfred / alfred

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

augment_trajectories walklevel too shallow #94

Closed unnat closed 3 years ago

unnat commented 3 years ago

python gen/scripts/tp_augment_trajectories.py --data_path data/json_2.1.0 --num_threads 1

original code leads to traj_list with 971 elements of the type:

'data/json_2.1.0/tests_seen/trial_T20190909_074728_844604/traj_data.json'

The above edits leads to traj_list with 7080 elements of the type:

'data/json_2.1.0/train/look_at_obj_in_light-AlarmClock-None-DeskLamp-301/trial_T20190907_174127_043461/traj_data.json'

Why? Num separators in args.data_path='data/json_2.1.0' is 1 Num separators in dir_name='data/json_2.1.0/tests_seen/trial_T20190909_074728_844604' is 3 i.e. level gap of 2 Num separators in dir_name='data/json_2.1.0/train/look_at_obj_in_light-AlarmClock-None-DeskLamp-301/trial_T20190907_174127_043461' is 4 i.e. level gap of 3 Hence, we need to walk with level=3 to reach the train directories

Since users shouldn't process the tests_seen and tests_unseen directories (as per issue #14), we need the optional edit of or 'tests' in dir_name. It raises a Error: KeyError('task_type',) error.

MohitShridhar commented 3 years ago

Looks good! Thanks @unnat !