Hi all,
I have a problem with retrieving a model collection from a deployment. I tried to implement it like it was shown in WWDC 'Use model deployment and security with Core ML' session and here but I found that beginAccesing method doesn't exist for MLModelCollection class.
Then I used Apple's documentation for 'Retrieving a Model Collection from a Deployment' and implement it like it is described, but status property of the collection model is always MLModelCollection.Status.syncing.
Code:
let coinModelCollection = MLModelCollection(identifier: "TestCoinDetector")
coinModelCollection.isSynchronizationEnabled = true
print("Model collection status \(coinModelCollection.status.rawValue)")
if let coinModel = coinModelCollection.entries?["CoinDetector"] {
// entries are always empty
}
I created the model collection in the Core ML Model Deployment dashboard with the same "TestCoinDetector" identifier and also created model deployment and uploaded mlarchive. I used the same team as for the project.
I know that system itself is deciding when to download the model in the background, but more than 24 hours passed and the status is still syncing.
Can someone tell me did I do something wrong or maybe I need to set some configuration to the project, add some Capability, add some permissions or something else?
Thanks
I have a problem with retrieving a model collection from a deployment. I tried to implement it like it was shown in WWDC 'Use model deployment and security with Core ML' session and here but I found that beginAccesing method doesn't exist for MLModelCollection class.
Then I used Apple's documentation for 'Retrieving a Model Collection from a Deployment' and implement it like it is described, but status property of the collection model is always MLModelCollection.Status.syncing.
Code:
let coinModelCollection = MLModelCollection(identifier: "TestCoinDetector")
coinModelCollection.isSynchronizationEnabled = true
print("Model collection status \(coinModelCollection.status.rawValue)")
if let coinModel = coinModelCollection.entries?["CoinDetector"] {
// entries are always empty
}
I created the model collection in the Core ML Model Deployment dashboard with the same "TestCoinDetector" identifier and also created model deployment and uploaded mlarchive. I used the same team as for the project.
I know that system itself is deciding when to download the model in the background, but more than 24 hours passed and the status is still syncing.
Can someone tell me did I do something wrong or maybe I need to set some configuration to the project, add some Capability, add some permissions or something else?
Thanks