Update custom_st.py to be compatible with Python 3.8
Browse filesUse the Dict[str, Any] syntax instead of dict[str, Any] for get_config_dict()
- 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) ->
|
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:
|