coremltools: Cant save on device updated trained model

Trying to save model to support directory try model.write(to: permanentUrl)

  • Cant save the model

Error Domain=com.apple.CoreML Code=6 "Failed to save model to <file path>

UserInfo={NSLocalizedDescription=Failed to save model to <PATH-TO_MODEL>model.mlmodelc. This issue may occur when saving a dense layer that does not contain a bias, if this is the case please file a bug report.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26

Most upvoted comments

thanks for the help, i got it working now

On Thu, Sep 12, 2019 at 11:33 AM anilkatti notifications@github.com wrote:

Sorry about the delay @BhavinSuthar https://github.com/BhavinSuthar . I finally got to try this on an iPad running 17A5831C build of iOS. And, my Xcode version is Version 11.0 (11A419c), which I believe is what you are using. If not, please use this version (it is available on developer.apple.com).

Unfortunately, I could not repro the failure 😦

Here are the logs:

2019-09-11 22:58:11.810459-0700 Temp[428:46648] Metal API Validation Enabled 2019-09-11 22:58:12.043726-0700 Temp[428:46648] [framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn’t find Assets.car in bundle with identifier: ‘com.apple.Temp’ 2019-09-11 22:58:12.043998-0700 Temp[428:46648] [framework] CoreUI: RunTimeThemeRefForBundleIdentifierAndName() couldn’t find Assets.car in bundle with identifier: ‘com.apple.Temp’ Predicted value with base model before training: String : 9 2019-09-11 22:58:13.024591-0700 Temp[428:46648] [espresso] Training kernels not enabled for engine: 100 MLUpdateProgressEvent(rawValue: 1) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) MLUpdateProgressEvent(rawValue: 2) Predicted value with updated model before checkpointing: String : 7

file:///var/mobile/Containers/Data/Application/8B0217BE-E74D-47AB-ACC1-D2B8E1CB4E5F/Library/Application%20Support/v2.mlmodelc/

file:///var/mobile/Containers/Data/Application/8B0217BE-E74D-47AB-ACC1-D2B8E1CB4E5F/Library/Application%20Support/v2.mlmodelc/ Predicted value with reloaded model after checkpointing: String : 7

I highly doubt there’s a hardware-specific bug here, but, the next thing for me to try is using the hardware you are using for your tests. Could you please tell me the version of iPhone / iPad you are using for these tests?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apple/coremltools/issues/431?email_source=notifications&email_token=AEWQWAODXOJIZG3VU5JUZHDQJHLRHA5CNFSM4IQ6KXHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QYHIA#issuecomment-530678688, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWQWAMHFKSENQWPNETLUVLQJHLRHANCNFSM4IQ6KXHA .