Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to store charts and rich tables #570

Closed
afonit opened this issue Jan 15, 2025 · 2 comments
Closed

Ability to store charts and rich tables #570

afonit opened this issue Jan 15, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@afonit
Copy link

afonit commented Jan 15, 2025

I was testing some notebooks with the jobs function, outputting both notebook and html.

I noticed, so far, that there are two types of output which don't persist in the rendered notebook:

  • pandas tables with rich visuals applied (their style method and rendering to html)
  • altair charts

Is there a mechanism to get these to be retained in the outputs of executed jobs?

Here is an example of code to place in a notebook:

import altair as alt
import pandas as pd

source = pd.DataFrame({
    'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
    'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]
})

alt.Chart(source).mark_bar().encode(
    x='a',
    y='b'
)

When executing this in jupyterlab itself, it looks like this:
image

But when executing through the Jupyter Scheduler the output of that cell is empty:
image

@afonit afonit added the bug Something isn't working label Jan 15, 2025
@afonit
Copy link
Author

afonit commented Jan 15, 2025

FYI,
I did try this with two other tools for scheduling jobs and realized this may be a more general issue so I posted on discourse as well.
https://discourse.jupyter.org/t/notebooks-executed-through-jobs-dont-show-rich-output/31753

@afonit
Copy link
Author

afonit commented Jan 15, 2025

A solution was provided, the notebook has to be trusted - fomightez provided the solution here:
https://discourse.jupyter.org/t/notebooks-executed-through-jobs-dont-show-rich-output/31753/2

@afonit afonit closed this as completed Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant