Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Add model input validation for run.py
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Jung (VMware) <[email protected]>
  • Loading branch information
Anna Jung (VMware) committed Dec 1, 2021
1 parent 7c401c7 commit 2189fe1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ml-conversational-analytic-tool/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def run(annotated_filename, dataset_filename, outcome, encoding_type, model_type
parser.add_argument('-pad', action='store_true', default=False, help='Pad total length of each pull')

args = parser.parse_args()

if args.model != 'CNN' and args.model != 'LSTM':
raise Exception("Model must be either CNN or LSTM")

encodingType = 'role'
if not args.roleRelevant:
encodingType = 'role-agnostic'
Expand Down

0 comments on commit 2189fe1

Please sign in to comment.