MLUpdateTask is leaking after training ended

Originator:Mike.house.nsk
Number:rdar://FB7641838 Date Originated:03/27/2020
Status:Open Resolved:
Product:CoreML API Product Version:iOS 13+
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
MLUpdateTask objects are not released after trainings ended. Application code after training doesn’t have any references to CoreML related objects, but they still in the memory.

The easiest way to reproduce the issue just use Apple sample code https://developer.apple.com/documentation/coreml/core_ml_api/personalizing_a_model_with_on-device_updates

1. Run the sample application
2. Make some trainings
3. Open Debug Memory Graph
4. Observe that MLUpdateTask objects are not released and consume ram space

Expected: MLUpdateTask objects should have been released after trainings
Unexpected: MLUpdateTask objects are not released after trainings

Model used for training is simple K Nearest Neighbors Classifier with input image size 227x227.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!