question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding metadata as author and description

See original GitHub issue

Hello,

I have tried with different options to add the metadata labels. The examples in internet are those:

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

mlmodel.author = ‘tpeter’
mlmodel.license = ‘MIT’
mlmodel.short_description = ‘This model takes a picture of a leopard and predicts its gender’

model.author = 'Author'
model.license = 'BSD'
model.short_description = 'Predicts the price of a house in the Seattle area.'

But none of these options worked. (Obviously changing the text after the equal symbol.) Please, can you inform about how to set the metadata? Regards,

Jorge

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
vadecommented, Sep 5, 2019

You edit the core ml spec and then save the model, like so:

model  = coremltools.models.MLModel(path)

#get the raw spec if you want to adjust layer names
#spec = model.get_spec()
# do something with the spec
# make a new model with the spec
#model = coremltools.models.MLModel(spec)

# Set the model metadata
model.author = 'Your Name'
model.license = 'Your License'
model.short_description = 'Description'
model.versionString =  '1.0 Beta 1'
model.save(new_path)
0reactions
Mstronachcommented, Jul 13, 2020

This issue is being closed due to inactivity. Please feel free to re-open if you still have questions surrounding this issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Meta Tags — Keyword, Description, Author Name
HTML meta tags describe the metadata of the HTML page where it contains page description, author of ... Author attribute specifies the author...
Read more >
HTML meta tag - W3Schools
Describe metadata within an HTML document: ... used to specify character set, page description, keywords, author of the document, and viewport settings.
Read more >
What's in the head? Metadata in HTML - MDN Web Docs
Adding an author and description. Many <meta> elements include name and content attributes: name specifies the type of meta element it is; ...
Read more >
How to Add Metadata to Images and Video
This Easy-to-Follow Tutorial explains what Metadata is & How to View and Edit Video and Image/Photo Metadata. From Copyright Protection to ...
Read more >
How to Add Metadata to Your Image Files - Artwork Archive
Add metadata using Photoshop* · Drop an image file into Photoshop · Click on “File” in the top menu, then select "File Info"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found