From 18d6c252f4d64800b84de15c7f190c4512f9e0d2 Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Wed, 3 Jul 2024 09:52:19 +0200 Subject: [PATCH 1/8] ENH: logos in ReadMe --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3259bd66..74008db2 100644 --- a/README.md +++ b/README.md @@ -210,9 +210,20 @@ The use of this software is under the MIT license, with no limitation of usage, Choice-Learn has been developed through a collaboration between researchers at the Artefact Research Center and the laboratory MICS from CentraleSupélec, Université Paris Saclay. -[![](./docs/illustrations/logos/logo_arc.png)](https://www.artefact.com/data-consulting-transformation/artefact-research-center/) | [![](./docs/illustrations/logos/artefact_logo.png)](https://www.artefact.com/) | [![](./docs/illustrations/logos/logo_CS.png)](https://mics.centralesupelec.fr/) | [![](./docs/illustrations/logos/logo_paris_saclay.png)](https://www.universite-paris-saclay.fr/) -:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------: +
+

+ + +

+ +

+ + + + +

+
## References From f7908f7a87cbc8fc583c98a57f2d530f9fe59b7c Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 11:07:51 +0100 Subject: [PATCH 2/8] attempt at fixing test report --- .github/workflows/ci.yaml | 3 ++- requirements-developer.txt | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f85d8ae1..107ac02b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,8 @@ jobs: - name: Build coverage file run: | - pytest -n auto --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt + pytest --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt + cat pytest-coverage.txt - name: Pytest coverage comment uses: VincentAuriau/pytest-coverage-comment@main diff --git a/requirements-developer.txt b/requirements-developer.txt index 9f2ad890..ba58cf17 100644 --- a/requirements-developer.txt +++ b/requirements-developer.txt @@ -3,8 +3,7 @@ griffe<=0.48 ruff==0.1.2 pre-commit==3.3.3 pytest==7.3.2 -pytest-cov -pytest-xdist +coverage python-markdown-math mkdocs==1.5.3 mkdocs-material==9.5.3 From 7ef9843b16fde4e8bcd4fc3299c7f489ea848848 Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 11:15:10 +0100 Subject: [PATCH 3/8] roll back to pytest-cov --- requirements-developer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-developer.txt b/requirements-developer.txt index ba58cf17..ea365591 100644 --- a/requirements-developer.txt +++ b/requirements-developer.txt @@ -3,7 +3,7 @@ griffe<=0.48 ruff==0.1.2 pre-commit==3.3.3 pytest==7.3.2 -coverage +pytest-cov python-markdown-math mkdocs==1.5.3 mkdocs-material==9.5.3 From 7e9f81c1a76b6e87e67b4978247fbe47301677f8 Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 11:57:27 +0100 Subject: [PATCH 4/8] reading actions --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 107ac02b..a401054d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-developer.txt + pip list - name: Build coverage file run: | From 5977dbdf493137e756998c815ba05d14166d36c7 Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 12:03:24 +0100 Subject: [PATCH 5/8] upgrade TF version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 93cb5e6d..d54f46ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy>=1.24 pandas>=1.5 -tensorflow>=2.14, <2.17 +tensorflow>=2.18, <2.19 tensorflow_probability>=0.22 tf_keras<3 tqdm>=4.0 From 2e48dcbc079c03c41617f1357012a89ad9a4289e Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 12:29:04 +0100 Subject: [PATCH 6/8] np.product -> np.prod --- .github/workflows/ci.yaml | 2 +- choice_learn/models/latent_class_base_model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a401054d..0e4e6ea4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: - name: Build coverage file run: | - pytest --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt + pytest -n auto --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt cat pytest-coverage.txt - name: Pytest coverage comment diff --git a/choice_learn/models/latent_class_base_model.py b/choice_learn/models/latent_class_base_model.py index adfd7550..2f9321af 100644 --- a/choice_learn/models/latent_class_base_model.py +++ b/choice_learn/models/latent_class_base_model.py @@ -360,7 +360,7 @@ def _lbfgs_train_step(self, choice_dataset, sample_weight=None): part = [] # partition indices for i, shape in enumerate(shapes): - n = np.product(shape) + n = np.prod(shape) idx.append(tf.reshape(tf.range(count, count + n, dtype=tf.int32), shape)) part.extend([i] * n) count += n From 3a83e5272b6bba60f1773b89bd76d3f13c07835a Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 12:40:30 +0100 Subject: [PATCH 7/8] fixes --- .github/workflows/ci.yaml | 2 +- requirements-developer.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e4e6ea4..7183198d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,11 +24,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-developer.txt - pip list - name: Build coverage file run: | pytest -n auto --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt + echo exit_code: $? cat pytest-coverage.txt - name: Pytest coverage comment diff --git a/requirements-developer.txt b/requirements-developer.txt index ea365591..9f2ad890 100644 --- a/requirements-developer.txt +++ b/requirements-developer.txt @@ -4,6 +4,7 @@ ruff==0.1.2 pre-commit==3.3.3 pytest==7.3.2 pytest-cov +pytest-xdist python-markdown-math mkdocs==1.5.3 mkdocs-material==9.5.3 From 98660c7a78934fdedaf751096b722a837d5424cb Mon Sep 17 00:00:00 2001 From: VincentAURIAU Date: Mon, 23 Dec 2024 13:00:16 +0100 Subject: [PATCH 8/8] test --- .github/workflows/ci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7183198d..377d62e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,10 @@ jobs: - name: Build coverage file run: | + set -e + echo before: $? + python -m pytest tests/ + echo exit_code btw: $? pytest -n auto --junitxml=pytest.xml --cov-report=term-missing --cov=choice_learn tests/ | tee pytest-coverage.txt echo exit_code: $? cat pytest-coverage.txt