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
47 changes: 47 additions & 0 deletions .github/workflows/ci-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci-examples

on:
push:
pull_request:
types:
- closed
branches:
- main

jobs:
run:
name: ci ${{ matrix.os }}-${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.12']
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install requirements
run: python -m pip install -r requirements.txt

- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: pip freeze
run: python -m pip freeze

- name: run tests examples
run: |
pip install pytest
PYTHONPATH=. UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_xrun_doc/test_documentation_examples.py -v
47 changes: 47 additions & 0 deletions .github/workflows/ci-notebook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci-notebooks

on:
push:
pull_request:
types:
- closed
branches:
- main

jobs:
run:
name: ci ${{ matrix.os }}-${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.12']
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install requirements
run: python -m pip install -r requirements.txt

- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: pip freeze
run: python -m pip freeze

- name: run tests notebooks
run: |
pip install pytest
PYTHONPATH=. UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_xrun_doc/test_documentation_notebook.py -v
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: ci-tests

on:
push:
Expand All @@ -10,7 +10,7 @@ on:

jobs:
run:
name: to-${{ matrix.torch }}-tr-${{ matrix.transformers }}-ci ${{ matrix.os }}-${{ matrix.python }}
name: ci ${{ matrix.os }}-${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -45,9 +45,3 @@ jobs:
run: |
pip install pytest
PYTHONPATH=. UNITTEST_GOING=1 pytest --durations=10 _unittests --ignore-glob=**pygame*.py --ignore _unittests/ut_xrun_doc/test_documentation_examples.py --ignore _unittests/ut_xrun_doc/test_documentation_notebook.py

- name: run tests examples
run: PYTHONPATH=. UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_xrun_doc/test_documentation_examples.py -v

- name: run tests notebooks
run: PYTHONPATH=. UNITTEST_GOING=1 pytest --durations=10 _unittests/ut_xrun_doc/test_documentation_notebook.py -v
6 changes: 1 addition & 5 deletions _doc/api/tools/index.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@

teachpyx.tools
==============


.. toctree::
:maxdepth: 1
:caption: submodules


display/index


.. toctree::
:maxdepth: 1
:caption: modules


data_helper
graphviz_helper
helpers
profiling

pandas

.. automodule:: teachpyx.tools
:members:
Expand Down
7 changes: 7 additions & 0 deletions _doc/api/tools/pandas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

teachpyx.tools.pandas
=====================

.. automodule:: teachpyx.tools.pandas
:members:
:no-undoc-members:
2 changes: 1 addition & 1 deletion _doc/articles/2024/2024-03-01-route2024.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Séance 2 (2/2)

* arbre de régression, arbre de classification
* random forest, boosting trees
(:epkg:`xgboost`, :epkg:`lightgtbm`, :epkg:`catboost`),
(:epkg:`xgboost`, :epkg:`lightgbm`, :epkg:`catboost`),
:ref:`RandomForest, Overfitting <nbl-practice-ml-ml_a_tree_overfitting>`
* Gradient Boosting, :ref:`Gradient Boosting et Learning Rate avec les Random Forest <nbl-practice-ml-gradient_boosting>`
* Régression Linéaire et contraintes sur les coefficients,
Expand Down
87 changes: 87 additions & 0 deletions _doc/articles/2026/2026-03-15-route2026-ml.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.. _l-feuille-route-2026:

=========================================
2026-03-15 : feuille de route 2025 - mars
=========================================

site web : `sdpython.github.io <https://sdpython.github.io/>`_

`Apprendre la programmation avec Python
<https://sdpython.github.io/doc/teachpyx/dev/>`_

Autres sites :

* Python pour la data science <https://pythonds.linogaliana.fr/>`_ (Lino Galiana - ENSAE)

Fonctions utiles:

* :func:`teachpyx.tools.pandas.read_csv_cached`

Séance 1 (6/2)
==============

* rappels sur la régression, classification, clustering, ACP, prétraitements
* train test, validation croisée
* rappels sur l'apprentissage d'un arbre de régression

*présentation de modules*

* données : :epkg:`pandas`
* graphes : :epkg:`matplotlib`, :epkg:`seaborn`, :epkg:`bokeh`, :epkg:`altair`
* cartes : :epkg:`geopandas`, :epkg:`folium`
* machine learning : :epkg:`scikit-learn`, :epkg:`skrub`, :epkg:`skore`, :epkg:`imbalanced-learn`, :epkg:`hazardous`, :epkg:`fairlearn`,
:epkg:`xgboost`, :epkg:`lightgbm`, :epkg:`catboost`
* deep learning : :epkg:`pytorch`, :epkg:`transformers`, :epkg:`diffusers` et aussi :epkg:`HuggingFace Hub`

*demain*

* utilisation de ChatGPT, Gemini (et autres...), retour d'expérience
* et ensuite...

Séance 2 (13/2)
===============

* tests unitaires
* pipelines : pourquoi en faire

Séance 3 (27/2)
===============

Séance 4 (6/3)
==============

Séance 5 (13/3)
===============

Séance 6 (20/3)
===============

Evaluation
==========

* `https://defis.data.gouv.fr/ <https://defis.data.gouv.fr/>`_
* le projet doit inclure au moins un graphe
*Partial Dependence* ou *Permutation Importance* (voir liens ci-dessus)
* soutenance ?

Quelques jeux de données
========================

* `Parcoursup 2025 - vœux de poursuite d'études et de réorientation dans l'enseignement supérieur et réponses des établissements
<https://www.data.gouv.fr/datasets/parcoursup-2025-voeux-de-poursuite-detudes-et-de-reorientation-dans-lenseignement-superieur-et-reponses-des-etablissements>`_
* `Patrimoine immobilier des opérateurs de l’Enseignement supérieur
<https://www.data.gouv.fr/datasets/patrimoine-immobilier-des-operateurs-de-lenseignement-superieur>`_
* `Prix des carburants en France - Flux quotidien
<https://www.data.gouv.fr/datasets/prix-des-carburants-en-france-flux-quotidien-1>`_
* `Prix des carburants en France - Flux instantané - v2
<https://www.data.gouv.fr/datasets/prix-des-carburants-en-france-flux-instantane-v2-amelioree>`_
* `Séries sur les surfaces, rendements, production céréales
<https://visionet.franceagrimer.fr/Pages/SeriesChronologiques.aspx?menuurl=SeriesChronologiques/productions%20vegetales/grandes%20cultures/surfaces,productions,rendements>`_
* `Effectifs d'étudiants inscrits dans les établissements et les formations de l'enseignement supérieur - détail par établissements
<https://www.data.gouv.fr/datasets/effectifs-detudiants-inscrits-dans-les-etablissements-et-les-formations-de-lenseignement-superieur-detail-par-etablissements>`_
* `Résultats du contrôle sanitaire de l'eau distribuée commune par commune
<https://www.data.gouv.fr/datasets/resultats-du-controle-sanitaire-de-leau-distribuee-commune-par-commune>`_
* `Résultats du contrôle sanitaire de l'eau du robinet <https://www.data.gouv.fr/datasets/resultats-du-controle-sanitaire-de-leau-du-robinet>`_
* `Données climatologiques de base - horaires <https://www.data.gouv.fr/datasets/donnees-climatologiques-de-base-horaires>`_
* `Données climatologiques de base - mensuelles <https://www.data.gouv.fr/datasets/donnees-climatologiques-de-base-mensuelles>`_

6 changes: 6 additions & 0 deletions _doc/articles/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Collections d'articles périssables

Ou *blog*.

.. toctree::
:caption: 2026
:maxdepth: 1

2026/2026-03-15-route2026-ml

.. toctree::
:caption: 2025
:maxdepth: 1
Expand Down
Loading