Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/dependency-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
deps-type: ['max', 'default']
deps-type: ['max', 'default', 'core']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,7 +79,21 @@ jobs:
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1

if [[ "${{ matrix.deps-type }}" == "default" ]]; then
if [[ "${{ matrix.deps-type }}" == "core" ]]; then
# Exercise the unbounded core dependency set separately from the
# constrained optional extras (for example, latest scikit-learn).
WHEEL=$(ls dist/*.whl | head -n 1)
# Jinja2 is currently imported by the library but is only present
# transitively through optional extras. Install it as test tooling
# so this leg can exercise the otherwise unbounded core set.
python -m pip install "${WHEEL}" jinja2
pip check
python -c 'import sklearn, validmind; print(f"ValidMind {validmind.__version__} with scikit-learn {sklearn.__version__}")'
python -m unittest \
tests.unit_tests.model_validation.sklearn.test_ROCCurve \
tests.unit_tests.model_validation.sklearn.test_PrecisionRecallCurve \
| cat
elif [[ "${{ matrix.deps-type }}" == "default" ]]; then
# Install only from built artifacts (let pip resolve deps normally)
WHEEL=$(ls dist/*.whl | head -n 1)
python -m pip install "${WHEEL}[all]"
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,8 @@ lending_club_loan_data_*.csv

# Pickle files
*.pkl
# Sample application scorecard model for validation notebook — do not remove!
!notebooks/use_cases/validation/xgb_model_champion.pkl
# Sample logistic regression model for validation series — do not remove!
!notebooks/tutorials/validation/lr_model_champion.pkl
# Sample XGBoost model for validation quickstart — do not remove!
!notebooks/quickstart/xgboost_model_champion.pkl

notebooks/llm/datasets/*.jsonl

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ version:
@echo "__version__ = \"$$(uv version --short)\"" > validmind/__version__.py
@sed 's/^Version: .*/Version: '"$$(uv version --short)"'/' r/validmind/DESCRIPTION > r/validmind/DESCRIPTION.tmp && mv r/validmind/DESCRIPTION.tmp r/validmind/DESCRIPTION
@echo "Version updated to $$(uv version --short)"
@echo "Commiting changes to pyproject.toml, __version__.py and r/validmind/DESCRIPTION with message: $$(uv version --short)"
@git add pyproject.toml validmind/__version__.py r/validmind/DESCRIPTION
@echo "Committing changes to pyproject.toml, uv.lock, __version__.py and r/validmind/DESCRIPTION with message: $$(uv version --short)"
@git add pyproject.toml uv.lock validmind/__version__.py r/validmind/DESCRIPTION
@git commit -m "$$(uv version --short)"

generate-test-id-types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions notebooks/code_sharing/post_processing_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q \"validmind[xgboost]\"\n",
"\n",
"import xgboost as xgb\n",
"import validmind as vm\n",
"from validmind.datasets.classification import customer_churn\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down
2 changes: 1 addition & 1 deletion notebooks/how_to/metrics/log_metrics_over_time.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down
2 changes: 1 addition & 1 deletion notebooks/how_to/metrics/run_unit_metrics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -1112,4 +1112,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -585,4 +585,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"outputs": [],
"source": [
"# Install the ValidMind Library\n",
"%pip install -q validmind\n",
"%pip install -q \"validmind[xgboost]\"\n",
"\n",
"# Initialize the ValidMind Library\n",
"import validmind as vm\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -638,4 +638,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -604,4 +604,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost,explainability]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -737,4 +737,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
2 changes: 1 addition & 1 deletion notebooks/quickstart/quickstart_documentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
]
},
{
Expand Down
12 changes: 8 additions & 4 deletions notebooks/quickstart/quickstart_validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": [],
Expand Down Expand Up @@ -800,7 +800,7 @@
"\n",
"### Import the champion model\n",
"\n",
"With our raw dataset preprocessed, let's go ahead and import the champion submitted by the development team in the format of a `.pkl` file: **[xgboost_model_champion.pkl](xgboost_model_champion.pkl)**"
"With our raw dataset preprocessed, let's go ahead and import the champion submitted by the development team in XGBoost's stable JSON model format: **[xgboost_model_champion.json](xgboost_model_champion.json)**"
],
"id": "1fd05953"
},
Expand All @@ -809,9 +809,13 @@
"metadata": {},
"source": [
"# Import the champion model\n",
"import joblib\n",
"import xgboost as xgb\n",
"\n",
"xgboost = joblib.load(\"xgboost_model_champion.pkl\")"
"xgboost = xgb.XGBClassifier(\n",
" early_stopping_rounds=10,\n",
" eval_metric=[\"error\", \"logloss\", \"auc\"],\n",
")\n",
"xgboost.load_model(\"xgboost_model_champion.json\")"
Comment thread
cachafla marked this conversation as resolved.
],
"execution_count": null,
"outputs": [],
Expand Down
1 change: 1 addition & 0 deletions notebooks/quickstart/xgboost_model_champion.json

Large diffs are not rendered by default.

Binary file removed notebooks/quickstart/xgboost_model_champion.pkl
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost,explainability]\""
],
"execution_count": null,
"outputs": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost,explainability]\""
],
"execution_count": null,
"outputs": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -337,7 +337,7 @@
"\n",
"# Load the saved model\n",
"model = xgb.XGBClassifier()\n",
"model.load_model(\"xgboost_model.model\")"
"model.load_model(\"xgboost_model.json\")"
],
"execution_count": null,
"outputs": []
Expand Down
1 change: 1 addition & 0 deletions notebooks/use_cases/ongoing_monitoring/xgboost_model.json

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"%pip install -q validmind"
"%pip install -q \"validmind[xgboost]\""
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -335,7 +335,7 @@
"\n",
"### Importing the champion model\n",
"\n",
"With the ValidMind Library set up and ready to go, let's go ahead and import the champion submitted by the development team in the format of a `.pkl` file: **[xgb_model_champion.pkl](xgb_model_champion.pkl)**"
"With the ValidMind Library set up and ready to go, let's go ahead and import the champion submitted by the development team in XGBoost's stable JSON model format: **[xgb_model_champion.json](xgb_model_champion.json)**"
]
},
{
Expand All @@ -346,7 +346,7 @@
"\n",
"#Load the saved model\n",
"xgb_model = xgb.XGBClassifier()\n",
"xgb_model.load_model(\"xgb_model_champion.pkl\")\n",
"xgb_model.load_model(\"xgb_model_champion.json\")\n",
"xgb_model"
],
"execution_count": null,
Expand Down
1 change: 1 addition & 0 deletions notebooks/use_cases/validation/xgb_model_champion.json

Large diffs are not rendered by default.

Binary file not shown.
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "validmind"
version = "2.13.9"
version = "2.13.10"
description = "ValidMind Library"
readme = "README.pypi.md"
requires-python = ">=3.9,<3.15"
Expand Down Expand Up @@ -40,7 +40,8 @@ dependencies = [
[project.optional-dependencies]
all = [
"torch (>=2.0.0)",
"xgboost (>=1.5.2,<3)",
"xgboost (>=1.5.2,<3.1)",
"scikit-learn (<1.8)",
Comment thread
cachafla marked this conversation as resolved.
"transformers (>=4.32.0,<5.0.0)",
"pycocoevalcap",
"ragas (>=0.2.3,<=0.2.7)",
Expand Down Expand Up @@ -108,7 +109,10 @@ nlp = [
]
pytorch = ["torch (>=2.0.0)"]
stats = ["scipy", "statsmodels (>=0.14.2,<0.15.0)", "arch (>=7.0.0)"]
xgboost = ["xgboost (>=1.5.2,<3)"]
xgboost = [
"xgboost (>=1.5.2,<3.1)",
"scikit-learn (<1.8)",
]
explainability = [
"shap (>=0.46.0)",
"numba (>=0.65.1) ; python_version >= '3.14'",
Expand Down
Loading
Loading