Example report with Bookflow_utils

This is the same example as in the previous section, but now we are using the helper package. It’s a little quicker to write if you want to do standard stuff.


The package bookflow_utils is a work in progress, and and proper guide to using it will also follow.

This is an example of a document that automatically updates when you execute new code runs. This updating happens when you build your book.

What you see on this page by default is only the output, the way you would want a document to show up like. However, you will also see, for the purposes of this example, buttons marked ‘click to show’, which will show you the code that was used to enable this auto-updated from runs.

from bookflow_utils.mlflow_to_book import BookflowConfig, BookflowHelper
config_file = '../project_config.yaml'
config = BookflowConfig(config_file) #set the experiment and also a default selection based on tags
helper = BookflowHelper(config) # this object will refer by default to the latest run of the configured experiment and tags

helper.glue_param('algo2', 'algo')
helper.glue_metric('acc2', 'acc_test')


We have trained a svc model on the Iris dataset. The parameters used for this model can be found in this table.

Parameter Value
0 gamma 0.1
1 C 1.0
2 algo svc
3 random_state 0
4 kernel rbf

Fig. 4 The values used for the parameters when training our svc model.


We achieve an accuracy of 0.96 on the test data. The decision boundaries can be seen in Fig. 5.

helper.glue_image('pil_image2', 'figures/decision_region.png')

Fig. 5 Here we show the decision regin of our svc model.



Internal Metadata

Here we include metadata about the run whose details were included in the above document. This is useful information, for example, for cross-referencing or reproducibility when in the future you or someone else reads an old version of this document.

{'commit_hash': '91d164ec3550b45d9c4f4307aeadec3db495bb52',
 'run_id': 'defe17da79c042838341607bd1b92a21',
 'run_end_time_local': '2020-10-01 19:46:53'}