
Uber Open Sources Pyro, a Deep Probabilistic Programming Language - jonbaer
https://eng.uber.com/pyro/
======
stablemap
Some discussion from a few days ago:

[https://news.ycombinator.com/item?id=15619634](https://news.ycombinator.com/item?id=15619634)

------
bpicolo
Why is it being labelled a "Language" instead of a python library?

~~~
AYBABTME
This bit [1] seems to be hacking around with the Python runtime to provide
"DSL" like semantics. I wouldn't call this a PL but a DSL, sure. (as an aside,
reading this "Poutine" stuff everywhere made me super hungry)

[1]:
[https://github.com/uber/pyro/tree/dev/pyro/poutine](https://github.com/uber/pyro/tree/dev/pyro/poutine)

------
kirillseva
I prefer the syntax of STAN or edwardlib. Curious why Uber would choose to
work on a PPL library in-house as opposed to contributing to existing mature
OSS packages

~~~
f00_
They acquired Geometric Intelligence a year(?) ago, and renamed them Uber AI.
I think there is demand for Edward/PyMC3 backed by PyTorch instead of
Tensorflow/Theano. Theano is being depreciated next year, which backs PyMC3.

[https://www.nyu.edu/about/news-
publications/news/2016/decemb...](https://www.nyu.edu/about/news-
publications/news/2016/december/nyu-incubated-start-up-geometric-intelligence-
acquired-by-uber.html)

Seems okay, they are taking cues from Edward/WebPPL, and have some pretty good
researchers, headed Gary Marcus.

~~~
kirillseva
Is he still around?

[https://www.recode.net/2017/3/8/14863560/uber-ai-gary-
marcus...](https://www.recode.net/2017/3/8/14863560/uber-ai-gary-marcus-
geometric-intelligence)

~~~
f00_
opp, apparently not haha. Interesting, I guess working at Uber wasn't that
great

------
thecolorblue
Is it a language or a python package? The example I am looking at looks like
python to me.

~~~
f00_
I think classifying it as a framework wouldn't be too far off, gives you
statistical distributions to work with as primitives (x is drawn from a Normal
distribution instead of just being assigned to 5 for example).

And then it uses PyTorch to perform Variational Inference(?)

~~~
vvkmnn
Statistical primitives backed by Pytorch (Pyro) and Tensorflow (Edward) is a
great analogy. Thanks!

------
bitL
Very interesting! How does this relate to Reinforcement Learning and
Probabilistic Graphical Models? A major weakness of current crop of Deep
Learning is the decision-making modeling; I assume that's where Pyro is
intended to be used, right?

------
wodenokoto
If one wants to get I to ppl, what is a good place to start?

~~~
flor1s
Avi Pfeffer's "Practical Probabilistic Programming" (Manning) is a nice book
to learn about the concepts. It uses his own Scala based framework Figaro.

------
krylon
There used to be a Python library called Pyro, which stood for _Py_ thon _R_
emote _O_ bjects. As the name implies, it as a library for doing RPC/RMI. I
remember playing with it over a weekend ~12 years ago.

Oh, look, it is still around:
[https://pypi.python.org/pypi/Pyro/3.16](https://pypi.python.org/pypi/Pyro/3.16)

Admittedly, the last update was five years ago, but still.

~~~
jgibson
Pyro (the remote object version) is still around as Pyro4 (and in active
development, found here
[https://pythonhosted.org/Pyro4/](https://pythonhosted.org/Pyro4/)). We found
it great for gradually transitioning from Py2 to Py3

~~~
cglace
Interesting. Can you provide some details about how it helped you transition?

~~~
jgibson
We have a bunch of testers interfacing with hardware that used to run one big
monolithic app that would handle everything from scheduling tests, reporting
results, grabbing test artifacts, interfacing with hardware APIs, etc. Rather
than move everything over at once, we are splitting out each service and
wrapping it in Pyro4, then upgrading them one at a time. We also had a lot of
test tooling in legacy java/.net systems, but Pyro4 can wrap those too with
(IronPython/Jython)

It works nicely in about 95% of use cases with minimal overhead, but there are
some gotchas to be aware of (like all strings being serialized as unicode). If
we were architecting the whole thing from scratch, some of it might have made
more sense with something like gRPC, but it is still a neat tool to have in
your toolbox.

