Closed aasseman closed 5 years ago
I did not implement __delitem__
though. But since it is a very optional thing, I'll leave it for anyone who wants to do it.
Hey @aasseman Thanks for that!
I have tried to run it but it seems that it is not working with the minimal reproducible example below. Or I am missing something?
import os
import yaml
from miprometheus.utils import ParamInterface
params = ParamInterface()
yaml_config = os.path.expanduser('~/mi-prometheus/configs/vision/simplecnn_mnist.yaml')
params.add_config_params_from_yaml(yaml_path=yaml_config)
conf_str = yaml.safe_dump(params['testing'].to_dict(), default_flow_style=False)
conf_str += '=' * 80 + '\n'
print(conf_str)
params['testing']['problem'].del_config_params('resize')
conf_str = yaml.safe_dump(params['testing'].to_dict(), default_flow_style=False)
conf_str += '=' * 80 + '\n'
print(conf_str) # the 'resize' key is still present
Have updated the doc in other branch, will merge it just after merging that one :+1:
fixes #99 I have not tested though. I am counting on you guys :)