Use CoreML inside FilterDataProvider

Hi all,

I'm trying to use Core ML inside the FilterDataProvider in order to determine the sentiment of a given search query. The ML model is about 400 KB in size.

However, as soon as I try to initialise the model in code by doing this:

Code Block swift
let model = try? Sentiment(contentsOf: Sentiment.urlOfModelInThisBundle)


The extension gets killed by jetsam:

20:58:32.877130+0200 osanalyticshelper 201 0x2c548 Process FilterData [1030] killed by jetsam reason per-process-limit

Is this because Core ML is not supported within network extensions? Of is the process so constrained that even a relatively small model can't be loaded? And if it should be supported, how can I best debug this?

Thanks!


Answered by DTS Engineer in 675322022

Of is the process so constrained that even a relatively small model
can't be loaded?

This. The memory limits for NE providers are not officially documented (although you can find some rough guidelines here) but they are tight.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Accepted Answer

Of is the process so constrained that even a relatively small model
can't be loaded?

This. The memory limits for NE providers are not officially documented (although you can find some rough guidelines here) but they are tight.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Use CoreML inside FilterDataProvider
 
 
Q