How jhoucode/laya-fit-check works
laya-fit-check is a small evaluation kit for deciding whether Laya suits a text-classification task. Its two user workflows are benchmark reproduction and comparison against majority, optional keyword-rule, and cross-validated TF-IDF baselines. Both read task data, run scoring, and write reports; comparison can additionally score a balanced subset. The shared core handles Laya loading, batched inference, calibration, and benchmark metrics. The graph reflects the shown CLI calls and README-documented outputs; it does not infer connections for unsampled result files.
Main entry points: compare.py Data comparison · reproduce_massive.py MASSIVE reproduction · laya_core.py Scoring and calibration · task.json Example task
Components 19
Evaluation workflows
- MASSIVE reproduction
reproduce_massive.py - Data comparison
compare.py - Benchmark case builder
reproduce_massive.py - Input and task loading
compare.py - Balanced sampling
compare.py
Laya inference
- Scoring and calibration
laya_core.py - Laya model
Comparison baselines
- Majority baseline
compare.py - Keyword rules
compare.py - TF-IDF cross-validation
compare.py
Inputs and reports
- Comparison report
compare.py - MASSIVE metrics report
reproduce_massive.py - Example task
examples/paper_sections/task.json - Example rules
examples/paper_sections/rules.json - Benchmark result
results/massive_en.json - Paper-section result
results/paper_sections_en.json
Other components
- Evaluator
- User JSONL data
- MASSIVE dataset
Connections 19
- Evaluator → MASSIVE reproduction: runs benchmark
README.md - Evaluator → Data comparison: compares data
README.md - MASSIVE reproduction → Benchmark case builder: builds cases
reproduce_massive.py - Benchmark case builder → MASSIVE dataset: loads examples
reproduce_massive.py - MASSIVE reproduction → Scoring and calibration: scores cases
reproduce_massive.py - Scoring and calibration → Laya model: loads and calls
laya_core.py - MASSIVE reproduction → MASSIVE metrics report: writes metrics
reproduce_massive.py - Data comparison → Input and task loading: loads inputs
compare.py - User JSONL data → Input and task loading: provides rows
README.md - Example task → Input and task loading: provides task
README.md - Example rules → Keyword rules: configures rules
README.md - Data comparison → Majority baseline: builds predictions
compare.py - Data comparison → Keyword rules: runs optional rules
compare.py - Data comparison → TF-IDF cross-validation: runs cross-validation
compare.py - Data comparison → Scoring and calibration: runs Laya
compare.py - Data comparison → Balanced sampling: samples optionally
compare.py - Data comparison → Comparison report: writes report
compare.py - MASSIVE metrics report → Benchmark result: default output
README.md - Evaluator → Paper-section result: reviews example
README.md