awslabs / multi-model-server

Multi Model Server is a tool for serving neural net models for inference
Apache License 2.0
998 stars 230 forks source link

Improve MMS model loading exception handling #1010

Closed namannandan closed 1 year ago

namannandan commented 1 year ago

Model loading could potentially fail silently because of the following exception handling:

                try:
                    model_service.initialize(service.context)
                    # pylint: disable=broad-except
                except Exception:
                    # noinspection PyBroadException
                    try:
                        sys.exc_clear()
                        # pylint: disable=broad-except
                    except Exception:
                        pass

This can be improved by logging the exception to assist with debugging.