woven-planet / l5kit

L5Kit - https://woven.toyota
https://woven-planet.github.io/l5kit
858 stars 277 forks source link

KeyError: 'render_ego_history' occurs when i run the “motion prediction” example in colab #281

Closed wxd400 closed 3 years ago

wxd400 commented 3 years ago

===== INIT DATASET

dm = LocalDataManager(None) train_cfg = cfg["train_data_loader"] rasterizer = build_rasterizer(cfg,dm) train_zarr = ChunkedDataset(dm.require(train_cfg["key"])).open() train_dataset = AgentDataset(cfg, train_zarr, rasterizer) train_dataloader = DataLoader(train_dataset, shuffle=train_cfg["shuffle"], batch_size=train_cfg["batch_size"], num_workers=train_cfg["num_workers"]) print(train_dataset)

》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》

KeyError Traceback (most recent call last)

in () 2 dm = LocalDataManager(None) 3 train_cfg = cfg["train_data_loader"] ----> 4 rasterizer = build_rasterizer(cfg,dm) 5 train_zarr = ChunkedDataset(dm.require(train_cfg["key"])).open() 6 train_dataset = AgentDataset(cfg, train_zarr, rasterizer) /usr/local/lib/python3.7/dist-packages/l5kit/rasterization/rasterizer_builder.py in build_rasterizer(cfg, data_manager) 132 filter_agents_threshold = raster_cfg["filter_agents_threshold"] 133 history_num_frames = cfg["model_params"]["history_num_frames"] --> 134 render_ego_history = cfg["model_params"]["render_ego_history"] 135 136 if map_type in ["py_satellite", "satellite_debug"]: KeyError: 'render_ego_history'
lucabergamini commented 3 years ago

ops, looks like we forgot to update that config file. I'll start a PR to fix it asap

the fix is really easy btw, just add:

render_ego_history: True

to the examples/agent_motion_prediction/agent_motion_config.yaml

lucabergamini commented 3 years ago

fixed in #282 , will close for now. Feel free to reopen if you're still experiencing the issue after pulling master