Azure ML工作室中无法打开Jupyter Notebook。

huangapple go评论57阅读模式
英文:

jupyter notebook not opening in Azure ML studio

问题

此文件是否有问题 - https://github.com/Azure-Samples/Azure-OpenAI-Docs-Samples/blob/main/Samples/Tutorials/Embeddings/embedding_billsum.ipynb

当我下载并尝试在Azure ML Studio中打开它时,出现错误渲染失败,错误信息:ipynb文件的内容不是有效的Jupyter笔记本JSON。

英文:

Is there something wrong with this file - https://github.com/Azure-Samples/Azure-OpenAI-Docs-Samples/blob/main/Samples/Tutorials/Embeddings/embedding_billsum.ipynb

When I download it and try to open it in azure ml studio, I get error Rendering failed with error: Content of the ipynb file is not valid jupyter notebook JSON.

Azure ML工作室中无法打开Jupyter Notebook。

答案1

得分: 0

我已成功下载你提到的笔记本并在Azure机器学习上加载:
Azure ML工作室中无法打开Jupyter Notebook。

请检查你下载的版本,确保它看起来像这样:

  • 正确的JSON笔记本结构:
{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 1,
      "id": "4e082724-c77a-4188-889a-fb5eb028d298",
      "metadata": {},
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            // ...
          ]
        }
      ],
      // ...
    }
  ]
}
  • 从GitHub下载的错误HTML:
<!DOCTYPE html>
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system">
  <head>
    <meta charset="utf-8">
    <link rel="dns-prefetch" href="https://github.githubassets.com">
    <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
    <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
    <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
    <link rel="preconnect" href="https://github.githubassets.com" crossorigin>
    <link rel="preconnect" href="https://avatars.githubusercontent.com">
    // ...
  </head>
  // ...
</html>

如果通过右键点击链接并选择“另存为”出现此错误格式,作为替代,在Chrome中转到文件的原始版本,右键点击并选择“另存为”,保留扩展名.ipynb。然后在AML中应该可以使用。

英文:

I've managed to download the notebook you referred to and load it on Azure Machine Learning:
Azure ML工作室中无法打开Jupyter Notebook。

Please, take a look on the version you've downloaded to check if it looks like this:

  • Correct json notebook structure:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

{
 &quot;cells&quot;: [
  {
   &quot;cell_type&quot;: &quot;code&quot;,
   &quot;execution_count&quot;: 1,
   &quot;id&quot;: &quot;4e082724-c77a-4188-889a-fb5eb028d298&quot;,
   &quot;metadata&quot;: {},
   &quot;outputs&quot;: [
    {
     &quot;name&quot;: &quot;stdout&quot;,
     &quot;output_type&quot;: &quot;stream&quot;,
     &quot;text&quot;: [

...

<!-- end snippet -->

  • Incorrect HTML downloaded from Github:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot; data-color-mode=&quot;auto&quot; data-light-theme=&quot;light&quot; data-dark-theme=&quot;dark&quot; data-a11y-animated-images=&quot;system&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;link rel=&quot;dns-prefetch&quot; href=&quot;https://github.githubassets.com&quot;&gt;
  &lt;link rel=&quot;dns-prefetch&quot; href=&quot;https://avatars.githubusercontent.com&quot;&gt;
  &lt;link rel=&quot;dns-prefetch&quot; href=&quot;https://github-cloud.s3.amazonaws.com&quot;&gt;
  &lt;link rel=&quot;dns-prefetch&quot; href=&quot;https://user-images.githubusercontent.com/&quot;&gt;
  &lt;link rel=&quot;preconnect&quot; href=&quot;https://github.githubassets.com&quot; crossorigin&gt;
  &lt;link rel=&quot;preconnect&quot; href=&quot;https://avatars.githubusercontent.com&quot;&gt;

...
<!-- end snippet -->

This incorrect format usually happens if you right-click the link and select the "Save Link as" option. As an alternative, on Chrome, go to the raw version of the file, right-click and select "Save as", keeping the extension ipynb. Then, in AML, it should work.

huangapple
  • 本文由 发表于 2023年4月11日 06:07:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75981098.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定