Search code examples
azureazure-machine-learning-serviceazure-openai

jupyter notebook not opening in Azure ML studio


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.

enter image description here


Solution

  • I've managed to download the notebook you referred to and load it on Azure Machine Learning: AML working notebook

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

    • Correct json notebook structure:

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

    • Incorrect HTML downloaded from Github:

    <!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">
    ...

    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.