Quantcast
Channel: Bayesium Analytics
Viewing all articles
Browse latest Browse all 10

Installing httpstan on Ubuntu Linux 20.04

$
0
0

The full instructions and source code are found here. In this post I’ll give the slimmed-down basics.

  1. If python3, pip, or curl are not already installed, install them:
    sudo apt install python3 python3-pip curl
  2. Now install via pip:
    python3 -m pip install httpstan
  3. Now do a quick check to verify the install:
    python3 -m httpstan &
    curl -H "Content-Type: application/json" --data \

    '{"program_code":"parameters {real y;} model {y ~ normal(0,1);}"}' \
    http://localhost:8080/v1/models > output.txt
  4. The file output.txt should contain the text representation of a JSON object with a “name” field, a “compiler_output” field that will be a long string, and a “stanc_warnings” field that should have the value “”.
  5. Now shut down the server:
    fg
    ^C


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images