Skip to content

Changing keyword arg name to match demo, adding hyperparameter_descriptions argument

Thomas Callister requested to merge thomas-callister/popsummary:main into main

Running the example.py script threw a few errors related to keyword arguments.

First, it looked like there was a little mismatch in whether the code expected a hyperparameter_latex_labels or a hyperparam_latex_labels argument:

$ cd bin/
$ python example.py 
Traceback (most recent call last):
  File "/home/thomas.callister/CBC/popsummary/bin/example.py", line 14, in <module>
    res = PopulationResult(fname='test.h5',
TypeError: PopulationResult.__init__() got an unexpected keyword argument 'hyperparameter_latex_labels'

I just changed popresult.py so that PopulationResult expects hyperparameter_latex_labels

Second, it looks like the hyperparameter_description argument was missing from the PopulationResult.__init__() function:

$ python example.py 
Traceback (most recent call last):
  File "/home/thomas.callister/CBC/popsummary/bin/example.py", line 14, in <module>
    res = PopulationResult(fname='test.h5',
TypeError: PopulationResult.__init__() got an unexpected keyword argument 'hyperparameter_descriptions'

So I just added this as well! Totally feel free to reject this MR if you prefer these changes to be made a different way 😄

Merge request reports

Loading