Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Prevent from changing the interface specification once set.
Browse files Browse the repository at this point in the history
Summary: Prevent from changing the interface specification once set.

fbshipit-source-id: 123600ed4f2bf7148d46c8e3cf6dfe0d34908546
  • Loading branch information
Michael Gschwind authored and facebook-github-bot committed Sep 3, 2020
1 parent 23c5ee5 commit a7b84d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytext/torchscript/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def inference_interface(self, argument_type: str):
# LANGUAGES = 3
# DENSE_FEAT = 4

if (sel.argno != -1):
raise RuntimeError("Cannot change argument type.")
if argument_type == "texts":
self.argno = TEXTS
else:
Expand Down

0 comments on commit a7b84d5

Please sign in to comment.