Closed VincentKetelaars closed 3 years ago
In general scrapbook.glue
should be supporting everything the old pm.record
supported. If you could open an issue in scrapbook with a specific code snippet that's failing but should work, likely we can identify what needs to be added as a valid encoder there and patch scrapbook.
Transferring issue to scrapbook repo since that is where the fix would happen.
I don't have the original problem with pm.record
on hand anymore. But it was a problem with multi indexed pandas dataframes.
I checked what pm.display
actually did and just copied over the lines from https://github.com/nteract/papermill/blob/0.18.2/papermill/api.py#L60, which works fine for me.
Feel free to close this issue. I'm happy with the above code.
Thanks and do let us know if something comes up that you think should be changed.
I am trying to move us from an old version (0.18) to the most recent and a few things changed :)
The main one that I am struggling with is
pm.display
. In our setup we would have a small notebook (ipynb) file, which through theexecute_notebook
parameters
we would provide certain functions + parameters to run. This allows us to create functions that we can properly lint, unit test, etc. and 'inject' in a notebook that we can run with papermill. It's awesome.These functions that we would inject were using
pm.display
andpm.record
to display and record objects. Mostly plots and dataframes. It is unclear to me exactly how this is supposed to work now. I see that withscrapbook
I canglue
scraps, which looks like what I need. (Also has thedisplay=True
, which is nice) But thisglue
is more restrictive in what it can and cannot save, and so it can't be used for displaying everything. (e.g. multi index dataframes)Any help would be appreciated. Thanks!