Search code examples
swiftmachine-learningbert-language-model

Swift Metal Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED BERT Model


I've recently been working on an app where a user can ask questions about a text and the app will print out the answer. For that, I used the Apple Finding Answers to Questions template, which is powered by BERT. This template worked just fine, until yesterday when it always printed out the error message:

Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED

when executing the BERT inference code:

let answer = self.bert.findAnswer(for: searchText, in: detail.body)

I haven't changed anything of the code, so this seems like a bug, does anyone know how to solve it or did anyone have similar problems?


Solution

  • I was able to resolve the issue by cleaning my build folder, therefore this issue seemed to be caused by corrupted cache files.