Skip to content

Commit 7cf8c15

Browse files
authored
Merge pull request #353 from KhiopsML/dev-v10
Release 10.3.0.0
2 parents b8eaf88 + 6c15ab2 commit 7cf8c15

File tree

82 files changed

+947
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+947
-574
lines changed

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/generic-issue-template.md

File renamed without changes.

.github/workflows/conda.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Conda Package
33
env:
44
# Note: The default Khiops version must never be an alpha release as they are
55
# ephemeral. To test alpha versions run the workflow manually.
6-
DEFAULT_KHIOPS_CORE_VERSION: 10.2.4
6+
DEFAULT_KHIOPS_CORE_VERSION: 10.3.0
77
DEFAULT_SAMPLES_VERSION: 10.2.4
88
on:
99
workflow_dispatch:
1010
inputs:
1111
khiops-core-version:
12-
default: 10.2.4
12+
default: 10.3.0
1313
description: khiops-core version for testing
1414
khiops-samples-version:
1515
default: 10.2.4
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install Miniforge
5252
uses: conda-incubator/setup-miniconda@v3
5353
with:
54-
miniforge-version: latest
54+
miniforge-version: 24.11.0-0
5555
python-version: '3.12'
5656
conda-remove-defaults: true
5757
- name: Install Dependency Requirements for Building Conda Packages
@@ -90,7 +90,7 @@ jobs:
9090
- name: Install Miniforge
9191
uses: conda-incubator/setup-miniconda@v3
9292
with:
93-
miniforge-version: latest # needed for macOS 13
93+
miniforge-version: 24.11.0-0
9494
python-version: ${{ matrix.python-version }}
9595
conda-remove-defaults: true
9696
- name: Download Conda Package Artifact
@@ -185,7 +185,7 @@ jobs:
185185
- name: Install Miniforge
186186
uses: conda-incubator/setup-miniconda@v3
187187
with:
188-
miniforge-version: latest
188+
miniforge-version: 24.11.0-0
189189
python-version: '3.12'
190190
conda-remove-defaults: true
191191
- name: Install Requirement Packages
@@ -201,9 +201,9 @@ jobs:
201201
if [[ "$ANACONDA_CHANNEL" == "khiops" ]]
202202
then
203203
anaconda --token "${{ secrets.KHIOPS_ANACONDA_CHANNEL_TOKEN }}" upload \
204-
--user "$ANACONDA_CHANNEL" ./khiops-conda/noarch/*.tar.bz2
204+
--user "$ANACONDA_CHANNEL" ./khiops-conda/noarch/*.conda
205205
# For the dev channel: upload with forcing
206206
else
207207
anaconda --token "${{ secrets.KHIOPS_DEV_ANACONDA_CHANNEL_TOKEN }}" upload \
208-
--user "$ANACONDA_CHANNEL" --force ./khiops-conda/noarch/*.tar.bz2
208+
--user "$ANACONDA_CHANNEL" --force ./khiops-conda/noarch/*.conda
209209
fi

.github/workflows/dev-docker.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
name: Dev Docker
33
env:
4-
DEFAULT_KHIOPS_REVISION: 10.2.4
4+
DEFAULT_KHIOPS_REVISION: 10.3.0
55
DEFAULT_IMAGE_INCREMENT: 0
66
DEFAULT_SERVER_REVISION: main
77
DEFAULT_PYTHON_VERSIONS: 3.8 3.9 3.10 3.11 3.12 3.13
8+
DEFAULT_KHIOPS_GCS_DRIVER_REVISION: 0.0.11
9+
DEFAULT_KHIOPS_S3_DRIVER_REVISION: 0.0.13
810
on:
911
pull_request:
1012
paths: [packaging/docker/khiopspydev/Dockerfile.*, .github/workflows/dev-docker.yml]
1113
workflow_dispatch:
1214
inputs:
1315
khiops-revision:
1416
type: string
15-
default: 10.2.4
17+
default: 10.3.0
1618
description: Khiops Revision
1719
image-increment:
1820
type: number
@@ -34,6 +36,14 @@ on:
3436
type: string
3537
default: main
3638
description: Khiops Server Revision
39+
khiops-gcs-driver-revision:
40+
type: string
41+
default: 0.0.11
42+
description: Driver version for Google Cloud Storage remote files
43+
khiops-s3-driver-revision:
44+
type: string
45+
default: 0.0.13
46+
description: Driver version for AWS-S3 remote files
3747
concurrency:
3848
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3949
cancel-in-progress: true
@@ -55,6 +65,8 @@ jobs:
5565
echo "KHIOPSDEV_OS_CODENAME=$(echo '${{ matrix.khiopsdev-os }}' | tr -d '0-9.')" >> "$GITHUB_ENV"
5666
echo "SERVER_REVISION=${{ inputs.server-revision || env.DEFAULT_SERVER_REVISION }}" >> "$GITHUB_ENV"
5767
echo "IMAGE_URL=ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.khiopsdev-os }}" >> "$GITHUB_ENV"
68+
echo "KHIOPS_GCS_DRIVER_REVISION=${{ inputs.khiops-gcs-driver-revision || env.DEFAULT_KHIOPS_GCS_DRIVER_REVISION }}" >> "$GITHUB_ENV"
69+
echo "KHIOPS_S3_DRIVER_REVISION=${{ inputs.khiops-s3-driver-revision || env.DEFAULT_KHIOPS_S3_DRIVER_REVISION }}" >> "$GITHUB_ENV"
5870
- name: Checkout khiops-python sources
5971
uses: actions/checkout@v4
6072
- name: Set up Docker Buildx
@@ -69,9 +81,9 @@ jobs:
6981
- name: Set up the Docker Image Tags
7082
run: |
7183
set -x
72-
# Set latest only if requested and on "dev" or "main" branch
84+
# Set latest only if requested and on "dev", "dev-v10" or "main" branch
7385
if [[ "${{ inputs.set-latest }}" == "true" &&
74-
("$GITHUB_REF_NAME" == "dev" || "$GITHUB_REF_NAME" == "main") ]]
86+
("$GITHUB_REF_NAME" == "dev" || "$GITHUB_REF_NAME" == "dev-v10" || "$GITHUB_REF_NAME" == "main") ]]
7587
then
7688
DOCKER_IMAGE_TAGS="$IMAGE_URL:latest,$IMAGE_URL:$KHIOPS_REVISION.$IMAGE_INCREMENT"
7789
else
@@ -81,13 +93,18 @@ jobs:
8193
- name: Build image and push it to GitHub Container Registry
8294
uses: docker/build-push-action@v5
8395
with:
96+
# Special hostname used by the integration tests for remote file access
97+
# added using inputs because /etc/hosts is read-only for alternate builders (buildx via moby buildkit)
98+
add-hosts: s3-bucket.localhost:127.0.0.1
8499
context: ./packaging/docker/khiopspydev/
85100
file: ./packaging/docker/khiopspydev/Dockerfile.${{ env.KHIOPSDEV_OS_CODENAME }}
86101
build-args: |
87102
"KHIOPS_REVISION=${{ env.KHIOPS_REVISION }}"
88103
"KHIOPSDEV_OS=${{ matrix.khiopsdev-os }}"
89104
"SERVER_REVISION=${{ env.SERVER_REVISION }}"
90105
"PYTHON_VERSIONS=${{ inputs.python-versions || env.DEFAULT_PYTHON_VERSIONS }}"
106+
"KHIOPS_GCS_DRIVER_REVISION=${{ env.KHIOPS_GCS_DRIVER_REVISION }}"
107+
"KHIOPS_S3_DRIVER_REVISION=${{ env.KHIOPS_S3_DRIVER_REVISION }}"
91108
tags: ${{ env.DOCKER_IMAGE_TAGS }}
92109
# Push only on manual request
93110
push: ${{ inputs.push || false }}

.github/workflows/pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
with:
122122
name: pip-package
123123
- name: Upload Pip package to the release
124-
uses: ncipollo/release-action@v1.14.0
124+
uses: ncipollo/release-action@v1.15.0
125125
with:
126126
allowUpdates: true
127127
artifacts: khiops*.tar.gz
Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
name: Unit Tests
2+
name: Tests
33
env:
44
DEFAULT_SAMPLES_REVISION: 10.2.4
5-
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.2.4
5+
DEFAULT_KHIOPS_DESKTOP_REVISION: 10.3.0
66
on:
77
workflow_dispatch:
88
inputs:
@@ -13,21 +13,21 @@ on:
1313
default: latest
1414
description: Development Docker Image Tag
1515
khiops-desktop-revision:
16-
default: 10.2.4
16+
default: 10.3.0
1717
description: Khiops Windows Desktop Application Version
18-
run-long-tests:
18+
run-expensive-tests:
1919
type: boolean
2020
required: false
2121
default: false
22-
description: Execute long tests
22+
description: Execute expensive tests
2323
pull_request:
2424
paths:
2525
- khiops/**.py
2626
- pykhiops/**.py # TODO: Remove for Khiops 11
2727
- tests/**.py
2828
- tests/resources/**
2929
- '!tests/resources/**.md'
30-
- .github/workflows/unit-tests.yml
30+
- .github/workflows/tests.yml
3131
concurrency:
3232
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3333
cancel-in-progress: true
@@ -109,10 +109,44 @@ jobs:
109109
$CONDA install -y -n "$CONDA_ENV" `grep -v "^\[" khiops.egg-info/requires.txt`
110110
rm -rf khiops.egg-info
111111
done
112-
- name: Prepare Unit Tests Environment
113-
if: github.ref != 'dev' && github.ref != 'main' && ! inputs.run-long-tests
114-
run: echo "UNITTEST_ONLY_SHORT_TESTS=true" >> "$GITHUB_ENV"
115-
- name: Run Unit Tests
112+
- name: Prepare Tests Environment
113+
if: github.ref != 'dev' && github.rev != 'dev-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
114+
run: echo "SKIP_EXPENSIVE_TESTS=true" >> "$GITHUB_ENV"
115+
- name: Prepare Integration Tests on remote files
116+
env:
117+
AWS_ENDPOINT_URL: http://localhost:4569
118+
shell: bash
119+
run: |
120+
# Prepare AWS-S3 credentials and configuration
121+
mkdir -p ${GITHUB_WORKSPACE}/.aws/
122+
cat << EOF > ${GITHUB_WORKSPACE}/.aws/credentials
123+
[default]
124+
aws_access_key_id=KEY
125+
aws_secret_access_key=SECRET
126+
EOF
127+
cat << EOF > ${GITHUB_WORKSPACE}/.aws/configuration
128+
[default]
129+
endpoint_url=${AWS_ENDPOINT_URL}
130+
region=eu-north-1
131+
EOF
132+
echo "Generated AWS credentials..."
133+
cat ${GITHUB_WORKSPACE}/.aws/credentials
134+
echo "Generated AWS configuration..."
135+
cat ${GITHUB_WORKSPACE}/.aws/configuration
136+
/scripts/run_fake_remote_file_servers.sh . # launch the servers in the background
137+
- name: Authenticate to GCP using "Workload Identity Federation"
138+
# For integration tests on GCS we use a real Google account
139+
# Retrieve the Google credentials through "Workload Identity Federation"
140+
# see https://github.com/google-github-actions/auth?tab=readme-ov-file#workload-identity-federation-through-a-service-account
141+
uses: google-github-actions/auth@v2
142+
with:
143+
service_account: khiops-gcs-driver-test-sa@ino-olr-dak-ideal-sbx.iam.gserviceaccount.com
144+
workload_identity_provider: projects/322269704080/locations/global/workloadIdentityPools/github/providers/my-repo
145+
# 'create_credentials_file' is true by default but let's make it explicit
146+
# After authentication, the required GOOGLE_APPLICATION_CREDENTIALS environment variable is exported
147+
# https://github.com/google-github-actions/auth?tab=readme-ov-file#inputs-miscellaneous
148+
create_credentials_file: true
149+
- name: Run Unit & Integration Tests
116150
env:
117151
KHIOPS_SAMPLES_DIR: ${{ github.workspace }}/khiops-samples
118152
KHIOPS_DOCKER_RUNNER_URL: https://localhost:11000
@@ -124,6 +158,16 @@ jobs:
124158
rmaps_base_oversubscribe: true
125159
# Oversubscribe for MPI > 4.x
126160
OMPI_MCA_rmaps_base_oversubscribe: true
161+
# for the tests with GCS
162+
GCS_BUCKET_NAME: data-test-khiops-driver-gcs/khiops_data
163+
GCS_DRIVER_LOGLEVEL: info # set to debug for diagnosis
164+
# for the tests with S3
165+
S3_DRIVER_LOGLEVEL: info # set to debug for diagnosis
166+
S3_BUCKET_NAME: s3-bucket
167+
AWS_SHARED_CREDENTIALS_FILE: ${{ github.workspace }}/.aws/credentials
168+
AWS_CONFIG_FILE: ${{ github.workspace }}/.aws/configuration
169+
# Var for tests with S3
170+
no_proxy: localhost
127171
run: |
128172
# This is needed so that the Git tag is parsed and the khiops-python
129173
# version is retrieved
@@ -138,10 +182,10 @@ jobs:
138182
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
139183
$CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
140184
done
141-
- name: Display Unit Test Reports
185+
- name: Display Test Reports
142186
uses: dorny/test-reporter@v1
143187
with:
144-
name: Unit Tests ${{ matrix.python-version }}
188+
name: Run Tests ${{ matrix.python-version }}
145189
path: >-
146190
reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml,
147191
reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
@@ -214,7 +258,7 @@ jobs:
214258
git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
215259
python setup.py egg_info
216260
217-
# Install the Pyrhon requirements
261+
# Install the Python requirements
218262
Get-Content .\khiops.egg-info\requires.txt `
219263
| Select-String -Pattern '^\[' -NotMatch `
220264
| Select-String -Pattern '^$' -NotMatch `

CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66
- Example: 10.2.1.4 is the 5th version that supports khiops 10.2.1.
77
- Internals: Changes in *Internals* sections are unlikely to be of interest for data scientists.
88

9+
## 10.3.0.0 - 2025-02-10
10+
11+
### Fixed
12+
- (`core`) Dictionary file `.json` extension check in the `khiops.dictionary.read_dictionary_file`
13+
function.
14+
15+
### Changed
16+
- (`sklearn`) The `train_test_split_dataset` helper has been moved from `khiops.utils` to
17+
`khiops.sklearn`.
18+
- (`sklearn`) The `transform_pairs` parameter of the `KhiopsEncoder` sklearn estimator has been
19+
renamed to `transform_type_pairs`.
20+
21+
### Removed
22+
- (`sklearn`) The `is_fitted_` estimator attribute. The Scikit-learn `check_is_fitted` function
23+
can be used to test the fitted state of the estimators.
24+
- (`sklearn`) The `n_pairs` parameter of the `KhiopsRegressor` sklearn estimator. It was never
25+
supported.
26+
927
## 10.2.4.0 - 2024-12-19
1028

1129
### Added
@@ -87,7 +105,7 @@
87105

88106
### Fixed
89107
- `core`
90-
- Metric name search in estimator analyis report.
108+
- Metric name search in estimator analysis report.
91109

92110
## 10.2.1.0 - 2024-03-26
93111

@@ -219,7 +237,7 @@ Note: This release marks the open sourcing of Khiops:
219237
- Estimators now accept dataframes with numerical column indexes.
220238
- `KhiopsClassifier` now accepts integer target vectors.
221239
- `classes_` estimator attribute for `KhiopsClassifier` (available once fitted).
222-
- `feature_names_out_` estimator attirbute for `KhiopsEncoder` (available once fitted).
240+
- `feature_names_out_` estimator attribute for `KhiopsEncoder` (available once fitted).
223241
- `export_report_file` and `export_dictionary_file` to export Khiops report and dictionary files
224242
once the estimators are fitted.
225243
- `internal_sort` parameter for estimators that may be used to not sort the tables on the

doc/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

doc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Khiops Python library.
1515

1616
# You'll also need a system-wide installation of pandoc (https://pandoc.org)
1717

18-
# Execute this if there were non commited updates to samples.py or samples_sklearn.py:
18+
# Execute this if there were non committed updates to samples.py or samples_sklearn.py:
1919
# ./convert-samples-hook
2020

2121
# To clean the html documentation
@@ -29,7 +29,7 @@ Khiops Python library.
2929
./create-doc -d -t
3030

3131
# To only execute Sphinx on updated reST resources
32-
# make html
32+
# sphinx-build -M html . _build/
3333
```
3434

3535
## Sphinx

doc/clean-doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ parse_commandline "$@"
7575
rm -v core/generated/*.rst
7676
rm -v sklearn/generated/*.rst
7777
rm -v internal/generated/*.rst
78-
make clean
78+
sphinx-build -M clean . _build
7979

8080
if [[ $_arg_clean_tutorial == "on" ]]
8181
then

doc/conf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
######################################################################################
2+
# Copyright (c) 2023-2025 Orange. All rights reserved. #
3+
# This software is distributed under the BSD 3-Clause-clear License, the text of #
4+
# which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5+
# see the "LICENSE.md" file for more details. #
6+
######################################################################################
17
"""Khiops Python Sphinx configuration file"""
28

39
import os
@@ -92,12 +98,11 @@
9298
"color-admonition-title-background--note": "#CC6100",
9399
"font-stack": "Helvetica Neue, Helvetica, sans-serif",
94100
},
95-
"source_repository": "https://github.com/khiopsml/khiops/",
96101
# Sets the Github Icon (the SVG is embedded, copied from furo's repo)
97102
"footer_icons": [
98103
{
99104
"name": "GitHub",
100-
"url": "https://github.com/khiopsml/khiops",
105+
"url": "https://github.com/khiopsml/khiops-python",
101106
"html": """
102107
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
103108
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>

0 commit comments

Comments
 (0)