Sagemaker PySpark:内核死亡

c3p*_*3p0 2 pyspark jupyter amazon-sagemaker

我按照此处的说明设置了EMR群集和SageMaker笔记本。直到最后一步,我才没有任何错误。

当我在Sagemaker中打开新笔记本时,会收到以下消息:

The kernel appears to have died. It will restart automatically.
Run Code Online (Sandbox Code Playgroud)

然后:

        The kernel has died, and the automatic restart has failed.
        It is possible the kernel cannot be restarted. 
        If you are not able to restart the kernel, you will still be able to save the 
notebook, but running code will no longer work until the notebook is reopened.
Run Code Online (Sandbox Code Playgroud)

这仅在我使用pyspark / Sparkmagic内核时发生。使用Conda内核或任何其他内核打开的笔记本可以正常工作。

我的EMR群集完全按照说明进行设置,并增加了一条规则:

[
  {
    "Classification": "spark",
    "Properties": {
      "maximizeResourceAllocation": "true"
    }
  }
]
Run Code Online (Sandbox Code Playgroud)

我会很感激为什么发生这种情况以及如何调试/修复的任何指示。

PS:过去,我已经成功完成了此任务,没有任何问题。今天当我尝试重新执行此操作时,遇到了这个问题。我尝试重新创建EMR群集和Sagemaker笔记本,但这没有帮助。

小智 5

感谢您使用Amazon SageMaker。

这里的问题是Pandas 0.23.0更改了名为DataError的核心类的位置,并且SparkMagic尚未更新为要求来自正确名称空间的DataError。

此问题的解决方法是使用降级SageMaker Notebook实例中的Pandas版本pip install pandas==0.22.0

您可以在此开放的github问题https://github.com/jupyter-incubator/sparkmagic/issues/458中获取更多信息。

让我们知道是否还有其他方法可以提供帮助。

谢谢
Neelam