Compiles a model on the device to update the model in your app.
The local file path to your downloaded .mlmodel file.
The local file path to the compiled model (the .mlmodelc file).
Use this method to compile a model for your app. The source .mlmodel file must be on the device. You can either use URLSession or CloudKit to download the model for your app. Pass the compiled model to init(contentsOf:) to create an instance of your model.
Compiling can be time consuming and shouldn't be done on the main thread.
Also, avoid repeating the download and compile processes when possible. The model is compiled to a temporary location. If the compiled model can be reused, move it to a permanent location, such as your app's support directory.