woven-planet / l5kit

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

[WIP] Dataset Refactor #333

Closed lucabergamini closed 2 years ago

lucabergamini commented 2 years ago

Implement hierarchy for Dataset.

This PR introduces the following hierarchy:

This is still not ideal (as a lot of code would be replicated if we wanted to implement AgentDatasetVectorized). We should prefer modularisation over inheritance.

Also, the sample function is now built from a method which can be changed through inheritance.