Skip to content

Fix XGBoost regression CSV output dropping batch records - #4932

Open
lighthuska-lab wants to merge 2 commits into
aws:defaultfrom
lighthuska-lab:fix/xgboost-batch-csv
Open

lighthuska-lab wants to merge 2 commits into
aws:defaultfrom
lighthuska-lab:fix/xgboost-batch-csv

Conversation

@lighthuska-lab

Copy link
Copy Markdown

Issue #, if available:
Related fork issue: lighthuska-lab#1

Description of changes:
Serialize every row of the XGBoost prediction/SHAP array as newline-delimited CSV. Previously output_fn serialized predictions[0] only, silently dropping later records. Single-record formatting and unsupported-content-type errors remain unchanged. Includes offline regression tests, documentation, and Python 3.11–3.13 CI.

Testing done:
Four regression tests: two failed against baseline; all four pass with the fix. All six push/PR matrix jobs passed in the fork, including Black formatting checks. Real NumPy arrays and a mocked model test predict_fn-to-output_fn routing. git diff --check passes. No cloud jobs, endpoint calls, or notebook end-to-end tests were run.

Merge Checklist

  • No new notebooks added.
  • Read CONTRIBUTING.md and followed existing folder placement.
  • Documented offline tests and CSV behavior; no index change needed for this helper-only fix.
  • Notebook end-to-end tests: not applicable; no notebook changes.
  • Formatted changed Python code with Black -l 100.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This branch has not been deployed

No deployments
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.

1 participant