Skip to content

Commit

Permalink
Improve python backend unittests (triton-inference-server#2464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian authored Feb 1, 2021
1 parent 6bdb9d5 commit 004cee0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions qa/python_models/init_args/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -33,10 +33,13 @@


class TritonPythonModel:

def initialize(self, args):
self.args = args
print(args)
if args['model_name'] != 'init_args' or args[
'model_instance_name'] != 'init_args_0':
raise pb_utils.TritonModelException(
'model_instance_name/model_name does not contain correct value.'
)

def execute(self, requests):
""" This function is called on inference request.
Expand Down

0 comments on commit 004cee0

Please sign in to comment.