TransformerLensOrg / CircuitsVis

Mechanistic Interpretability Visualizations using React
https://alan-cooney.github.io/CircuitsVis/
MIT License
192 stars 29 forks source link

yarn buildBrowser --dev error #23

Closed neelnanda-io closed 1 year ago

neelnanda-io commented 1 year ago

When I run any circuits vis render (eg circuitsvis.examples.hello("Neel")) I get the following error

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
/tmp/ipykernel_1001422/1929088876.py in <module>
      1 import circuitsvis.examples
----> 2 circuitsvis.examples.hello("Help")

~/CircuitsVis/python/circuitsvis/examples.py in hello(name)
     16     return render(
     17         "Hello",
---> 18         name=name,
     19     )

~/CircuitsVis/python/circuitsvis/utils/render.py in render(react_element_name, **kwargs)
    170         Html: HTML for the visualization
    171     """
--> 172     local_src = render_local(react_element_name, **kwargs)
    173     cdn_src = render_cdn(react_element_name, **kwargs)
    174     return RenderedHTML(local_src, cdn_src)

~/CircuitsVis/python/circuitsvis/utils/render.py in render_local(react_element_name, **kwargs)
    103     if REACT_DIR.exists():
    104         install_if_necessary()
--> 105         bundle_source()
    106 
    107     # Load the JS

~/CircuitsVis/python/circuitsvis/utils/render.py in bundle_source(dev_mode)
     81                    capture_output=True,
     82                    text=True,
---> 83                    check=True
     84                    )
     85 

/opt/conda/lib/python3.7/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    510         if check and retcode:
    511             raise CalledProcessError(retcode, process.args,
--> 512                                      output=stdout, stderr=stderr)
    513     return CompletedProcess(process.args, retcode, stdout, stderr)
    514 

CalledProcessError: Command '['yarn', 'buildBrowser', '--dev']' returned non-zero exit status 1.
alan-cooney commented 1 year ago

Struggling to reproduce this - is it when developing within the repo, or after pip installing it?

neelnanda-io commented 1 year ago

Fixed this, it was nothing to do with changes you made, and some weird thing on my end. I think I fixed it by running yarn install circuitsvis in the correct directory again?

alan-cooney commented 1 year ago

Okay great closing for now