Skip to content

Commit 0723071

Browse files
committed
fix: fix type annotation.
1 parent f076233 commit 0723071

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lightning/pytorch/core/module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,12 +1494,12 @@ def forward(self, x):
14941494
@torch.no_grad()
14951495
def to_tensorrt(
14961496
self,
1497-
file_path: str | Path | BytesIO | None = None,
1498-
input_sample: Any | None = None,
1497+
file_path: Optional[Union[str, Path, BytesIO]] = None,
1498+
input_sample: Optional[Any] = None,
14991499
ir: Literal["default", "dynamo", "ts"] = "default",
15001500
output_format: Literal["exported_program", "torchscript"] = "exported_program",
15011501
retrace: bool = False,
1502-
default_device: str | torch.device = "cuda",
1502+
default_device: Union[str, torch.device] = "cuda",
15031503
**compile_kwargs: Any,
15041504
) -> Union[ScriptModule, torch.fx.GraphModule]:
15051505
"""Export the model to ScriptModule or GraphModule using TensorRT compile backend.

0 commit comments

Comments
 (0)