1

Thread 63: signal SIGABRT - partway through creating an MLModel

I'm at a loss for how to approach this error. I get this on the 50,300th iteration of creating an MLModel, so the normal MLModel issues. For example, if the target column has the wrong values, I would have been notified, before it started iterating etc. I'm not sure what code to post, but I'll post my ML initialization code here. You'll see that the max iterations was set to 60,000 so it hasn't even finished through all the iterations.


    
    @discardableResult
    func createModel(with path: String) throws -> (URL, MLModel) {
        let startTime: Date = Date()
        let model = try MLBoostedTreeClassifier(
            trainingData: try MLDataTable(contentsOf: self).randomSplit(by: 0.8, seed: 0).0,
            targetColumn: .target,
            parameters: .init(maxIterations: 60_000)
        )
        let url = URL(
            fileURLWithPath: path + (path.contains(".mlmodel") ? "" : ".mlmodel")
        )
        try model.write(
            to: url,
            metadata: nil
        )
        print("completed in \(startTime.timeIntervalSinceNow / 60) minutes.  Please open the project and run.")
        return (url, model.model)
    }


enter image description here

Maybe my iMac is a 2017 and so it doesn't have the proper chip to handle the ML? I'm not sure. Any guidance would be helpful.

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
  • Looks a like a bug in Create ML. The `ud2` instruction that it is crashing on is inserted by the compiler when code has undefined behavior. Since this does not appear to be any of your code, it must be something in the Create ML framework. – Matthijs Hollemans Jan 18 '21 at 10:21
  • Bummer. Thanks @MatthijsHollemans – ScottyBlades Jan 18 '21 at 22:19
  • You could try training a `MLDecisionTreeClassifier` or `MLSupportVectorClassifier` to see if you get the same error with those. – Matthijs Hollemans Jan 19 '21 at 10:52

0 Answers0