Skip to content

Add Apache 2.0 attribution for HuggingFace code in sam.py #10

@timenick

Description

@timenick

Summary

src/winml/modelkit/models/hf/sam.py contains a helper function _do_pool (line 291) copied from HuggingFace Transformers, which is licensed under Apache 2.0.

Since this is copied code (not a dependency), it constitutes redistribution and requires proper Apache 2.0 attribution notice in the file.

Options

  1. Add Apache 2.0 attribution — Add the required notice/comment block citing the original HuggingFace Transformers source and Apache 2.0 license
  2. Remove copied code — Refactor to call the HF function directly instead of copying it, avoiding the redistribution concern entirely

Context

Found during open-source release "Going Public" checklist review. All other source files are clean — this is the only instance of third-party code copied into the repo under a different license.

References

  • HuggingFace Transformers license: Apache 2.0
  • File: src/winml/modelkit/models/hf/sam.py line 291

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions