Skip to content

metadata: if LICENSE exist then include a copy of it #8870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mofosyne
Copy link
Collaborator

@mofosyne mofosyne commented Aug 5, 2024

Based on observation by @compilade in #8810 that there are companies and individuals who may want to write their own license e.g. https://huggingface.co/apple/OpenELM-270M-Instruct/blob/079458728ac069399c968eb2aba519b1411725ff/README.md?code=true#L4

So this PR will just copy any LICENSE file and adds a new kv store named general.license.content to the metadata store.

There are future opportunities to auto-match and extract SPDX if we include a python module to detect it... but I think that's asking a bit much of us. Let's see if people be willing to fill in the model card properly. This just accounts for when there is a legitimate reason to not link to an external license (ergo self written license).

@mofosyne mofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label Aug 5, 2024
@github-actions github-actions bot added examples python python script changes labels Aug 5, 2024
Copy link
Collaborator

@compilade compilade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so you know, there are models with a custom license without even a LICENSE file, for example, see Gemma-2 models.

I'm not sure the LICENSE content should always be included; some models do use a valid license_link.

@mofosyne
Copy link
Collaborator Author

mofosyne commented Aug 5, 2024

Just so you know, there are models with a custom license without even a LICENSE file, for example, see Gemma-2 models.

I'm not sure the LICENSE content should always be included; some models do use a valid license_link.

Added check for a link before copying license file to kv store

@mofosyne mofosyne changed the title py: if LICENSE exist then include a copy of it metadata: if LICENSE exist then include a copy of it Aug 10, 2024
@mofosyne
Copy link
Collaborator Author

mofosyne commented Nov 12, 2024

Considering closing this PR as I'm not 100% sure of the value of this PR. Since most people would be using common/existing opensource license files which is usually provided externally via a link (or via a SPDX license name).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples python python script changes Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants