none
Jupyter Note for R --keep getting "kernel have died" error

    Question

  • <button aria-hidden="true" class="close" data-dismiss="modal" style="background-attachment:scroll;background-clip:border-box;background-image:none;background-origin:padding-box;background-background-repeat:repeat;background-size:auto;border:0px none rgb(0, 0, 0);color:#000000;cursor:pointer;float:right;font-size:19.5px;font-weight:700;line-height:19.53px;margin:-2px 0px 0px;opacity:0.2;padding:0px;text-shadow:rgb(255, 255, 255) 0px 1px 0px;-webkit-appearance:none;" type="button">I kee
    </button>

    I keep getting the following error message when it tries to execute the last line in the code block that follows.

    "Kernel Restarting

    The kernel appears to have died. It will restart automatically."

    library("AzureML")
    ws <- workspace('ae24c20fadf145f58c9547b6ee5591a9','bb03457a9f5b49e9b422d0ac6cc08e7d')
    dat <- download.intermediate.dataset(
      ws,
      experiment = "ae24c20fadf145f58c9547b6ee5591a9.f-id.fd74fff4f5d349ff8c0e005934486adb",
      node_id = "1356109b-5b3a-4e38-a4db-9f616c6dbb7e-3409",
      port_name = "Results dataset",
      data_type_id = "GenericCSV"
    )

    numCols <- c("temp", "hum", "windspeed", "hr")
    bike.scatter <- function(df, cols){
    require(ggplot2)
    for(col in cols){
    p1 <- ggplot(df, aes_string(x = col, y = "cnt")) +
    geom_point(aes(alpha = 0.001, color = "blue")) +
    geom_smooth(method = "loess") +
    ggtitle(paste('Count of bikes rented vs. ', col)) +
    theme(text = element_text(size=16))
    print(p1)
    }
    }

    bike.scatter(dat, numCols)


    FL

    Sunday, December 16, 2018 8:40 AM

All replies

  • Hi, 

    Interestingly, I just ran your code with the inbuilt bike rental dataset and it seems to run despite the warnings as shown below:

    Regards,
    Jaya

    Sunday, December 16, 2018 10:31 PM
  • Strange ! I tried like 10 times. I closed the Jupyter notebook. Re ran the experiment. Try again and again. Every time I got the "kernel died" message. No plot was generated !

    FL

    Monday, December 17, 2018 5:39 AM
  • Hi, 

    I used Edge browser when testing the code. Could you try accessing the Jupyter notebook using another browser? I am not sure why you encounter the issue with dead kernel, perhaps someone else in the forum might have some additional suggestions.

    Regards,
    Jaya 

    Tuesday, December 18, 2018 3:38 AM
  • Hi Jaya, I tried both edge and chrome and in both cases, kernel died. But I was able to run successfully in R studio.

    I can send you data and code if there is a way to attach code.

    Thanks,

    Fred


    FL

    Tuesday, December 18, 2018 5:38 AM
  • Hi, 

    Perhaps the engineering team might be able to help debug the kernel issue. 

    Regards,
    Jaya

    Tuesday, December 18, 2018 9:24 PM
  • Hi Jaya, Would you be able to contact your engineering team ?

    Thanks,

    Fred


    FL

    Wednesday, December 19, 2018 12:34 AM
  • Hi Fred, 

    Sure, I sent a note to the team, hopefully someone will get back to you via the forum.

    Regards,
    Jaya

    Wednesday, December 19, 2018 3:43 AM
  • Hi, 

    After checking with the engineering team, they suspect you are hitting the memory limits when running with the full data set in one time. Their suggestion would be using a subset data instead for experiment purpose only.

    https://docs.microsoft.com/en-us/azure/machine-learning/r-developers-guide#azure-notebooks

    The team also mentioned that they track issues via this GitHub: 

    https://github.com/Microsoft/AzureNotebooks

     

    GitHub - Microsoft/AzureNotebooks: Repo for tracking issues and hosting samples for Azure Notebooks

    Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.

    github.com

     

    Regards,
    Jaya



    Wednesday, December 19, 2018 4:03 AM
  • Hi Jaya, 

    Thank you for the follow up. I will give it a try. But the data set is really small. It only has about 17k rows of 13 columns. The CSV file size is only 1.3 M bytes. The data set is used in the edx machine learning course. I would be very surprised if the notebook cannot handle such small amount of data. In fact, it used to work months ago.

    Thanks,

    Fred


    FL

    Wednesday, December 19, 2018 4:34 AM
  • Hi Jaya, 

    OK, I used 100 rows of data and it ran.. But I thought the original the data set is really not big. It only has about 17k rows of 13 columns. The CSV file size is only 1.3 M bytes. The data set is used in the edx machine learning course. I am very surprised that the notebook cannot handle such small amount of data.The fact is it used to work months ago. Is there anyway I can increase the memory in the Notebook ?

    Thanks,

    Fred


    FL

    Friday, December 21, 2018 6:31 AM
  • I posted message here.

    https://github.com/Microsoft/AzureNotebooks

    But no one responded after several days !


    FL

    Saturday, December 22, 2018 6:17 PM
  • Help !

    FL

    Saturday, January 5, 2019 5:08 AM