From 575b268c20290a7717d48d95a665939a45d27bfd Mon Sep 17 00:00:00 2001 From: Michael Gschwind Date: Thu, 3 Sep 2020 10:18:50 -0700 Subject: [PATCH] Regularize handling of dense features (#1447) Summary: Pull Request resolved: https://github.com/facebookresearch/pytext/pull/1447 Regularize handling of dense features Differential Revision: D23502163 fbshipit-source-id: e7f4f2d635f87a6390b358d90e4d294042e9a3d5 --- pytext/torchscript/module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytext/torchscript/module.py b/pytext/torchscript/module.py index 255db81ea..dfab60b73 100644 --- a/pytext/torchscript/module.py +++ b/pytext/torchscript/module.py @@ -69,12 +69,12 @@ def __init__( @torch.jit.script_method def forward( self, - dense_feat: List[List[float]], texts: Optional[List[str]] = None, # multi_texts is of shape [batch_size, num_columns] multi_texts: Optional[List[List[str]]] = None, tokens: Optional[List[List[str]]] = None, languages: Optional[List[str]] = None, + dense_feat: Optional[List[List[float]]] = None, ): inputs: ScriptBatchInput = ScriptBatchInput( texts=resolve_texts(texts, multi_texts), @@ -107,13 +107,13 @@ def __init__( @torch.jit.script_method def forward( self, - right_dense_feat: List[List[float]], - left_dense_feat: List[List[float]], texts: Optional[List[str]] = None, # multi_texts is of shape [batch_size, num_columns] multi_texts: Optional[List[List[str]]] = None, tokens: Optional[List[List[str]]] = None, languages: Optional[List[str]] = None, + right_dense_feat: Optional[List[List[float]]] = None, + left_dense_feat: Optional[List[List[float]]] = None, ): inputs: ScriptBatchInput = ScriptBatchInput( texts=resolve_texts(texts, multi_texts),