Create a job that goes through H2O Flow automatically - apache-spark

I have created a flow to predict something with the distributed random forest model and now i want to predict every few days, without using the flow gui.
So is there a way to automate your H2O Flow or to translate the entire script into java/python to automatically run the flow?

You should be using RESTful API to work with H2O backend like the way FLOW works. Based on RESTful API you can create a fully automated solution in a RESTful supported language to get it working.

I found the answer myself there is a RestAPI I can use to do everything that i can do in the H2O Flow gui. FYI

Related

Does the SmartHealthIt or Cerner SMART on FHIR sandbox support write operations?

I'm working on testing SMART on FHIR applications, specifically the asbi screening application here: https://github.com/asbi-cds-tools/asbi-screening-app .
I'm able to get the app to run locally and I can test the app using the SmartHealthIt testing tool here: https://launch.smarthealthit.org/ .
The application runs and I am able to complete the questionnaire. When I hit the final submit button everything seems to complete without error.
However, none of the survey data seem to be written to the patient record.
Does the https://launch.smarthealthit.org/ support writing data from the SMART on FHIR application being tested? Is there an example application that does this?
Does the Cerner application (https://code.cerner.com/developer/smart-on-fhir/apps) support writing patient data from a SMART on FHIR application? Is there an example application that demonstrates this?
Is there a different sandbox that supports this functionality?
The SMART App Launcher is a simulator to replicate the process of launching a SMART on FHIR app. Whether writing data is permitted ultimately comes down to whether the FHIR server accepts writing operations like create and update. Per the CapabilityStatement, the SMART R4 open endpoint does for various resources. Cerner, Epic, and support writing operations as well. Your best bet is likely to review the documentation for the sandbox(es) you're interested in and determine what capabilities are available that align with your desired workflow.

Accessing spark program via APIs

I have a spark mlib program up and running that applies nlp on free text. I would need to access this program through rest apis. For eg: I need to apply ml on each rows of an excel sheet (convert each rows and get back results from the above ml program) by calling these APIs. How would I do that? basically trying to have an API wrapper around a spark program instead of going to jupyter notebook and manually doing it.
If you want to predict only via the rest API then your best solutions could be:
-Convert your model to PMML and make a web app to consume it
-Convert your model to MLeap and use the mleap-serving/mleap-spring-boot to host your machine learning model.
You can also implement spark in a web env, but you should consider the resource-heavy operations what spark needs.
Also you can use any scala IDE to work on your project. I prefer Intelij IDEA, but you can use Eclipse also. (you don't have to, you can simply export to PMML/Mleap from Jupiter)

Use Salesforce API to extract data into Alteryx

I have an Alteryx workflow and wanted to hook it up to import data from Salesforce, specifically Veeva (which sits on Salesforce). I want to use the Salesforce API but not sure how I can do this simply with Alteryx.
Is it possible to use Alteryx with some other software/framework to import data and run it through my ETL process?
I've heard I can possibly use Apache Spark but i'm not familiar with it. I've also heard I can possibly use Alteryx with Apache Camel but not sure about this either. Thanks!
You can find out how to connect to an API in Alteryx at this link:
https://community.alteryx.com/t5/Engine-Works-Blog/REST-API-In-5-Minutes-No-Coding/ba-p/8137
With the Salesforce API, sometimes it can be easiest to use the SOAP API for Authentication and the REST API for download. I'm not entirely sure why, but both Alteryx & Tableau do that behind the scenes for connections.
Basically, you will call out to the SOAP API for authentication, get the Auth Token and use that on subsequent calls to the REST API. The above link should tell you how to implement that in Alteryx.
As for other software/framework for import, the simple answer is Yes. The Tools to look at for this are the R Tool & Run Command Tool. They will let you either import data using an R script or from Command Line (allowing python, js, batch etc).
Spark is supported in Alteryx both natively and using the In-DB scripts. Theoretically you could use Alteryx with Apache Camel, but I don't know enough about the specifics of the Camel endpoints to say that with certainty.

How to deploy Deep Learning Model(Python) to web app(Node)

Hi I am very interested in machine learning.
familiar with keras and tensorflow and know how to train model and save it.
I want to build node.js(loopback) web application that provides machine learning API.
I'm quite new to web application and don't know how to utilize python code in the node app.
To be specific, I'm trying to make deep style application like this site for practice purpose.
For codes that is open to public in github. most starred implementation is in torch and
I am currently looking (TF).
It has script work as "main.py" that consists of
1) loading pretrained VGG model(about 500Mb) to memory.
2) and using each framework's function, it create output photo inside folder
So I want to run this with GPU instance in AWS
problem is, I don't know how to call "main.py" inside javascript.
Q1 How did many machine learning based services achieved this??
did they implement their server in python like django to load trained model and inference from it?
But I want to integrate in node.js especially loopback. how can I achieve this in a most efficient and common way??
Q2 Is calling "main.py" efficient whenever there's request to server?
I mean, If the script is called everytime request is made, It loads 500Mb object to memory all the time and that's so inefficient.
and as far as I know AWS GPU instance can utilize 4 GPU at a time. I wonder how can I utilize all of it with most efficient and common way...
Thank you for reading!
I'm too frustrated with myself... I really want to know method deploy my model to server
and thank you in advance
You can communicate between NodeJS and e.g. Django with a REST interface. Deploy a Django server with the REST framework and call an url from NodeJS. This way, you can trigger the python code. You can also let the python code call your NodeJS with another REST interface on the javascript side if that is needed.

will restAssured work with rest input parameters coming from excel sheet? Has anyone tried it?

I have been asked by my boss to find a tool or design one for testing rest services hosted in cloud environment. He also asked me if I can read the input data from excel sheet so that other junior members can write tests in excel. I have created keyword driven framework using Apache poi so I know how to read data from excel in Java program. I have also worked on httpClient, so I can tie these together. But I am hearing a lot about rest assured and want to know can I use rest assured where input can be read from excel. Is it worth spending time on? Also with cloud infrastructure which approach is best? Thanks.
You can safely proceed with your boss's request, since there is no link between Excel Inputs & REST assured framework, as both of them are separate jars.
You can read test inputs/outputs from excel and use them in REST assured. REST assured provides an easy to implement REST testing DSL with BDD flavor.
The following link gives you a quick getting started tutorial.
http://www.hascode.com/2011/10/testing-restful-web-services-made-easy-using-the-rest-assured-framework/

Resources