Skip to content

Commit

Permalink
Add default values for output_len to avoid errors from lacking requir…
Browse files Browse the repository at this point in the history
…ed arguments
  • Loading branch information
slyubomirsky committed Aug 14, 2024
1 parent 29da24e commit b8cfee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tripy/tripy/frontend/trace/ops/expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@dataclass(repr=False)
class Expand(BaseTraceOp):
output_rank: int
output_len: Optional[int] # only used to help with infer_len for a shape input
output_len: Optional[int] = None # only used to help with infer_len for a shape input

def infer_dtypes(self):
self.outputs[0].dtype = self.inputs[0].dtype
Expand Down
2 changes: 1 addition & 1 deletion tripy/tripy/frontend/trace/ops/reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class Reshape(BaseTraceOp):

output_rank: int
output_len: Optional[int] # only used to help with infer_len for a shape input
output_len: Optional[int] = None # only used to help with infer_len for a shape input

def infer_dtypes(self):
self.outputs[0].dtype = self.inputs[0].dtype
Expand Down

0 comments on commit b8cfee8

Please sign in to comment.