Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[GSoC] Integrate the trained model to inject required phrases into rules

未关闭
#5,243 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
44/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python, pytorch

调研方向

从规则更新工作流开始:找到 get_updatable_rules_by_expression 选择候选规则的位置,以及 add_required_phrase_to_rule 执行写入的位置。在该路径中加入经过训练的 PyTorch fp32 推理步骤,然后根据 BIOES span 重建 phrase,用 is_good() 验证每个 phrase,并且仅在预测结果可信时注入,除非设置了 --dry-run,同时使用 source=ml_model。将与规则处理相关的测试或命令入口作为第一验证点,最后确认 required-phrase 注入行为,以及写入后必须运行 scancode-reindex-licenses 的要求。

由索引模型根据 Issue 内容生成。

描述

GSoC

follows #5137. uses the trained model from there

Goal

Run the finetuned model over eligible rules that have no required phrases, and
inject the predicted {{ }} markers using scancode's existing helpers

Tasks

  • load the trained model (PyTorch, fp32) and run inference on rule text
  • pick target rules with get_updatable_rules_by_expression (skips ineligible ones)
  • rebuild predicted phrases from the BIOES spans
  • validate every phrase with is_good() before writing
  • inject with add_required_phrase_to_rule, tagged source=ml_model
  • --dry-run and a confidence threshold so only confident phrases auto-inject
  • note to run scancode-reindex-licenses after any write
主要语言
Python
星标
2.7k
派生
831
平均合并
3 天 4 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aboutcode-org/scancode-toolkit 的其他 Issue

查看 aboutcode-org/scancode-toolkit 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。