Repository navigation
Releases
v0.2.0
Speaks VGI protocol 3.4 (vgi-python >=0.55.2,<0.56), so it needs Haybarn 2.0.1 or newer (or stock DuckDB 2.0 with INSTALL vgi FROM query_farm). Haybarn 2.0.0 loads a 3.3 vgi extension that cannot attach it.
- Speaks VGI protocol 3.4: require vgi-python
>=0.55.2,<0.56; uv.lock re-locked. This release
needs Haybarn 2.0.1 (or stock DuckDB 2.0 withINSTALL vgi FROM query_farm): Haybarn 2.0.0
loads a 3.3vgiextension that cannot attach it. - SQL tests run on haybarn-unittest 2.0.1rc3.
serveextra isvgi-python[http,oauth]; the Docker image installs it, so the image runs in
Orchard hosted mode (VGI_ORCHARD_HOSTED=1with VGI_JWT_ISSUER, VGI_JWT_AUDIENCE,
VGI_JWT_JWKS_URI and VGI_SIGNING_KEY). The HEALTHCHECK usesHEAD /health, which stays
anonymous in hosted mode.
v0.1.1
v0.1.0
First release of vgi-xgboost, a VGI worker that brings XGBoost into DuckDB/SQL. You can train gradient-boosted models, save them in a model registry, run predictions over SQL tables, and interpret the models with feature importance and SHAP, all through SQL functions.
Functions
- Datasets (from scikit-learn):
iris,wine,breast_cancer,diabetes,california_housing,make_classification,make_regression - Fit / registry:
fitand typedfit_xgb_*functions (xgb_classifier,xgb_regressor,xgb_rf_classifier,xgb_rf_regressor), pluslist_models,model_info,drop_model - Predict: streaming
predict(withwith_proba) - Validation and tuning:
cross_val_predict,cross_val_score,grid_search,randomized_search - Interpretation:
feature_importance,permutation_importance, SHAPexplain,partial_dependence
String columns become native categorical features. Classification targets can use any label type and are decoded back to the original labels when you call predict.
Composed examples
cross_val_predictout-of-fold predictions joined back toiristo build a confusion matrix- Out-of-fold predictions on
diabetes, with held-out error grouped by BMI quartile - An out-of-fold agent test task on
breast_cancer
Quick start
INSTALL vgi FROM community; LOAD vgi;
ATTACH 'xgboost' (TYPE vgi, LOCATION 'uv run xgboost_worker.py');
SELECT * FROM xgboost.fit(
(SELECT * EXCLUDE (target_name) FROM xgboost.iris()),
model_name := 'iris_clf', estimator := 'xgb_classifier', target := 'target', id := 'sample_id');Run it from a checkout of this tag (git clone --branch v0.1.0 https://github.com/Query-farm/vgi-xgboost). A container image is published to ghcr.io/query-farm/vgi-xgboost:0.1.0.
Known limits
- Requires
vgi-python>=0.51.1(VGI protocol 3.3). Older protocol-3.2 builds fail ATTACH against the current community extension. - The model registry is stored on local disk. An S3/R2
ModelStoreseam exists but isn't implemented yet. - The package has no console-script entry point, so
uvx --from git+…can't launch it directly. Use a checkout or the container image. - This is a source-only release. The worker isn't published to PyPI.