aboutcode-org / aboutcode-org/scancode-toolkit

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

Đang mở
#5,243 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
GSoC
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.