Skip to content

Commit d9472f5

Browse files
committed
Make the first two arguments of save_config positional-only.
Otherwise the behaviour might be confusing, because path/config named arguments would not be serializable, they would only overwrite the respective argument.
1 parent 9617690 commit d9472f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

labs/npfl138/trainable_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def load_weights(self, path: str, optimizer_path: str | None = None,
255255
self.to(self.device)
256256

257257
@staticmethod
258-
def save_config(path: str, config: dict = {}, **kwargs) -> None:
258+
def save_config(path: str, config: dict = {}, /, **kwargs: dict) -> None:
259259
"""Save a JSON-serializable configuration to the given path.
260260
261261
The configuration can be given as a dictionary or as keyword arguments

0 commit comments

Comments
 (0)