Skip to content

Add DeBERTa training and ONNX export pipeline for required phrases extraction - #5222

Open
Kaushik-Kumar-CEG wants to merge 2 commits into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/train-deberta-model
Open

Add DeBERTa training and ONNX export pipeline for required phrases extraction#5222
Kaushik-Kumar-CEG wants to merge 2 commits into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/train-deberta-model

Conversation

@Kaushik-Kumar-CEG

@Kaushik-Kumar-CEG Kaushik-Kumar-CEG commented Jul 5, 2026

Copy link
Copy Markdown

Part of #5137

adds the DeBERTa BIOES/CRF training and export pipeline for required phrase extraction

the training command:

  • validates the dataset and BIOES labels before training
  • uses a pinned model revision and reproducible runtime settings
  • selects the checkpoint with the best validation F1
  • reloads and verifies the final model offline
  • writes SUCCESS.json only after all artifact checks pass
  • exports constrained CRF data and optional ONNX emissions

Final run results:

  • validation F1: 0.9008
  • test F1: 0.8766
  • test precision: 0.8748
  • test recall: 0.8784
  • test exact match: 0.8197
  • invalid BIOES paths: 0

the uploaded model was downloaded and validated again successfully.

The package version is in aboutcode-org/scancode-required-phrases#2.

disclosure : used Claude to help review and clean up few bugs in script

Train the DeBERTa BIOES and CRF model with validated datasets and best-checkpoint selection. Add strict model export, reproducibility metadata, and focused offline tests.

Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>
@Kaushik-Kumar-CEG
Kaushik-Kumar-CEG force-pushed the gsoc/train-deberta-model branch from 750d2ab to 4ccfe39 Compare August 31, 2026 15:01
@Kaushik-Kumar-CEG
Kaushik-Kumar-CEG marked this pull request as ready for review August 31, 2026 15:01
Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>

@Shriprasad-P Shriprasad-P left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

PR: Add DeBERTa training and ONNX export pipeline for required phrases extraction

Touched: etc/requirements-ml.txt, etc/scripts/dataset_pipeline/export_onnx.py, etc/scripts/dataset_pipeline/phrase_model.py, etc/scripts/dataset_pipeline/test_export_onnx.py, etc/scripts/dataset_pipeline/test_phrase_model.py, etc/scripts/dataset_pipeline/test_train_model.py

  • Addresses a concrete correctness/reliability issue based on the title and diff.
  • CI/tooling change — confirm the pipeline still passes on this branch.
  • Diff is fairly large (+5133/-0); a short summary of risk areas from the author would help reviewers.

Commenting as a drive-by reviewer after reading the diff. Happy to look again if maintainers want a deeper pass on a specific file.

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