Skip to content

Commit 020b24b

Browse files
rnyaksararbkarlhigley
committed
Fix output error occurring due to check if it is a dict or not (#1742)
* fix pred output type * remove commented out lines * Apply suggestions from code review Co-authored-by: Karl Higley <[email protected]> Co-authored-by: Sara Rabhi <[email protected]> Co-authored-by: Karl Higley <[email protected]>
1 parent 0795b4b commit 020b24b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

nvtabular/inference/triton/model/model_pt.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,7 @@ def execute(self, requests):
157157

158158
# Call forward function to get the predictions
159159
# Forward function should return a dict with the "predictions" bucket
160-
out = self.model(input_dict, training=False)
161-
if not isinstance(out, dict):
162-
raise ValueError("output of the forward function should be a dict")
163-
164-
# Get the predictions from the out
165-
pred = out.get("predictions")
160+
pred = self.model(input_dict, training=False)
166161
if pred is None:
167162
raise KeyError(
168163
"output of the forward function should have a bucket named as predictions"

0 commit comments

Comments
 (0)