question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Try to get pyhf to run in Pyolite / JupyterLite

See original GitHub issue

Summary

As pyodide is now running with scipy v1.7.3 (demoed on the NumPy docs) all the components to be able to use pyhf in WebAssembly should be there. It would be interesting to see how much work would be needed to get a minimal working example going and then to run some examples in the docs with JupyterLite.

cc @kratsg as he was thinking the same thing as me when he saw the NumPy tweet.

Additional Information

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
henryiiicommented, Feb 11, 2022
import micropip
await micropip.install("pyhf")
import pyhf

Screen Shot 2022-02-11 at 12 11 20 PM

1reaction
henryiiicommented, Mar 25, 2022

And you can make it work (not using portable code though):

import pyodide
import json
inp = pyodide.open_url("https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel.json”)
wspace = pyhf.Workspace(json.load(inp))

(redirects are not supported)

Read more comments on GitHub >

github_iconTop Results From Across the Web

JupyterLite — JupyterLite 0.1.0-beta.16 documentation
JupyterLite is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions.
Read more >
Write http.client in terms of Web APIs · Issue #140 - GitHub
@hoodmane I'd fancy to check and try out the piece of http.client API, ... Try to get pyhf to run in Pyolite /...
Read more >
Jeremy Tuloup (@jtpio) / Twitter
JupyterLite is a JupyterLab distribution that runs entirely in the web ... This will be a *big* shift, so please provide your feedback...
Read more >
Run Jupyter notebooks on a web browser using JupyterLite
Getting started. There are two ways to quickly get started with JupyterLite -. Trying it online. https://jupyterlite.github.io/demo. Try it ...
Read more >
Binder Gallery - MyBinder - GESIS
getting -started, GLAM-Workbench, GitHub, 311 ... mybinder-play, ramantehlan, GitHub, 44 ... dsc-song-analysis-try-experience, learn-co-curriculum, GitHub ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found