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
- Add Apache 2.0 attribution — Add the required notice/comment block citing the original HuggingFace Transformers source and Apache 2.0 license
- 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
Summary
src/winml/modelkit/models/hf/sam.pycontains 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
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
src/winml/modelkit/models/hf/sam.pyline 291