Support recursive data type in TorchScript #42487
Labels
high priority
oncall: jit
Add this issue/PR to JIT oncall triage queue
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
weeks
馃殌 Feature
It would be really awesome to support recursive data type in TorchScript. For example:
Motivation
Many DPER3 modules take input of nested data types like
Dict[str, Dict[str, Dict[str, torch.Tensor]]]
, and it will be really hard to maintain if we had to add support to all variations of those nested data types to TypedDataDict (which is DPER3's typed dictionary object class). But if recursive data type is supported, then we only needDict[str, TypedDataDict]
andDict[str, torch.Tensor]
to cover all nesting possibilities.Having recursive data type support will greatly speed up the work for moving all PyPer models to 100% TorchScript, demonstrating TorchScript's production readiness for large-scale ranking models.
cc. @wanchaol @suo
cc @ezyang @gchanan @zou3519 @suo @gmagogsfm
The text was updated successfully, but these errors were encountered: