Has anyone ever productionized a Stan model on Azure Machine Learning?

367 views
Skip to first unread message

UD1989

unread,
Aug 25, 2015, 3:19:26 AM8/25/15
to Stan users mailing list
Has anyone ever productionized a Stan model on Azure Machine Learning? We are using a STAN model to predict housing prices , and would like to expose the results as a webservice. The Microsoft Azure Machine Learning module has a feature to automatically generate anAPI from the resultant dataset of a R script and we plan to use this. However even small scripts are taking a lot of time to run -so I cant even think what will happen when I run the STAn code which takes 2 days to train the data. If anyone has done thi before I will be grateful for some suggestions

Thanks and Regards
Upasana

Bob Carpenter

unread,
Aug 25, 2015, 10:48:20 AM8/25/15
to stan-...@googlegroups.com
No idea what Azure is --- we haven't had an easy time
with all things Windows, though, given its quirky behavior
for C++.

You might try either a subset of data or use something like
variational inference if you can deal with an approximate answer
(which is what "machine learning" approaches usually do, though
often with even simpler penalized max likelihood and plug-in of
the point inferences).

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Slawek Smyl

unread,
Aug 25, 2015, 1:35:07 PM8/25/15
to Stan users mailing list
Hi,
No, as far as I know, and I talked to some Azure ML developers, it is not possible now. The problem is that a VM that hosts AML has to have Rtools preinstalled, which is not the case, and Rtools cannot be installed like a normal package. Perhaps make a feature suggestion. I will also try from my side.

Regards,
Slawek

Seth Flaxman

unread,
Aug 25, 2015, 2:52:22 PM8/25/15
to stan-...@googlegroups.com
What about using CmdStan, i.e. can you just deploy a Stan binary built for the correct architecture on AML? You can still process output in R, but no Rtools required.

--

Slawek Smyl

unread,
Aug 25, 2015, 4:04:51 PM8/25/15
to stan-...@googlegroups.com
Hi Seth,
Is it true? CmdStan does not need Rtools? But it must be provided with a c++ compiler, right?

Regards,
Slawek

--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/t-8CUUHlwNM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.

Bob Carpenter

unread,
Aug 25, 2015, 5:36:35 PM8/25/15
to stan-...@googlegroups.com
Yes, we still need a C++ compiler, so even CmdStan recommends Rtools because
we keep Stan compatible with it. But other C++ toolchains can work --- we just
need a relatively recent C++ compiler and make.

- Bob

Daniel Lee

unread,
Aug 25, 2015, 7:58:17 PM8/25/15
to stan-users mailing list

We haven't tried a Windows compiler in a long time, but at v1.0 (3 years ago), Stan had been compatible with MSVC.

It doesn't need make if you can figure out the builds. If you're using g++ or clang++, it should be straightforward with make.

Seth Flaxman

unread,
Aug 25, 2015, 9:11:43 PM8/25/15
to stan-...@googlegroups.com
My mistake, I had thought this was a full Windows VM in the cloud where you could deploy whatever you wanted, so I was just thinking you'd be able to compile your model locally with CmdStan in Windows and then for production upload the .exe to the VM. 

Ben Goodrich

unread,
Aug 26, 2015, 12:23:47 AM8/26/15
to Stan users mailing list
On Tuesday, August 25, 2015 at 7:58:17 PM UTC-4, Daniel Lee wrote:

We haven't tried a Windows compiler in a long time, but at v1.0 (3 years ago), Stan had been compatible with MSVC.

It doesn't need make if you can figure out the builds. If you're using g++ or clang++, it should be straightforward with make.


It is not quite that bleak. In 2014, someone actually had MSVC somewhat working:

https://groups.google.com/d/msg/stan-users/A_WcImpwaYA/rePu_Tc-ICQJ

IIRC, there may have been some problem with the Boost we were using at the time being too old, which should have resolved itself once we upgraded to Boost 1.58.0.

Ben

UD1989

unread,
Sep 10, 2015, 12:01:54 AM9/10/15
to Stan users mailing list
To let everyone know, STAN runs on Azure Machine Learning just fine. I have not 'trained' a model yet, but I am using STAN in 'Fixed Param' mode to predict on 'test' data using parameters retrieved from the trining model on my local computer. I don't know if there will be any issues to run a training , but so far it seems stan performs exactly same as it does in my local PC
Reply all
Reply to author
Forward
0 new messages