kodeco.com Forums

Create ML Tutorial: Getting Started

In this Create ML tutorial, you'll learn how to transfer your learning to Turi Create, and gain familiarity with machine learning toolsets and terminology. No math needed!

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5653-create-ml-tutorial-getting-started

I ran out of time to try out the text classifier in this tutorial, so checkout Mattt’s awesome post Training a Text Classifier with Create ML and the Natural Language Framework: From Zero to Core ML Model in Minutes

1 Like

Thanks Audrey for this awesome jump start into Create ML! This article clarifies not only how to create ML models, but provides a starting point to discern the differences between these models (classifiers, detectors, recommenders, etc.).

Minor correction: The correct link to Michael Kennedy’s article is Comparison of Python and Apple’s Swift Programming Language Syntax – Michael Kennedy on Technology

Update circa macOS 10.15 Beta 2 and Xcode 10.0 beta 2: Trying to create an image classifier model in Create ML may not work.

On Xcode 10.0 beta 2 (10L177m) running on macOS 10.15 Beta 2 (10L176w), running the three-line CreateMLUI playground at the top of this article results in an error attempting to create the model right after the training phase:
generic(reason: "Error: Detected inf/nan values in feature(s) 'image_features', 'image_features', …

This issue is under active discussion in the Apple forums at https://forums.developer.apple.com/thread/104702.

1 Like

I get the following error.

error: cats dogs.playground:3:8: error: no such module ‘CreateMLUI’
import CreateMLUI

Xcode Version 10.0 beta 2 (10L177m) latest Mojave beta

After I drag the Pets100 directory onto the image classifier, the playground processes the images, but then starts generating errors after it’s gone through all of the images.

I’m running Mojave 18A314h and Xcode 10L176w.

Here’s my console output:

Extracting image features from full data set.
Analyzing and extracting image features.
| Images Processed | Elapsed Time | Percent Complete |
| 1                | 6.66s        | 0.75%            |
| 2                | 6.72s        | 1.75%            |
| 3                | 6.78s        | 2.75%            |
| 4                | 6.84s        | 3.75%            |
| 5                | 6.90s        | 4.75%            |
| 10               | 7.20s        | 9.75%            |
| 50               | 9.53s        | 49%              |
| 100              | 12.15s       | 98%              |
| 102              | 12.27s       | 100%             |
Automatically generating validation set from 10% of the data.
generic(reason: "Error: Detected inf/nan values in feature(s) \'__image_features__\', \'__image_features__\', \'__image_features__\',

Be sure you created a macOS playground and not an iOS playground. CreateMLUI doesn’t exist on iOS.

And if that’s the not problem, then we’ll have to wait for Audrey to chime in! :slight_smile:

You are exactly right. I was in too mush of a hurry to try this out.

Hi from Halls Creek. I’ll be online properly in a few days. This is just free cafe wifi now

Hi ,
In my case training failing with error “Detected inf/nan values in features__ image features”
I am trying with same data set given by you.

are you able to solve this problem? can you please suggest me the solution …

Scroll up to plasticbrain’s post about the same problem. It seems to be a Mojave beta 2 bug. I followed the link just now and saw no answers only reports of the same issue.

If you can rollback to Mojave b1 and Xcode b1, it should work.

Mojave Beta 3 + Xcode 10 Beta 3 seem to resolve the issue. :champagne:

I did encounter a bug where Mojave Beta 3’s installation seemed to go OK, but it didn’t update to Beta 3. Double check the build number after updating Mojave to ensure it did indeed update.

Issue is fixed with macOS 10.14 Beta 3 (18A326g) and Xcode 10.0 beta 3 (10L201y).

@dcdude Make certain you are using both macOS 10.14 Beta 3 & Xcode 10.0 beta 3. Xcode 10.0 beta 3 alone does not address the issue.

Fantastic! I upgraded to Beta 3 for both Xcode and Mojave, but there was an installation bug with Mojave. For some reason, the Beta 3 installation of Mojave ran without issue, but didn’t update to Beta 3. I downloaded Mojave Beta 3’s install and ran it again. I’ll be posting a radar on that. Thanks!

Thanks Audrey, AWESOME tutorial, very clear and super useful! : )

Im Stuck at:
Starting brute force nearest neighbors model training.
In [ ]:

Its been 14 hours already, tried 2 times and it always get stuck at this point.

Is this a bug? What you recommend to do?

hi Alexandre: what’s your cpu speed? try giving it a smaller data set?

it’s possibly a bug … Mojave beta 2 seemed to break something in Create ML that beta 3 fixed.

1 Like

Thanks Audrey!

But why would this could be related to Create ML? Im following the Turi Create tutorial…
Not sure about CPU speed, but I am using a MacBook Pro 2018, 16GB RAM.

I also upgraded to Mojave 3 and Xcode 3, but keep stuck at the same point, “Starting brute force nearest neighbors model training”.

Any solution you can think of?


Hi Audrey, I tried many times, but still get stuck… Could you please give a hand?