We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93a02b0 commit 3f71eb1Copy full SHA for 3f71eb1
src/bindings/python/src/openvino/_ov_api.py
@@ -28,6 +28,16 @@ class ModelMeta(type):
28
def __dir__(cls) -> list:
29
return list(set(cls.__dict__.keys()) | set(dir(ModelBase)))
30
31
+ def __getattribute__(cls, name: str) -> Any:
32
+ if name == "__init__":
33
+ return getattr(ModelBase, name)
34
+ return super().__getattribute__(name)
35
+
36
+ def __getattr__(cls, name: str) -> Any:
37
+ # Return the attribute defined in _pyopenvino.Model if it exists
38
+ # otherwise AttributeError will be raised
39
40
41
42
class Model(object, metaclass=ModelMeta):
43
def __init__(self, *args: Any, **kwargs: Any) -> None:
0 commit comments