我正在使用 SageMaker 来测试 ML 方法。我想将我的 SageMaker 脚本重构为更适合生产的代码。因此,我想像以前一样使用 VS Code 重构代码并在 SageMaker 实例上运行代码。VS Code Python 让你定义:
Python:指定 Jupyter 服务器 URI
SageMaker 通过运行为您提供 AuthorizedUrl
aws sagemaker create-presigned-notebook-instance-url --notebook-instance-name your-instance-name
当我在隐身浏览器中打开它时 AuthorizedUrl 工作。为什么它不适用于 VS Code?VS Code 询问密码。我在没有帮助的情况下尝试了多种方法:
VS Code 给了我这个错误:
无法连接到远程 Jupyter 笔记本。检查 Jupyter 服务器 URI 设置是否指定了有效的运行服务器...错误:无法连接到受密码保护的服务器。检查密码是否正确。
那么如何在 SageMaker 上的 VS Code 中运行代码?也许有比我正在尝试的更好的方法?
谢谢
[1] https://jupyter-notebook.readthedocs.io/en/stable/security.html