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

Posted on May 23, 2022 11:12 AM

Reply

Similar questions

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Failed to read mlmodelc package

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.