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

Testing images in jupyter notebooks with pytest-notebook #252

Closed
pgoiporia opened this issue May 25, 2022 · 2 comments
Closed

Testing images in jupyter notebooks with pytest-notebook #252

pgoiporia opened this issue May 25, 2022 · 2 comments

Comments

@pgoiporia
Copy link
Contributor

pgoiporia commented May 25, 2022

While addressing #163, I couldn't run notebook tests on examples/ibmq_compile.ipynb because the notebook prints images for pulse schedules which change on each iteration. To elaborate, the pulse schedule drawing mentions the schedule id number at the top, which is unique and changes on each run, so the id is different in the notebook run that I submit to github and the one which is produced when github runs the notebook test (attaching image for reference).
pulse_schedule

I've tried a couple of different ways (see jupyter/nbclient#151) without success. Ideally, we should be able to either ignore all cells with images, or less preferably go into the notebook metadata and specify which cells should be ignored by pytest-notebook.

I'll add that this is one of a number of roadblocks I have faced with pytest-notebook, and while I found ways to deal with the other ones, it did take a while - which makes me wonder if there is a preferred alternative to pytest-notebook.

@singular-value
Copy link
Contributor

Interesting.

Another solution would be to change SuperstaQ to give a more sensible name to these pulse schedules.

However, this too will break down whenever IBM calibrations change enough to modify the pixels in the output schedule (I expect this would happen every couple weeks). So the ignoring-images idea sounds good.

@stephanielee9
Copy link
Contributor

not worth the effort

@richrines1 richrines1 transferred this issue from another repository Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants