Skip to content
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

fix requirement of mlm:model role, required only by at least one asset #9

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

fmigneault
Copy link
Collaborator

@fmigneault fmigneault commented Apr 27, 2024

Description

Fixed

  • Fix the validation strategy of the mlm:model role required by at least one Asset under a STAC Item.
    Although the role requirement was validated, the definition did not allow for other Assets without it to exist.

For example, the following would be rejected, because the ["metadata"] did not include the mlm:model role, while the original intention was that at least one offers it, which is respected by the other asset.

{
  "assets": {
    "card": {
      "type": "text/markdown",
      "href": "https://huggingface.co/example/model-card",
      "roles": ["metadata"],
      "title": "Model Card",
      "description": "Example model."
    },
    "model": {
      "type": "application/octet-stream; application=pytorch",
      "href": "https://example.com/sample/checkpoint.pt",
      "roles": ["checkpoint", "mlm:model"],
      "title": "Model Weights Checkpoint"
    }
  }
}

Related Issue

n/a

Type of Change

  • 📚 Examples, docs, tutorials or dependencies update;
  • 🔧 Bug fix (non-breaking change which fixes an issue);
  • 🥂 Improvement (non-breaking change which improves an existing feature);
  • 🚀 New feature (non-breaking change which adds functionality);
  • 💥 Breaking change (fix or feature that would cause existing functionality to change);
  • 🔐 Security fix.

Checklist

  • I've read the CONTRIBUTING.md guide;
  • I've updated the code style using make codestyle;
  • I've written tests for all new methods and classes that I created;
  • I've written the docstring in Google format for all the methods and classes that I used.

@fmigneault fmigneault requested a review from rbavery April 27, 2024 01:38
@fmigneault fmigneault self-assigned this Apr 27, 2024
@fmigneault fmigneault merged commit b39ed91 into main Apr 29, 2024
9 checks passed
@fmigneault fmigneault deleted the fix-minimum-role-model branch April 29, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants