Skip to content

release image-grouped review platform #23

release image-grouped review platform

release image-grouped review platform #23

Workflow file for this run

name: ci
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[inference,dev]"
- name: Compile and test
run: |
python -m compileall -q autolabel_with_single_class_models.py yolo_label_recovery tests
ruff check autolabel_with_single_class_models.py yolo_label_recovery tests examples
python tests/run_smoke_tests.py
pytest
- name: Generate public demo report
run: yolo-label-recovery report examples/demo_output
- name: Run model-free audit demo
run: |
python examples/create_synthetic_dataset.py --output /tmp/ylr-demo
yolo-label-recovery audit /tmp/ylr-demo --output-dir /tmp/ylr-audit --hash-images --check-images
python -c "import json; d=json.load(open('/tmp/ylr-audit/dataset_audit.json')); assert d['critical_issues']==2 and d['cross_split_duplicate_groups']==1"
- name: Run threshold calibration demo
run: |
python examples/create_calibration_fixture.py --output /tmp/ylr-reviewed.csv
yolo-label-recovery calibrate /tmp/ylr-reviewed.csv --output-dir /tmp/ylr-calibration --target-auto-precision 0.95 --auto-confidence-level 0.95 --target-review-recall 0.90 --min-auto-samples 20 --redact-paths
python -c "import json; d=json.load(open('/tmp/ylr-calibration/calibration.json')); assert len(d['classes'])==6 and all(v['status']=='calibrated' and v['auto_precision_lower_bound']>=0.95 for v in d['classes'].values())"
- name: Run cross-Teacher consensus demo
run: |
python examples/create_consensus_fixture.py --output-dir /tmp/ylr-consensus-fixture
yolo-label-recovery consensus /tmp/ylr-consensus-fixture/primary_candidates.csv /tmp/ylr-consensus-fixture/verifier_candidates.csv --output-dir /tmp/ylr-consensus --agreement-iou 0.50 --verifier-min-confidence 0.50 --redact-paths
python -c "import json; d=json.load(open('/tmp/ylr-consensus/consensus.json')); assert d['totals']['primary_auto']==72 and d['totals']['agreed_auto']==48 and d['totals']['downgraded_to_review']==24"
- name: Run perceptual near-duplicate demo
run: |
python examples/create_near_duplicate_fixture.py --output /tmp/ylr-near-duplicates
yolo-label-recovery cluster /tmp/ylr-near-duplicates --output-dir /tmp/ylr-near-duplicate-output --redact-paths
python -c "import json; d=json.load(open('/tmp/ylr-near-duplicate-output/near_duplicate_summary.json')); assert d['totals']['images_discovered']==11 and d['totals']['fingerprint_failures']==1 and d['totals']['clusters']==3 and d['totals']['clustered_images']==7 and d['totals']['cross_split_clusters']==2"
- name: Run active review prioritization demo
run: |
python examples/create_prioritization_fixture.py --output-dir /tmp/ylr-priority-fixture
yolo-label-recovery prioritize /tmp/ylr-priority-fixture/candidates_review.csv /tmp/ylr-priority-fixture/dataset --output-dir /tmp/ylr-priority-output --budget 12 --redact-paths
python -c "import json; d=json.load(open('/tmp/ylr-priority-output/prioritization_summary.json')); assert d['totals']['candidate_rows']==36 and d['totals']['selected_images']==12 and d['totals']['selected_classes']==6 and len({r['candidate_classes'] for r in d['queue'][:6]})==6"
- name: Run exhaustive GT/AUTO review demo
run: |
python examples/create_review_fixture.py --output-dir /tmp/ylr-review-fixture
yolo-label-recovery review-build /tmp/ylr-review-fixture/dataset /tmp/ylr-review-fixture/candidates.csv --output-dir /tmp/ylr-review-output --render --redact-paths
python -c "import json; d=json.load(open('/tmp/ylr-review-output/summary.json')); assert d['review_rows']==4 and d['render_failures']==0 and set(d['image_class_cases'])=={'GT0_AUTO0','GT0_AUTO1','GT1_AUTO0','GT1_AUTO1'}"
- name: Build wheel
run: python -m pip wheel --no-deps --wheel-dir dist .
- name: Reject private artifacts
shell: bash
run: |
forbidden=$(find . -type f \( -name '*.pt' -o -name '*.pth' -o -name '*.onnx' -o -name '*.engine' \) -print)
if [ -n "$forbidden" ]; then
printf '%s\n' "$forbidden"
exit 1
fi
- name: Reject common machine-specific paths
shell: bash
run: |
if grep -RInE --exclude-dir=.git --exclude-dir=build --exclude-dir=dist --exclude-dir='*.egg-info' --exclude='ci.yml' --exclude='*.png' --exclude='*.svg' \
'([A-Za-z]:\\Users\\|[A-Za-z]:\\project|[A-Za-z]:\\yolo|/home/[^/]+/|/Users/[^/]+/)' .; then
echo "Machine-specific path found. Replace it with a portable example."
exit 1
fi