diff --git a/python/seldon_core/microservice.py b/python/seldon_core/microservice.py index 6d872eb40d..436cc183b0 100644 --- a/python/seldon_core/microservice.py +++ b/python/seldon_core/microservice.py @@ -191,7 +191,7 @@ def main(): user_class = getattr(interface_file, args.interface_name) else: logger.info("Importing submodule %s",parts) - interface_file = importlib.import_module(args.interface_name) + interface_file = importlib.import_module(parts[0]) user_class = getattr(interface_file, parts[1]) if args.persistence: diff --git a/python/tests/model-template-app2/.s2i/environment b/python/tests/model-template-app2/.s2i/environment index 5496009852..a2cb7cf804 100644 --- a/python/tests/model-template-app2/.s2i/environment +++ b/python/tests/model-template-app2/.s2i/environment @@ -1,4 +1,4 @@ -MODEL_NAME=mymodule.MyModel +MODEL_NAME=mymodule.my_model.MyModel API_TYPE=REST SERVICE_TYPE=MODEL PERSISTENCE=0 diff --git a/python/tests/model-template-app2/mymodule/MyModel.py b/python/tests/model-template-app2/mymodule/my_model.py similarity index 100% rename from python/tests/model-template-app2/mymodule/MyModel.py rename to python/tests/model-template-app2/mymodule/my_model.py