Skip to content

Commit 0531681

Browse files
add __model__ to Model
Signed-off-by: Ashwin Vaidya <[email protected]>
1 parent d73992e commit 0531681

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

model_api/python/model_api/models/image_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class ImageModel(Model):
3030
input_transform (InputTransform): instance of the `InputTransform` for image normalization
3131
"""
3232

33+
__model__ = "ImageModel"
34+
3335
def __init__(self, inference_adapter, configuration=dict(), preload=False):
3436
"""Image model constructor
3537

model_api/python/model_api/models/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, wrapper_name, message):
2525
super().__init__(f"{wrapper_name}: {message}")
2626

2727

28-
class Model(ABC):
28+
class Model:
2929
"""An abstract model wrapper
3030
3131
The abstract model wrapper is free from any executor dependencies.
@@ -51,7 +51,7 @@ class Model(ABC):
5151
model_loaded (bool): a flag whether the model is loaded to device
5252
"""
5353

54-
__model__: str
54+
__model__: str = "Model"
5555

5656
def __init__(self, inference_adapter, configuration=dict(), preload=False):
5757
"""Model constructor
@@ -150,7 +150,7 @@ def create_model(
150150
cache_dir (:obj:`str`, optional): directory where to store compiled models to reduce the load time before the inference
151151
152152
Returns:
153-
Model objcet
153+
Model object
154154
"""
155155
if isinstance(model, InferenceAdapter):
156156
inference_adapter = model

0 commit comments

Comments
 (0)