8

When I attempt to train a CreateML model, I get the following screen after inputting my training data:

Create ML error message

I am then unable to add my test data or train the model. Any ideas on what is going on here?

[EDIT] As mentioned in my comment below, this issue went away when I removed some of my training data. Any newcomers who are running into this issue are encouraged to try some of the solutions below and comment on whether it worked for them. I'm happy to accept an answer if it seems like it's working for people.

Peter Lu
  • 157
  • 2
  • 11
  • The error went away when I removed some of my training data, perhaps there's a data size cap? – Peter Lu Jan 02 '21 at 01:30
  • I'm also seeing this error. Not great at reading logs on Mac, but here's a log: `Fatal error: 'try!' expression unexpectedly raised an error: tc_flex_SequenceType index out of bounds.: file CreateML/SequenceType.swift, line 35` – Nate Lowry Jan 04 '21 at 17:58
  • @PeterLu any pattern in the data you removed that caused the error to go away? – Sean Williams May 29 '21 at 22:29

4 Answers4

2

This happens when the first picture in the dataset has no label. If you place a labeled photo as the first in the dataset and in the coreML json, you shouldn't get that issue.

Correct:

[{"annotations":[{"label":"Enemy","coordinates":{"y":156,"x":302,"width":26,"height":55}}],"imagefilename":"Enemy1.png"},{"annotations":[{"label":"Enemy","coordinates":{"y":213,"x":300,"width":69,"height":171}}],"imagefilename":"Enemy7.png"},{"annotations":

Incorrect:

[{"annotations":[],"imagefilename":"Enemy_v40.png"},{"annotations":[],"imagefilename":"Enemy_v41.png"},{"annotations":[],"imagefilename":"Enemy_v42.png"},{"annotations":

1

At the minimum you should check for these 2 situations, which triggered the same generic error for me (data analysis stopped), in the context of an Object Detection Model:

  • One or more of the image names referenced in annotations.json is incorrect (e.g. typo in image name)
  • The first entry in annotations.json has an empty annotations array (i.e. an image that does not contain any of the objects to be detected)
Hugo
  • 974
  • 9
  • 21
0

If you are using any random Split or something similar, make sure, its parsing the data correctly. you can test this easily by debugging.

Hefaz
  • 526
  • 1
  • 8
  • 24
  • Not doing any splits or other pre-transformations. Just having it automatically segment out the validation data. How does one debug CreateML? I looked for the source, but didn't have any luck... – Nate Lowry Jan 11 '21 at 21:38
0

I suggest you check to see if your training data is consistent and all entries have all needed values. The error is likely in the section of data you removed.

That would cause the error Nate commented he is seeing when he gets that pop up.

Getting the log would be the next step in any other evaluation.

Derek S.
  • 348
  • 1
  • 7
  • Thanks for the info. What ”consistency" would you start with? I checked format, dimensions, all frames are in the json file, etc. but maybe there's other attributes to check? – Nate Lowry Jan 11 '21 at 21:36
  • Also, I couldn't get much more info out of the logs, even in the stack trace. Will take another look and see tho – Nate Lowry Jan 11 '21 at 21:37