Skip to content

Commit a14cdd0

Browse files
Work around Layout == str issue (#3358) (#3371)
The Layout utility datatype was recently introduced. However, it seems to be polymorphic depending on the way it was constructed: sometimes it's just a string, sometimes it has a data member called "layout". This is just a fix to make OVMSAdapter work with the most common use case. There is a bigger fix needed to patch all code paths in OVMSAdapter and OpenvinoAdapter. Co-authored-by: Nico Galoppo <[email protected]>
1 parent 8599215 commit a14cdd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demos/common/python/openvino/model_zoo/model_api/adapters/ovms_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def get_input_layers(self):
125125
inputs = {}
126126
for name, meta in self.metadata["inputs"].items():
127127
input_layout = Layout.from_shape(meta["shape"])
128-
inputs[name] = Metadata(set(name), meta["shape"], input_layout.layout, self.tf2ov_precision.get(meta["dtype"], meta["dtype"]))
128+
inputs[name] = Metadata(set(name), meta["shape"], input_layout, self.tf2ov_precision.get(meta["dtype"], meta["dtype"]))
129129
return inputs
130130

131131
def get_output_layers(self):

0 commit comments

Comments
 (0)