-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Instructions don't work. Cant create CoreML model, crashes #112
Comments
Are you on a python installed by homebrew? Currently, coremltools doesn't work with that Python version. This could explain your current crash. |
Yes I am on Python installed by homebrew. How do I install a version of python that works with this project since it seems like it's so picky about the version & install method??? |
Hi @amayers , thank you for taking interest in Turi Create! The documentation issue have already been fixed, as you can see here. As @srikris have mentioned - the CoreML team is aware of the problem with Homebrew.
All of which have been tested and work well with both turicreate and coremltools. |
Hi @igiloh I would have loved to use the native python version that ships with macOS, however Turi Create isn't even found when you try to use |
Hi @amayers, thanks again for the further input. I've just re-tested on a clean macOS10.12 and 10.13 machines - and on both I was able to successfully perform
I was also able to create a model and export it to Core ML. Which macOS version are you using? |
I just uninstalled python from homebrew leaving just the system python installed.
Then I recreated the virtual environment:
I also tried again adding the I'm running macOS 10.13.2 (17C88), and pip: |
As mentioned in the documentation, turicreate only supports python 2.7 at the moment. Any python 2 version from 2.7.8 and up to the latest 2.7.14 (released 9/2017) should work. macOS 10.13 comes natively with python 2.7.10, and should support the turicreate package out of the box. |
For the macOS native python, it should look like this. (It seems you have another version of python installed)
If you see As @igiloh mentioned, your Python seems to be 3.6 which isn't yet supported (we will be fixing that soon). So Python 2.7 should work. |
After I installed Anaconda 2.7 it now works. But this is the first time I've done any python on this machine, and it had 3.6 on it. I guess some 3rd party app updated it? |
So I'm trying to make my first model. First the installation instructions are incorrect, if you follow them to the T, they fail with a non useful error on
pip install -U turicreate
. Turns out this project requires you to downgrade to an ancient Python version. How about the installation instructions include that detail, or better yet, make it work with the current version that ships on all Macs.Ok, so I worked around that, and started on replicating https://apple.github.io/turicreate/docs/userguide/image_classifier/introduction.html to make sure everything is working properly before I go through the work of gathering real training data.
I downloaded the following images into a
images
folder, with a subfolder fordogs
andtractor
dog_urls.txt
tractor_urls.txt
I copy/pasted the sample code into a new python file and just change the paths.
Then go to run it
python <file_just_created>.py
and it fails becausesf = tc.image_analysis.load_images('train', with_path=True)
writes tosf
but the rest of the file expects it to bedata
. Another incorrect doc, but easy enough to fix. Changedsf
todata
and it runs, and I can see that the SFrame matches what I'd expect. Now I copy & paste the next code snippet from the guide, just changing the file names.It goes off and processes for a few minutes as expected, then fails in the export to CoreML step:
I know its getting past the
model.save('mymodel.model')
line fine as I can see that file being created, and have even been able to open it in another python script successfully.How do you actually get this thing to export the CoreML file?
The text was updated successfully, but these errors were encountered: