Group Group Group Group Group Group Group Group Group

Machine Learning: The Kernel appears to have died. Always when I am loading a large file


#1

For anyone that is involved with Python and turicreate / CoreML.

I am using Jupyter notebooks for creating aML Model with TuriCreate.

The steps that I am following are the above.

I have download a .csv and .json (same file) from https://www.kaggle.com/zynicide/wine-reviews

The file has 51 MB size.

I have made an environment turienv From Anaconda Navigation and the following steps work perfect for smaller CSV / JSON files.

  1. source activate turienv
  2. pip install turicreate=5.0
  3. Jupiter notebook

----inside Notebook----

import turicreate as tc

wine_data = tc.SFrame.read_json('winemag-data-130k-v2.json', orient='records')

wine_data.head() <-- I see that everything is loaded properly

wine_model = tc.text_classifier.create(wine_data,'title',features=['description'])

PROGRESS: Creating a validation set from 5 percent of training data. This may take a while.
          You can set ``validation_set=None`` to disable validation tracking.

Logistic regression:
--------------------------------------------------------
Number of examples          : 123481
Number of classes           : 113404
Number of feature columns   : 1
Number of unpacked features : 21030
Number of coefficients      : 2384978493
Starting L-BFGS
--------------------------------------------------------
+-----------+----------+-----------+--------------+-------------------+---------------------+
| Iteration | Passes   | Step size | Elapsed Time | Training Accuracy | Validation Accuracy |
+-----------+----------+-----------+--------------+-------------------+---------------------+

And then in about 3-4 minutes I get error msg = The Kernel appears to have died.

Could anyone help?? I am new in Python and Jupyter is only env I have worked with. If there is an other env that I could run the same things with some guidance to have a more solid error msg that I could debug please let me know.

Edited: I am running the above on a 2018 MacBook Pro 16GB 512GB. I see on Activity Monitor Memory for python goes to 130GB and CPU 83%

Thanks in Advance


Natural Language Processing on iOS with Turi Create
#2

@audrey Can you please help with this when you get a chance? Thank you - much appreciated! :]


#3

thanks @shogunkaramazov for the ping

hi scy, are you also grNorway on the apple/turicreate forum? have you tried TobyRoseman’s last suggestion?

Also, look at Matt Thomson’s tutorial using the Create ML text classifier — in Swift :slight_smile: — uses the same algorithms as TuriCreate, but with some features that help it run better on Macs.