remove prepared task type (#8558)
### Description
avoid storing the prepared task type. That makes recomputations slightly
slower, but saves memory on every task
### Testing Instructions
<!--
Give a quick description of steps to test your changes.
-->