简体   繁体   中英

How do you call workbook logic from slate within foundry?

What is the Best way to send request (input-data) from foundry-slate to the workbook, trigger the python code and get response(python-output) without refreshing the page?

I would recommend you to look into Functions which is the correct way to handle real time responses. You can define your functions in a repository and call them from slate with whatever inputs you need.

Calling a pyspark from slate sounds a bit like a bad idea given that it could get queued or take more time than the user is expecting. Also I don't believe this behaviour is supported.

To go a step further on @fmsf answer, Foundry Machine Learning "Live" provides tooling to wrap a Python model built in a workbook - or built off the platform and packaged up - into a Scenario that you can then interact with from a Function (or you can implement your model directly in Typescript).

This would let you call if from Slate or hit it using the Function Executor API or use it in Workshop, etc. However Live isn't available on all Foundry instances, so if you've got a point of contact with a Palantir engineer, reach out to them to see if you can get more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM