Open phrasenmaeher opened 2 years ago
Thanks, I was looking for exactly this, and I believe that this should be part of gin.utils
or something. Especially for keeping track of different experiment runs, it's much more useful to have a dict
as opposed to a pre-generated string with newlines.
We can use the
gin.operative_config_str()
, which prints a useful overview. However, for logging the saved parameters, some people (me included) like to query the internal dictionary. We can access it withgin.config._OPERATIVE_CONFIG
(recommended) orgin.config._CONFIG
(not recommended, also includes unused parameters). However, this requires additional parsing.For this, I came up with the following code:
An example output is given below:
The naming follows the way parameter values are stored in a
config.gin
file: the decorated class/function name, followed by the parameter's name.This is not a critical thing, but it might be useful as an enhancement.