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 fbb1e97 commit 01cac8aCopy full SHA for 01cac8a
onnx_diagnostic/api.py
@@ -1,2 +1,15 @@
1
+from typing import Any
2
+
3
4
class TensorLike:
5
"""Mocks a tensor."""
6
7
+ @property
8
+ def dtype(self) -> Any:
9
+ "Must be overwritten."
10
+ raise NotImplementedError("dtype must be overwritten.")
11
12
13
+ def shape(self) -> Any:
14
15
+ raise NotImplementedError("shape must be overwritten.")
onnx_diagnostic/reference/torch_ops/_op_run.py
@@ -159,6 +159,10 @@ def copy(self) -> "OpRunSequence":
159
"Shallow copy."
160
return self.__class__(self.sequence, dtype=self.dtype)
161
162
+ def string_type(self) -> str:
163
+ "Returns a string which can be printed."
164
+ return string_type(self.sequence, with_shape=True)
165
166
167
class OpRun:
168
"""
0 commit comments