Skip to content

Commit

Permalink
Instanciate delayed variables when printing a staged network dict (#465)
Browse files Browse the repository at this point in the history
Otherwise delayed variables and paths are stringified wrongly (via their repr, which for paths leads to `<tk.Path path="...">`).
  • Loading branch information
NeoLegends authored Dec 1, 2023
1 parent 8e6b3fd commit db17195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion returnn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _write_network_stages(self, config_path):
pp = pprint.PrettyPrinter(indent=2, width=150, **self.pprint_kwargs)
network_definition = self.staged_network_dict[epoch]
if isinstance(network_definition, dict):
content = "\nnetwork = %s" % pp.pformat(network_definition)
content = "\nnetwork = %s" % pp.pformat(instanciate_delayed(network_definition))
elif isinstance(network_definition, str):
content = network_definition
else:
Expand Down

0 comments on commit db17195

Please sign in to comment.