Closed jamesavery closed 5 years ago
you can also access the parameters as a dictionary with params.dict
like this:
def update_params(params,args):
for i in range(1,len(args),2):
[key,value] = args[i:i+2];
params.dict[key] = eval(value)
Cool, thanks! :)
It's a bit awkward to address every parameter by name, as is needed when represented as fields in an object. For example, updating parameter values on the command line is much easier, if I could do
Then the default values can sit in the json file, but it's quick to supply alternate values without having to change the json or source code.