python - eli5 输出中的 Databricks pyspark IPython.core.display.HTML 错误
问题描述
XGBoost 使用 eli5 以 HTML 格式显示预测打印结果,这在 Databricks 的 pyspark 中不起作用。
并displayHTML(file_name)
给出错误:
Py4JException:Python 代理引发了异常。返回信息:x
我也安装了 ipython 库。即使对于这个简单的查询,它也会给出错误。
from IPython.display import display, HTML
from IPython.core.display import display, HTML
display(HTML('<h1>Hello, world!</h1>'))
print("Here's a link:")
display(HTML("<a href='http://www.google.com' target='_blank'>www.google.com</a>"))
print("some more printed text ...")
display(HTML('<p>Paragraph text here ...</p>'))
我得到的输出/错误是:
<IPython.core.display.HTML at 0x7f63e0c5d5f8>
Here's a link:
<IPython.core.display.HTML at 0x7f6408fbe358>
some more printed text ...
<IPython.core.display.HTML at 0x7f6408fbe358>
解决方案
推荐阅读
- java - 如何计算数字列表的唯一“签名”?
- javascript - 获取最近的上一个日期,在不修改原始数组的情况下进行排序
- javascript - 传播一个类实例
- javascript - Discord.js 机器人为表情符号挑选肤色
- react-native - 在 ReactNative createBottomTabNavigator 中设置屏幕标题
- r - 如何在 R 中编写函数
- javascript - 从数组调用异步函数
- spring - 如何使用带有 Spring 的 DelegatingSecurityContextScheduledExecutorService 配置正常关闭
- terraform - 如何设置最低 Tls 版本
- javascript - 从内存node.JS中删除变量