Skip to content

Commit b2445b5

Browse files
committed
repr
1 parent 74b427e commit b2445b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/model_constructor/helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def changed_fields(self) -> Dict[str, Any]:
120120

121121
def print_cfg(self) -> None:
122122
"""Print full config"""
123-
print(self.__repr__())
123+
print(repr(self))
124124

125125
def print_set_fields(self) -> None:
126126
"""Print fields changed at init."""

Diff for: tests/test_mc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_ModelCfg():
100100
"""test ModelCfg"""
101101
# default - just create config with custom name
102102
cfg = ModelCfg(name="custom_name")
103-
repr_str = cfg.__repr__()
103+
repr_str = repr(cfg)
104104
assert repr_str.startswith("custom_name")
105105
# initiate from string
106106
cfg = ModelCfg(act_fn="torch.nn.Mish")

0 commit comments

Comments
 (0)