probcomp / GenExperimental.jl

Featherweight embedded probabilistic programming language and compositional inference programming library
MIT License
17 stars 2 forks source link

Integration with Probcomp Stack #17

Open marcoct opened 7 years ago

marcoct commented 7 years ago

Test case: run the goal inference notebook with parallelization of SIR across cores of a large EC2 instance.

marcoct commented 7 years ago

I succesfully ran the goal inference notebook on the probcomp-stack instance with manual installation of Gen.jl and its dependencies, using these steps:

[X] Get IJulia installed and running on my probcomp stack instance: SSH into stack instance. Created directory ~/gen-install, and inside this directory: Download julia Linux binary 64-bit x86 (https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.0-linux-x86_64.tar.gz) Untar the binary, and start the Julia REPL inside (bin/julia), and run commands in the REPL: julia> ENV["JUPYTER"] = "/home/ubuntu/venv/bin/jupyter" julia> Pkg.add("IJulia") julia> Pkg.build("IJulia") Test it by visiting URL, e.g. https://marcoct.stack.probcomp.net, and starting New -> Julia 0.6.0 notebook (it should be a new menu option that appears above "Python 2").

[X] Get the goal inference notebook installed and running on my probcomp stack instance Cloned the Gen.jl repository (after setting up a new ssh key on the stack instance and registering it with Github), into a directory: ~/gen-install/Gen.jl Write a file ~/.juliarc.jl that adds the parent directory of Gen.jl to the LOAD_PATH: push!(LOAD_PATH, "/home/ubuntu/gen-install") Install dependencies of Gen.jl in a REPL: Pkg.add("DataStructures") Pkg.add("Distributions") (consider doing Pkg.build for each of these to to precompile them) Test Gen, in a Julia REPL, with: ~/gen-install/julia..../bin/julia Gen.jl/test/runtests.jl Tests crashed and got a lot of deprecated warnings due to use of 0.6 instead of 0.5 Sucesfully ran tests with Julia 0.5.2 (https://julialang-s3.julialang.org/bin/linux/x64/0.5/julia-0.5.2-linux-x86_64.tar.gz) Install the Gen notebook extensions d3 and gen_notebook_extension jupyter nbextension install gen_notebook_extension/ --user jupyter nbextension enable gen_notebook_extension/main --user mkdir ~/.local/share/jupyter/nbextensions/d3 cp ~/gen-install/d3.min.js ~/.local/share/jupyter/nbextensions/d3 (get d3.min.js from https://github.com/d3/d3/releases/download/v4.9.1/d3.zip) jupyter nbextension enable d3/d3.min --user Status: The renderings run but the circles do not show up in Firefox, only Chrome: https://github.com/probcomp/Gen.jl/issues/22