Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
dc16774
feat: cleaning up dependencies
johnwalz97 Jul 18, 2025
5a37c13
Merge branch 'john/cleanup-dependencies' of https://github.com/validm…
johnwalz97 Jul 28, 2025
8d3b48b
feat: adding testing with tox
johnwalz97 Jul 29, 2025
ce35462
fix: using new plotly express module thats included in plotly
johnwalz97 Jul 30, 2025
f6cf468
refactor: replace pkg_resources with importlib.metadata for version c…
johnwalz97 Jul 30, 2025
cd62556
fix: update tox command in dependency testing workflow to streamline …
johnwalz97 Jul 30, 2025
22eeffe
chore: simplify dependency installation in CI workflow by using all-e…
johnwalz97 Jul 30, 2025
e453cb5
chore: remove outdated backup and output notebooks for quickstart mod…
johnwalz97 Jul 30, 2025
57e1287
fix: enhance dependency testing workflow to conditionally run tox bas…
johnwalz97 Jul 30, 2025
86c00f2
chore: update system dependencies in CI workflows and clean up quicks…
johnwalz97 Jul 30, 2025
2d5d0c5
chore: update numpy and scikit-learn versions in tox configuration
johnwalz97 Jul 30, 2025
821c70c
chore: update torch version in pyproject.toml and tox.ini for improve…
johnwalz97 Jul 31, 2025
e125f3c
chore: update content hash in poetry.lock to reflect dependency changes
johnwalz97 Aug 1, 2025
7ccaec5
chore: update numpy version in tox.ini for compatibility with latest …
johnwalz97 Aug 4, 2025
87aec2f
Merge branch 'main' into john/cleanup-dependencies
johnwalz97 Aug 4, 2025
0fd73df
ource /Users/jwalz/Library/Caches/pypoetry/virtualenvs/validmind-BbKY…
johnwalz97 Aug 6, 2025
cbc807a
fix: remove unnecessary blank line in __init__.py
johnwalz97 Aug 6, 2025
ae9b223
chore: clean up dependency testing workflows by removing unnecessary …
johnwalz97 Aug 6, 2025
394ce68
chore: update tox configuration for minimum dependency testing across…
johnwalz97 Aug 8, 2025
ca50212
chore: remove deprecated dependency testing jobs for minimum, maximum…
johnwalz97 Aug 8, 2025
2d23af0
chore: update dependencies in poetry.lock to latest versions for aioh…
johnwalz97 Aug 8, 2025
f9b4152
Install kaleido
cachafla Aug 6, 2025
44d8ebc
Run integration tests
cachafla Aug 6, 2025
2fe6043
Fix branch name
cachafla Aug 6, 2025
965cde3
Missing change
cachafla Aug 6, 2025
11e1ab1
Update kaleido version
cachafla Aug 6, 2025
2e6c75c
Undo branch change
cachafla Aug 6, 2025
7669b66
Remove scorecard with GLM notebook
juanmleng Aug 6, 2025
34097dd
2.8.30
juanmleng Aug 6, 2025
710e8fd
Make timeout configurable and send figures in batches
juanmleng Aug 7, 2025
16f3a26
2.8.31
juanmleng Aug 8, 2025
26e6431
Support new interface assign_scores to VM dataset (#407)
AnilSorathiya Aug 8, 2025
614696b
Merge branch 'main' into john/cleanup-dependencies
johnwalz97 Aug 8, 2025
a813197
Update minimum dependency versions for Python 3.9, 3.10, and 3.11 com…
johnwalz97 Aug 8, 2025
336db41
feat: make dependency constraints dynamic
johnwalz97 Aug 8, 2025
9a4aca3
chore: remove min testing target
johnwalz97 Aug 8, 2025
c6d096e
chore: add beautifulsoup4 as a dependency for enhanced HTML parsing
johnwalz97 Aug 8, 2025
fd3d9ba
chore: update poetry.lock and pyproject.toml to newer spec
johnwalz97 Aug 8, 2025
8a97fbd
chore: update dependency installation to include all extras for bette…
johnwalz97 Aug 8, 2025
7ecc1fb
chore: remove artifact upload step from dependency testing workflow
johnwalz97 Aug 8, 2025
96c4dcf
chore: simplify dependency testing workflow by removing exit on failure
johnwalz97 Aug 8, 2025
e87dd3f
fix: use correct spec for extras
johnwalz97 Aug 8, 2025
66a52e6
chore: revert python.yaml
johnwalz97 Aug 8, 2025
d3bface
chore: revert unnecessary changes to CI workflow, VSCode settings, Ma…
johnwalz97 Aug 8, 2025
e4f0685
ci: install all extras in python workflow (poetry install --all-extras)
johnwalz97 Aug 8, 2025
5af5e64
fix: add langdetect as a required dependency for NLP tests and handle…
johnwalz97 Aug 8, 2025
bde0743
fix: remove unnecessary required dependencies
johnwalz97 Aug 8, 2025
6089921
chore: re-lock file
johnwalz97 Aug 8, 2025
39584ef
chore: update pyproject metadata
johnwalz97 Aug 8, 2025
2911bf4
fix: log unit metrics only for scalar values in TestResult class
johnwalz97 Aug 9, 2025
4a7c923
Merge branch 'main' into john/cleanup-dependencies
johnwalz97 Aug 11, 2025
135ba20
chore: remove unused dependencies and tox configuration
johnwalz97 Aug 11, 2025
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
154 changes: 154 additions & 0 deletions .github/workflows/dependency-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: Dependency Compatibility Testing

on:
push:
branches: [main]
paths:
- 'pyproject.toml'
- 'requirements/**'
- 'validmind/**'
- 'tests/**'
pull_request:
branches: ['*']
paths:
- 'pyproject.toml'
- 'requirements/**'
- 'validmind/**'
- 'tests/**'
schedule:
# Run weekly on Sundays at 2 AM UTC to catch new dependency releases
- cron: '0 2 * * 0'
workflow_dispatch:
inputs:
test_type:
description: 'Type of dependency test to run'
required: true
default: 'all'
type: choice
options:
- 'all'
- 'min-versions'
- 'max-versions'
- 'python-versions'
- 'pip-freeze'

permissions:
contents: read

jobs:
dependency-matrix:
name: Test Python ${{ matrix.python-version }} with ${{ matrix.deps-type }} dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
deps-type: ['max', 'default']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libomp-dev

- name: Install build tooling (Poetry and uv)
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 - --yes
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Build wheel and sdist
run: |
poetry --version
poetry build

- name: Install and test via pip artifacts (${{ matrix.deps-type }})
run: |
set -euxo pipefail
# limit threads to avoid resource contention
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1

if [[ "${{ 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]"
pip check
python -m tests.test_unit_tests | cat
else
# Generate latest-compatible constraints (max)
OUT=constraints-max.txt
uv pip compile pyproject.toml --all-extras --no-emit-index-url --no-annotate --output-file "$OUT" --upgrade
# Install constraints then the wheel without reinstalling deps
pip install -r "$OUT"
WHEEL=$(ls dist/*.whl | head -n 1)
python -m pip install "${WHEEL}[all]" --no-deps
pip check
python -m tests.test_unit_tests | cat
fi

pip-freeze-testing:
name: Test Client Pip Freeze Environments
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_type == 'pip-freeze' || github.event_name == 'schedule'

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libomp-dev

- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry

- name: Test pip freeze environments
env:
OMP_NUM_THREADS: 1
MKL_NUM_THREADS: 1
PIP_NO_CACHE_DIR: 1
run: |
set -euxo pipefail
if [ -z "${FREEZE_FILE:-}" ] || [ ! -f "$FREEZE_FILE" ]; then
echo "Set FREEZE_FILE env var to a pip freeze file path" >&2
exit 1
fi
python -m pip install --upgrade pip
pip install -r "$FREEZE_FILE"
poetry install --no-deps
python -m tests.test_unit_tests | cat

report-status:
name: Report Dependency Testing Status
runs-on: ubuntu-latest
needs: [dependency-matrix]
if: always()

steps:
- name: Report results
run: |
echo "Dependency testing completed"
echo "Matrix job status: ${{ needs.dependency-matrix.result }}"
if [[ "${{ needs.dependency-matrix.result }}" == "failure" ]]; then
echo "❌ Some dependency combinations failed"
else
echo "✅ All dependency combinations passed"
fi
2 changes: 1 addition & 1 deletion .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
poetry env use python3.9
poetry run pip install pyarrow==17.0.0
poetry install -E huggingface -E llm
poetry install --all-extras
poetry run pip install torch==2.0.1 --extra-index-url https://download.pytorch.org/whl/cpu
poetry run pip install aequitas fairlearn vl-convert-python

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ quarto-docs:
rm -f docs/validmind.json
rm -rf docs/validmind
mkdir -p docs/validmind

# Generate API JSON dump
poetry run python -m griffe dump validmind -f -o docs/validmind.json -d google -r -U

# Generate Quarto docs from templates
poetry run python scripts/generate_quarto_docs.py

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1016,12 +1016,12 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"id": "d96969b7",
"metadata": {},
"outputs": [],
"source": [
"from plotly_express import bar\n",
"from plotly.express import bar\n",
"from validmind.vm_models.figure import Figure\n",
"from validmind.vm_models.result import TestResult\n",
"import plotly.graph_objects as go\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
"metadata": {},
"outputs": [],
"source": [
"import plotly_express as px\n",
"import plotly.express as px\n",
"\n",
"\n",
"@vm.test(\"my_custom_tests.ParameterExample\")\n",
Expand Down Expand Up @@ -737,7 +737,7 @@
"outputs": [],
"source": [
"import numpy as np\n",
"import plotly_express as px\n",
"import plotly.express as px\n",
"\n",
"\n",
"@vm.test(\"my_custom_tests.ComplexOutput\")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
"metadata": {},
"outputs": [],
"source": [
"import plotly_express as px\n",
"import plotly.express as px\n",
"\n",
"\n",
"@test(\"my_custom_tests.ParameterExample\")\n",
Expand All @@ -427,7 +427,7 @@
" )\n",
"\n",
"\n",
"parameter_example.save(tests_folder, imports=[\"import plotly_express as px\"])"
"parameter_example.save(tests_folder, imports=[\"import plotly.express as px\"])"
]
},
{
Expand All @@ -437,7 +437,7 @@
"outputs": [],
"source": [
"import numpy as np\n",
"import plotly_express as px\n",
"import plotly.express as px\n",
"\n",
"\n",
"@test(\"my_custom_tests.ComplexOutput\")\n",
Expand Down Expand Up @@ -466,7 +466,7 @@
"\n",
"\n",
"complex_output.save(\n",
" tests_folder, imports=[\"import numpy as np\", \"import plotly_express as px\"]\n",
" tests_folder, imports=[\"import numpy as np\", \"import plotly.express as px\"]\n",
")"
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/code_sharing/post_processing_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"metadata": {},
"outputs": [],
"source": [
"from plotly_express import bar\n",
"from plotly.express import bar\n",
"\n",
"\n",
"def create_figure(result: TestResult):\n",
Expand Down
17 changes: 13 additions & 4 deletions notebooks/quickstart/quickstart_model_documentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
},
{
"cell_type": "markdown",
"id": "57bdd8f8",
"metadata": {},
"source": [
"<a id='toc3_1_'></a>\n",
Expand Down Expand Up @@ -210,6 +211,7 @@
},
{
"cell_type": "markdown",
"id": "bc5c8bd4",
"metadata": {},
"source": [
"<a id='toc3_2_1_'></a>\n",
Expand Down Expand Up @@ -263,10 +265,10 @@
"import validmind as vm\n",
"\n",
"vm.init(\n",
" # api_host=\"...\",\n",
" # api_key=\"...\",\n",
" # api_secret=\"...\",\n",
" # model=\"...\",\n",
" api_host=\"https://api.validmind.ai/api/v1/tracking\",\n",
" api_key=\"<your-api-key>\",\n",
" api_secret=\"<your-api-secret>\",\n",
" model=\"<your-model-id>\"\n",
")"
]
},
Expand Down Expand Up @@ -455,6 +457,7 @@
},
{
"cell_type": "markdown",
"id": "541466ce",
"metadata": {},
"source": [
"<a id='toc7_'></a>\n",
Expand Down Expand Up @@ -508,6 +511,7 @@
},
{
"cell_type": "markdown",
"id": "78c85786",
"metadata": {},
"source": [
"<a id='toc7_2_'></a>\n",
Expand Down Expand Up @@ -537,6 +541,7 @@
},
{
"cell_type": "markdown",
"id": "c6662e6b",
"metadata": {},
"source": [
"<a id='toc8_'></a>\n",
Expand Down Expand Up @@ -585,6 +590,7 @@
},
{
"cell_type": "markdown",
"id": "5da79af3",
"metadata": {},
"source": [
"<a id='toc9_'></a>\n",
Expand All @@ -611,6 +617,7 @@
},
{
"cell_type": "markdown",
"id": "5fa481bf",
"metadata": {},
"source": [
"<a id='toc9_1_'></a>\n",
Expand Down Expand Up @@ -643,6 +650,7 @@
},
{
"cell_type": "markdown",
"id": "a5ade4b3",
"metadata": {},
"source": [
"<a id='toc10_'></a>\n",
Expand Down Expand Up @@ -782,6 +790,7 @@
},
{
"cell_type": "markdown",
"id": "790f47cb",
"metadata": {},
"source": [
"<a id='toc13_'></a>\n",
Expand Down
Loading