pewh commited on
Commit
e20f32e
1 Parent(s): 80ffb06

Update custom_st.py to be compatible with Python 3.8

Browse files

Use the Dict[str, Any] syntax instead of dict[str, Any] for get_config_dict()

Files changed (1) hide show
  1. custom_st.py +1 -1
custom_st.py CHANGED
@@ -190,7 +190,7 @@ class Transformer(nn.Module):
190
  )
191
  return output
192
 
193
- def get_config_dict(self) -> dict[str, Any]:
194
  return {key: self.__dict__[key] for key in self.config_keys}
195
 
196
  def save(self, output_path: str, safe_serialization: bool = True) -> None:
 
190
  )
191
  return output
192
 
193
+ def get_config_dict(self) -> Dict[str, Any]:
194
  return {key: self.__dict__[key] for key in self.config_keys}
195
 
196
  def save(self, output_path: str, safe_serialization: bool = True) -> None: