lab
lab copied to clipboard
Simplify making reports in a Jupyter notebook
Original report by Florian Pommerening (Bitbucket: FlorianPommerening, GitHub: FlorianPommerening).
I tried using lab in a python notebook and wanted to create and view a report there. My hope was that I could create a report, pass a properties object to it, and get matplotlib object as a return value which would be rendered by the notebook. I tried to change the write
method of report, but got stuck.
There is several parts to this suggestion. Lets discuss the general idea here and possibly create subissues then:
- Allow reports to be run without an experiment (e.g., just given the properties)
- Untangle the virtual methods to some degree (at least split creating the report from writing it)
- Add the option to return the plot object (or table, or whatever is the finished version of the report) instead of writing it to a file.
I think it would be interesting to solve the more general problem of simplifying making reports in Jupyter notebooks. I changed the title to reflect this.
Original comment by Florian Pommerening (Bitbucket: FlorianPommerening, GitHub: FlorianPommerening).
Original comment by Florian Pommerening (Bitbucket: FlorianPommerening, GitHub: FlorianPommerening).
I attached an old test case of mine. I think it contains more files than are actually needed. The files Pipfile,
evaluate.ipynb
, and properties.xz
should be enough but I cannot test that at the moment.
Original changes by Jendrik Seipp (Bitbucket: jendrikseipp, GitHub: jendrikseipp).
changed content from "I tried using lab in a python notebook and wanted to create and view a report there. My hope was that I could create a report, pass a properties object to it, and get matplotlib object as a return value which would be rendered by the notebook. I tried to change the write
method of report, but got stuck.
There is several parts to this suggestion. Lets discuss the general idea here and possibly create subissues then:
- Allow reports to be run without an experiment (e.g., just given the properties)
- Untangle the virtual methods to some degree (at least split creating the report from writing it)
- Add the option to return the plot object (or table, or whatever is the finished version of the report) instead of writing it to a file. " to "I tried using lab in a python notebook and wanted to create and view a report there. My hope was that I could create a report, pass a properties object to it, and get matplotlib object as a return value which would be rendered by the notebook. I tried to change the
write
method of report, but got stuck.
There is several parts to this suggestion. Lets discuss the general idea here and possibly create subissues then:
- Allow reports to be run without an experiment (e.g., just given the properties)
- Untangle the virtual methods to some degree (at least split creating the report from writing it)
- Add the option to return the plot object (or table, or whatever is the finished version of the report) instead of writing it to a file."; changed title from "Create Matplotlib object given a report and properties" to "Simplify making reports in a Jupyter notebook"
Original changes by Florian Pommerening (Bitbucket: FlorianPommerening, GitHub: FlorianPommerening).
set attachment to "jupyter.tar.xz"
I finally recovered the file from the backup: jupyter.zip
To try this out, run this in the directory containing the Pipfile
.
pipenv install
pipenv run jupyter notebook