Failed to read mlmodelc package
Hello Team,
I am trying to training the model on device and after training i want to run the model from file.
do {
let classificationRequest: VNCoreMLRequest? = {
do {
let modelURL = ModelUpdater.updatedModelURL
let url = try MLModel.compileModel(at: modelURL!)
let model = try VNCoreMLModel(for: MLModel(contentsOf: url))
let request = VNCoreMLRequest(model: model, completionHandler: { [weak self] request, error in
self?.processClassifications(for: request, error: error)
})
request.imageCropAndScaleOption = .centerCrop
return request
} catch {
return nil
}}()
if let request = classificationRequest{
try handler.perform([request])
}
}catch {
print("Failed to perform \n\(error.localizedDescription)")
}
FaceExpressionsTrainer[30027:2168609] [coreml] Failed to read model package at file:///var/mobile/Containers/Data/Application/0F05D7B2-1BC9-412C-83F5-42D26B97E65D/Library/Application%20Support/personalized.mlmodelc/. Error: A valid manifest does not exist at path: /var/mobile/Containers/Data/Application/0F05D7B2-1BC9-412C-83F5-42D26B97E65D/Library/Application Support/personalized.mlmodelc/Manifest.json