简体   繁体   English

您如何从铸造厂的石板中调用工作簿逻辑?

[英]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?将请求(输入数据)从 Foundry-slate 发送到工作簿、触发 python 代码并在不刷新页面的情况下获得响应(python 输出)的最佳方式是什么?

I would recommend you to look into Functions which is the correct way to handle real time responses.我建议您查看 Functions ,这是处理实时响应的正确方法。 You can define your functions in a repository and call them from slate with whatever inputs you need.您可以在存储库中定义您的函数,并使用您需要的任何输入从 slate 调用它们。

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.从 slate 调用 pyspark 听起来有点像一个坏主意,因为它可能会排队或花费比用户预期更多的时间。 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). 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 (或者您可以直接在 Typescript 中实现您的 model)。

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.这将让您从 Slate 调用或使用 Function 执行器 API 或在 Workshop 等中使用它。但是 Live 并非在所有 Foundry 实例上都可用,所以如果您与 Palantir 工程师有联系,与他们联系,看看您是否可以获得更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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