xcode 10 beta2 CoreML training does not work

Hello every developer here,


In the beginning of June, I have update my macOS to Mojave 10.14 beta 1. I got a chance to play with Playground and new feature, ImageClassifer of Xcode 10.0 beta 1. I have tested some dataset and got some trained model (.mlmodel)


But since yesterday, I updated my macOS to 10.14.beta 2, and new XCODE 10 Version 10.0 beta 2 (10L177m). the ImageClassifer does not work anymore, even with the same dataset that I have played with xcode 10.0 beta1. Then I drag the folder in the ImageClassifer, the errors are reported as bellow:


Automatically generating validation set from 5% of the data.

generic(reason: "Error: Detected inf/nan values in feature(s) \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\',

(same lines go here)

\'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\', \'__image_features__\'. Cannot proceed with model training.")

No model!


i have no idea about this issue, it might be a bug ? anyone got the same error as me ?


Thanks

Replies

Yes. I have the same issue.

Do you know how to report a bug ?I think that is a bug since beta2 release.

I have reported as a bug (#41296510).

let us wait then. Maybe someone else can give us a working solution.


We may try with caffe2 or pytorch or Turi to train the model for the momennt

I reported as well. I believe it's related to Xcode 10 Beta 2, not Mojave Beta 2.

I have tried with Xcode 10 beta1 on Mojave Beta2, not working as Beta2. We need to another update of Xcode and Mojave from Apple.

It seem been fixed in macOS 10.14 beta 3.

Hi folks,


Whilst we're not training in CoreML (we're using Microsoft Custom Vision exported ML), i think this might be related.


Just found something really weird relating to XCode 10 and CoreML Models. I am running XCode 9.4.1 and 10.0 beta 2 side by side.

We have an image classifier program that is working fine on an iphone using a coreml model file downloaded from Microsoft Custom Vision.


When we compile the app with XCode 9.4.1 and deploy it to the phone it works fine, classifying without error. Our Video feed classification results are presented in a UITableView with their confidence factors and eveything is refreshing in realtime okay.


However, when we compile THE EXACT SAME SOURCE CODE with 10.0 beta 2 and deploy it to the phone, suddenly some of the classifications are incorrect. Not just incorrect, they don't come up in the observations list at all. There are no changes to the project at all (we haven't swapped anything other than the Xcode version).


We thought we had screwed up some code somewhere and we were backtracking line-by-line through the changes we made over the last couple of weeks but very surprised to learn that Xcode 10.0 beta 2 has something in it that messes with the accuracy of the classifications in the coreml model.


I must say, some items still appeared to classify okay, but others didn't. All in all, probably wasted 3 days debugging for no reason.


Hoping that whatever is causing this is uncovered and fixed before XCode 10 becomes the GA release.

You’ve strayed a long way from the original issue here (that is, CoreML in playgrounds). My recommendations:

  • It’s possible that this is a bug in Xcode, but it’s also possible that this change in behaviour is caused by a deliberate ‘linked on or later’ check.

  • If you’re convinced it’s the former, you should definitely file a bug report about the problem.

  • If you suspect it’s the latter, or are not sure, I recommend that you open up a new thread in System Frameworks > Machine Learning, where you’re more likely to attract the attention of folks with CoreML experience (and that’s certainly not me)-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"