英文:
jupyter notebook not opening in Azure ML studio
问题
当我下载并尝试在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.
答案1
得分: 0
请检查你下载的版本,确保它看起来像这样:
- 正确的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:
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 -->
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "4e082724-c77a-4188-889a-fb5eb028d298",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
...
<!-- end snippet -->
- Incorrect HTML downloaded from Github:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-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">
...
<!-- 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论