Turicreate: How can I set some model metadata when used model.export_coreml(),Thanks.

Created on 5 Feb 2018  路  6Comments  路  Source: apple/turicreate

How can I add the license, author get surfaced in the XCode UI. I can't find more information in
Turi Create API Documentation.Could you help me with it.Thank you very much馃樆!

In Docs... image classification -> Introductory Example

Export for use in Core ML.

model.export_coreml('MyCustomImageClassifier.mlmodel')

In coremltools Docs... Model Interface about author

Here is coremltools code.

core_model.author = 'Hincat'
core_model.license = 'BSD-3'
core_model.save('Favourite.mlmodel')

Core ML bug p2 toolkits

Most helpful comment

model.export_coreml(file, author='X', license='Y') would be a great API.

All 6 comments

Hi, thanks for letting us know this is something you would like to be able to do. Right now there is no way to set custom meta data through Turi Create. The current way to do it is to re-open the mlmodel file using coremltools, add the desired information, and then re-save it.

We should probably return a coremltools.models.MLModel object from export_coreml (and/or, create a new API to_coreml to just return the object without saving), so that users can directly add metadata and call save.

Sincerely thanks again锛宧ave a good day.馃樃馃樃馃樃

model.export_coreml(file, author='X', license='Y') would be a great API.

Just chiming in to say I, too, would like a way to add metadata to a model 鈥撀爄f for now other reason than to add versions to my models. Thanks!

I just created my first useful CoreML model using turicreate and I also wanted to add this metadata.

Versioning, author and license are important to track.

Was this page helpful?
0 / 5 - 0 ratings