Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JingyaHuang committed Dec 19, 2024
1 parent da441fb commit a27d657
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions optimum/utils/input_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ def _infer_framework_from_input(input_) -> str:
raise RuntimeError(f"Could not infer the framework from {input_}")
return framework

def _get_default_int_dtype(self):
@staticmethod
def _get_default_int_dtype():
"Default to int64 of available framework."
if is_torch_available():
return torch.int64
Expand All @@ -347,7 +348,8 @@ def _get_default_int_dtype(self):
else:
return np.int64

def _get_default_float_dtype(self):
@staticmethod
def _get_default_float_dtype():
"Default to float32 of available framework."
if is_torch_available():
return torch.float32
Expand Down

0 comments on commit a27d657

Please sign in to comment.