Skip to content

Commit 415e499

Browse files
committed
Added error handling for sample inference test in model deployment
1 parent c06a8b8 commit 415e499

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

modzy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
from .client import ApiClient # noqa
77
from .edge.client import EdgeClient
8-
__version__ = '0.10.1'
8+
__version__ = '0.10.2'
99

1010
logging.getLogger(__name__).addHandler(logging.NullHandler())

modzy/_util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ def run_model(client, logger, identifier, version):
150150
time.sleep(1)
151151

152152
test_output = res['result']
153+
# perform validation check on test_output and raise error if error exists
154+
if test_output["status"] == "FAILED":
155+
raise ValueError(f'Sample inference test failed with error {test_output["error"]}. Check model container and try again.')
153156

154157
sample_input = {'input': {'accessKeyID': '<accessKeyID>',
155158
'region': '<region>',

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
# removed in 0.7.1 test_suite='tests',
4141
# removed in 0.7.1 tests_require=test_requirements,
4242
url='https://github.com/modzy/sdk-python',
43-
version='0.10.1',
43+
version='0.10.2',
4444
zip_safe=False,
4545
)

0 commit comments

Comments
 (0)