Skip to content

Test "unhappy" installation paths #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
marcboulle opened this issue Nov 29, 2024 · 4 comments · May be fixed by #402
Open

Test "unhappy" installation paths #301

marcboulle opened this issue Nov 29, 2024 · 4 comments · May be fixed by #402
Assignees
Labels
Priority/0-High To do now Size/Days Some days of work Status/ReadyForDev The issue is ready to be developed or to be investigated deeply
Milestone

Comments

@marcboulle
Copy link

Description

Pykhiops peut être installé de deux façons différentes, via conda ou via pip.
Ces installations sont testées extensivement, pour arriver à un fonctionnement correctement de pykhiops.

En revanche, comme l'utilisateur peut à tout moment lancer une action d'installation ou désinstallation de Khiops core ou de pykhiops, via pip ou conda, il faut également tester tous les états possibles issus des actions utilisateurs.

C'est important, car toutes ces actions sont "normales" dans de nombreux cas d'usage, quand on ne connait pas bien l'état en cours d'une machine: installation d'une nouvelle version, installation sur une machine, en n'ayant pas utilisé l'outil depuis longtemps, intervention sur la machine d'un collègue...
Tout ce qui peut arriver par un chemin quelconque d'installation arrivera, et il est moins cher de le tester a priori, que de fournir un support à posteriori en cas de problème, voire un patch des outils.

Questions/Ideas

On peut formaliser le problème des tests systématiques des chemins d'installation au moyen d'un diagramme états-transitions.

Il y a trois composant techniques:

  • K: khiops core
  • C: pykhiops via conda
  • P: pykhiops via pip

et deux types d'action:

  • i: installation
  • u: desinstallation (uninstall)

Cela donne les états possibles d'une machine:

  • états "happy":
    • (): vide
    • (K): Khiops core
    • (C): pykhiops via conda
    • (KP): pykhiops via pip, avec utilisation de Khiops core
    • (KC): pykhiops via conda, plus Khiops core (usage "normal" via la librairie, et via la GUI)
  • état "unhappy"
    • (P): pykhiops via pip, sans son prérequis Khiops core
    • (KPC): pykhiops a la fois via conda et via Khiops core
    • (PC): pykhiops via conda, et via pip sans prérequis Khiops core

Les transitions possibles sont

  • installation: iK, iC, iP
  • désinstallation: uK, uC, uP

Globalement, on a donc huit états et six transitions, donc 48 changements d'états à tester, bien au delà des quelques tests du "happy" path.

On doit s'assurer que:

  • quelque soit le chemin, on ne peut pas découvrir un nouvel état "cassé" au delà des huit états possibles
  • quelque soit l'état, toute transition est possible
    • cela ne sert à rien d'interdire une transition, car on peut arriver à un état par un autre chemin
    • l'état final ne dépend pas de l'ordre des transitions
  • quelque soit l'état, on a soit un état fonctionnel cohérent, soit un message d'erreur explicite, permettant à l'utilisateur de repasser à un état fonctionnel de façon autonome (sans support)
  • pour les états mixant installation via pip et via conda: quand on lance python "naïvement" (par exemple via pycharm):
    • peut-on forcer l'usage de pykhiops via conda ou pip?
    • peut-on savoir s'il s'agit d'une installation via pip ou conda?
    • peut-on savoir quelle est la version de Khiops utilisée (si versions distinctes de pykhiops conda et de Khiops core)?
@folmos-at-orange folmos-at-orange added Status/Draft The issue is still not well defined Type/DevChore labels Dec 4, 2024
popescu-v added a commit to KhiopsML/khiops that referenced this issue Dec 5, 2024
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

Note: `KHIOPS_MPI_COMMAND` might still contain the incorrect `mpiexec`,
in the following (rather unlikely) scenario:
- `khiops_env` is run in a "Conda-based" environment
- there is a preexisting system-wide MPI installation which contains
  `mpiexec`.
This should be mitigated following the Khiops Python issue
KhiopsML/khiops-python#301.

closes #476
popescu-v added a commit to KhiopsML/khiops that referenced this issue Dec 5, 2024
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

Note: `KHIOPS_MPI_COMMAND` might still contain the incorrect `mpiexec`,
in the following (rather unlikely) scenario:
- `khiops_env` is run in a "Conda-based" environment
- there is a preexisting system-wide MPI installation which contains
  `mpiexec`.
This should be mitigated following the Khiops Python issue
KhiopsML/khiops-python#301.

closes #476
popescu-v added a commit to KhiopsML/khiops that referenced this issue Dec 5, 2024
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

Note: `KHIOPS_MPI_COMMAND` might still contain the incorrect `mpiexec`,
in the following (rather unlikely) scenario:
- `khiops_env` is run in a "Conda-based" environment
- there is a preexisting system-wide MPI installation which contains
  `mpiexec`.
This should be mitigated following the Khiops Python issue
KhiopsML/khiops-python#301.

closes #476
popescu-v added a commit to KhiopsML/khiops that referenced this issue Dec 5, 2024
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

Note: `KHIOPS_MPI_COMMAND` might still contain the incorrect `mpiexec`,
in the following (rather unlikely) scenario:
- `khiops_env` is run in a "Conda-based" environment
- there is a preexisting system-wide MPI installation which contains
  `mpiexec`.
This should be mitigated following the Khiops Python issue
KhiopsML/khiops-python#301.

closes #476
@popescu-v popescu-v added Status/ReadyForDev The issue is ready to be developed or to be investigated deeply Priority/1-Medium To do after P0 Size/Weeks Needs some weeks (big) and removed Status/Draft The issue is still not well defined labels Dec 9, 2024
@popescu-v popescu-v self-assigned this Jan 8, 2025
@popescu-v popescu-v added Priority/2-Low To do after P1 and removed Priority/1-Medium To do after P0 labels Jan 9, 2025
@lucaurelien lucaurelien added Priority/0-High To do now Size/Days Some days of work and removed Priority/2-Low To do after P1 Size/Weeks Needs some weeks (big) labels Feb 13, 2025
@popescu-v
Copy link
Collaborator

popescu-v commented Feb 13, 2025

This issue does not include automatic tests in the CI. A subsequent issue will be created for this. Issue created: #382 .

@lucaurelien lucaurelien added this to the 11.0.0.0 milestone Feb 13, 2025
@popescu-v
Copy link
Collaborator

Improve diagnosing capabilities of kh-status.

@popescu-v
Copy link
Collaborator

Start by defining the matrix of target "unhappy" installation environments.

thekester pushed a commit to thekester/khiops that referenced this issue Mar 22, 2025
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

Note: `KHIOPS_MPI_COMMAND` might still contain the incorrect `mpiexec`,
in the following (rather unlikely) scenario:
- `khiops_env` is run in a "Conda-based" environment
- there is a preexisting system-wide MPI installation which contains
  `mpiexec`.
This should be mitigated following the Khiops Python issue
KhiopsML/khiops-python#301.

closes KhiopsML#476
@popescu-v
Copy link
Collaborator

popescu-v commented Apr 14, 2025

Also check Core and Python versions match. For now, we need to check major.minor.patch.

@tramora tramora linked a pull request Apr 25, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/0-High To do now Size/Days Some days of work Status/ReadyForDev The issue is ready to be developed or to be investigated deeply
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants