Giter Site home page Giter Site logo

khiopsml / khiops Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 2.0 14.3 MB

Khiops is an AutoML suite for supervised and unsupervised learning

Home Page: https://khiops.org

License: BSD 3-Clause Clear License

Python 2.03% CMake 0.34% Batchfile 0.01% C 0.50% Shell 0.10% Java 2.70% C++ 93.92% Lex 0.07% NSIS 0.33%
auto-feature-engineering automatic-machine-learning automl data-science machine-learning supervised-learning unsupervised-learning

khiops's Introduction

khiops's People

Contributors

bruno-at-orange avatar folmos-at-orange avatar marcboulle avatar popescu-v avatar sgouache avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

khiops's Issues

KNI crashes witth java using Khiops V10

L'utilisation de KNI depuis Java, qui marchait avec Khiops V9, crash avec Khiops V10.
Comportement observé uniquement sous linux

Piste: gestion des signaux, mis en place depuis Khiops V10

Build Khiops-core for Linux ARM64 Architecture

Description

We already have a Conda macOS package compatible with the ARM64 architecture. However, we currently lack a Linux ARM64 version of Khiops-core. This is important for Mac users who prefer running Khiops in a Docker container (to be based on a Linux-ARM64 image). It would target Raspberry or other ARM platforms as well.

Justification

I conducted a performance benchmark comparing the native Conda installation of Khiops on macOS with an emulated Docker Linux-AMD64 image. The results are as follows:

  • Native Conda installation on macOS ARM64: The supervised Adult.txt scenario takes less than 2 seconds on a laptop.
  • Emulated Docker Linux-AMD64 image: The same scenario takes approximately 50 seconds.
    The execution time in the container may be degraded due to Docker overheads, but the inadequacy of the architecture is likely to be the main cause of performance differences.

These results show that running Khiops on a Linux-ARM64 architecture container might significantly improve performance.

Update the README for the beta release

Description

Update README for the beta release.

Questions/Ideas

  • Follow the formate of makeareade.com
  • Add install pointers to khiops.org
  • Move build instructions to dev wiki

Initialize Khiops V11 with already developed features: histograms, text, new ergonomy

Il s'agit de rapatrier dans git l'ensemble des développement en cours, depuis la version V10.1.* diffusée jusqu'à la version internes V10.4.1i, principalement pour les fonctionnalités suivantes: histogrammes, texte, nouvelle ergonomie.
Cette première version V11 sur git correspond à la prise en compte du portage Mac (prise en compte dans la V10.1.*), juste avant le début de l'intégration des développement de Carine sur le coclustering instances x variables.

Add LearningTest lite to the repo

A first proposal is to add LearningTest in the test directory with:

├── cmd
│   ├── python
├── datasets
│   ├── Adult
│   ├── Iris
│   └── Mushroom
├── MTdatasets
│   └── SpliceJunction
├── TestCoclustering
│   ├── Standard
├── TestKhiops
      └── Standard

I'm not sure it is necessary to add all these data. I was using LearningTest to test packages. For this purpose Iris.txt is good enough. We have to decide what is the purpose of LearningTest in CI

Refactor coclustering IV optimization algorithms

Il s'agit de restructurer l'implémentation des algorithmes d'optimisation du coclustering IV afin d'améliorer sa maintenabilité et son évolutivité, pour permettre dans un second temps d'améliorer les algorithmes d'optimisation.

Première étape: mutualisation des la gestion des groupe de valeurs ou de VarPart

  • envisager de fusionner KWDGValueSet et KWDGVarPartSet, KWDGValue et KWDGVarPartValue
    • utilisation d'un hiérarchie de "ValuePart", dont héritent Interval et GenericValueSet, puis ValueSet et VarPartSet
  • permettrait potentiellement de simplifier la réutilisation des algorithmes entre les cas coclustering de variables et coclustering instances x variables
  • exploitation partout ou c'est possible de ces nouvelle classes, en mutualisant les gestion des ValueSet et VarPartSet

Deuxième étape:

  • KWDataGridVNSOptimizer
    • VNSOptimizeVarPartDataGrid a fusionner avec VNSOptimizeDataGrid ?
  • CCVarPartDataGridPostOptimizer: refactoring des méthodes suivantes
    • PostOptimizeLightVarPartDataGrid (Light?)
    • ComputeVarPartsContinuousAttributeVariationCost
    • ComputeVarPartsSymbolAttributeVariationCost
    • ComputeClusterVariationCost
    • ComputeClusterCellVariationCost

Optimize performance for release binaries with Visual C++ 2022

Les performances se sont fortement dégradées depuis le passage à Visual C++ 2022, d'un facteur 3 à 4.
Le paramétrage des options de compilation via CMake doit être optimisé.

Exemples sur ma machine avec la version V10.4.6i:

  • LearningTest\TestKhiops\Standard\Adult
    • Data preparation time: 0:00:00.30 -> 0:00:01.05
    • SNB train time: 0:00:00.68 -> 0:00:02.26
    • Model deployment time: 0:00:00.09 ->0:00:00.38
  • LearningTest\TestKhiops\Classification\ForestType
    • Data preparation time: 0:00:04.45 -> 0:00:17.79
    • SNB train time: 0:01:40.30 -> 0:05:28.17
    • Model deployment time: 0:00:00.18 -> 0:00:00.95

Use CTest to run unit tests with mpi

We can setup mpi run in the CMakeLists like this:

add_test(NAME parallel-mpi COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
                                   ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_mpi_test> ${MPIEXEC_POSTFLAGS})

# Add "mpi" label to the test and set a default process number to launch.
set_tests_properties(parallel-mpi PROPERTIES LABELS "mpi" PROCESSORS ${MPIEXEC_MAX_NUMPROCS})

The parallel run is launch with:

# run all test labeled by `mpi
ctest --preset linux-gcc-release -L mpi   --output-junit output-mpi.xml

All the other tests can be launched with one line:

ctest --preset linux-gcc-release -LE mpi   --output-junit output-serial.xml

It is interesting because it is independent of the mpi implementation (mpich, openmpi etc...) and use the number of processors detected on the host.

Note: it's tempting to use the --parallel flag to execute serial tests concurrently but Khiops is not thread-safe

Modify user documentation/help to provide links to guides/samples

Pour la version open source, les fichiers de documentation (guide...) et de samples vont changer de localisation pour être hébergé sur un site web (à définir).
Il faut mettre à jour les fichiers de packaging et les panneau d'aide suivant:

  • readme.txt (pour la liste des fichiers installés)
  • install.txt: à vérifier
  • panneau d'aide (menu Help/Documentation) pour Khiops et Khiops coclustering

A faire pour la version Open source (V10.1.*) et à reporter pour la version 11

Clean Khiops git repos on internet

Avant le séminaire Khiops, Luc-Aurélien a créé les repos suivant (cf. mail Séminaire Khiops 2023 du 25/05/2023)

  • Notre GitHub officiel : [https://github.com/khiopsML]
  • Notre GitLab officiel : [https://gitlab.com/khiops]

Au moment du passage officiel a la version open source, il faudra nettoyer et harmoniser les git:

  • supprimer le gitlab?
  • organisation des repos khiops, khiops-python, samples, doc, site web, enablers, outils de visualisation...

Add return code to genere

La mise en oeuvre de genere dans les CMakeFiles (issue #6 ) necessite que genere ait un code retour. Cela permettra d'interrompre la compilation en cas de problème avec la génération des fichiers cpp de la GUI à partir des .dd.

Improve the clang-format and its management

Actuellement, l'option "ColumnLimit: 120" du fichier .clang-format rend le reformatage des fichiers instables et peu pertinent:

  • les commentaires sont reformatés selon cette limite, de façon souvent particulièrement inadaptée
    • en particulier quand c'est du code qui est commenté
  • jusqu'à une demi-douzaine de formatages sont parfois nécessaire pour arriver à stabilisation
  • cela crée une nuisance importante au moment des commits, puisque les fichiers reformatés changent

Il faudrait:

  • soit affiner les options, pour a minima exclure les commentaire du reformatage
  • soit supprimer cette option qui introduit plus de nuisance que de valeur
    • éventuellement, on peut utiliser le pre-commit pour signaler les lignes trop longue en tant que warning
    • c'est le développeur qui doit alors lui-même raccourcir ses lignes trop longues

Il faut également dans le wiki indiquer comment activer le reformatage automatique dans les IDE (notamment Visual C++)

Revision of coclustering IV optimization algorithms

Il s'agit d'améliorer les algorithme d'optimisation du coclustering IV, en visant un code plus simple et maintenable, plus rapide, et plus performant.

Les axes de reconception du code pour atteindre ces objectifs sont principalement les suivants:

  • simplification des méta-heuristique VNS, pour rendre le code plus proche de sa specification formelle par pseudo-code
  • séparation explicite de la phase préalable de granularisation, dont l'unique objectif est d'obtenir des résultats préliminaire rapidement
  • mutualisation du code d'optimisation d'un grille, entre les cas coclustering de variables et coclustering IV
  • utilisation systématique de la terminologie tokenisation pour les variables internes, pour la distinguer de la granularisation
  • choix d'un niveau de tokenisation de départ "adapté", pour éviter de faire une boucle de tokenisation
  • formalisations plus universelle de la brique de base d'optimisation selon les étapes suivantes
    • génération d'une solution aléatoire dans un voisinage de la solution optimale courante
      • intégrer une re-tokenisation aléatoire dans cette étape
    • pre-optimisation
    • optimisation de type greedy merge
    • post-optimisation
    • post-optimisation de type IV
      • intégrer dans cette étape une post-optimisation de la tokenisation

[Parallel] remove full signature of the task in the crash tests

In the crash tests scenari, we have to write the full task signature e.g. Database check_9_8_15. The signature is built starting from the number of shared variables. When the code of the task is modified, the signature may change and the scenario of the crash test is obsolete. We have to simplify this by using the task name rather than it signature.

Parallelization of the collection of tokens for text analysis

Contexte: Khiops V11, autoML pour les variables de type Text (nouveau type)

Dans le cadre de la construction de variable automatique pour les variables Text, une première phase d'analyse de la base consiste à collecter les tokens ("ngrams", "words","tokens") les plus fréquents pour créer des blocs de variables sparse.
Cette phase est actuellement implémentée en séquentiel. Il s'agit de passer l'implémentation en parallèle.

Point d'entrée:

  • KDDomainKnowledge/KDTextTokenSampleCollectionTask::CollectTokenSamples

Add LearningTest Standard in actions

We need to add an action to run LearningTest Standard to the CI/CD.
We can run the tests in serial or parallel and in release or debug.
Debug will take a long time, perhaps we split it in 2 different actions, one for release, one for debug.

Add unit test for KNI MultiTable

In the KNI unit tests, there are:

  • test side effects on Iris
  • Recoding of Iris
  • Recoding of Adult

But nothing to test side effect on MultiTable. I suggest to implement a unit test for Multi Table by using directly the KNI API (and not src/Learning/KNITransfer/KNIRecodeMTFiles.h, it too high level)

Risk management of having the git repo on internet

How to manage the risk of having the git repo on internet, if for example a malicious user cracks admin paswords and delete the depo.

  • strict policy for passwords and authentification?
  • duplicating the depo with an internal Orange depo?
  • ...

Improve and test kni packages

the new repo KhiopsNativeInterfaceTutorial will replace the documentation and samples included in the kni packages. packages. Therefore, the kni-doc packages and all data to test kni packages will disappear from the repo.

The tests of the kni packages will use a clone of KhiopsNativeInterfaceTutorial inside cicd.

Lex and Yac compilation does not work on Windows

J'ai essayé d'activer la compilation des fichiers Lex et Yac sous Windows

  • cf. fichiers CMakePresets.json, CMakeLists.txt, src\Learning\KWData\CMakeLists.txt

Cela ne marche pas.

  • corriger le problème
  • documenter sur le wiki
    • comment installer correctement les compilateur Lex et Yac sous Windows
    • comment activer la compilation Lex et Yac depuis Visual C++ 2022

Khiops CC size is twice as it was in 10.1.1 in windows

Description

The windows build (from the CI) of the MODL_Coclustering executable is twice the size (~8MB) of its previous size. So we have a compilation problem.

Questions/Ideas

  • The problem isn't present in MODL
    • Maybe we link unnecessary libraries ?
  • Reproduce in a local windows machine

Context

  • Khiops version: dev

Bug descriptives stats on huge dataset (400 GB)

Description

Bug sur le lancement de stats descriptives avec la très grande base d'Elias (environ 400 GB disk, 300 M instances, 80 variables)
Première correction: diagnostiquée par Bruno, mauvais paramétrage de pykhiops (issue reportée dans pykhiops)

Malgré cette correction, le problème persiste:

  • ça marche avec 99% de la base
  • ça plante avec 100 % de la base
  • diagnostic par Bruno, avec les traces parallèle:
    • le lancement se fait en séquentiel, en utilisant 50 Gb RAM
    • plante dans le 21 SlaveProcess (0.8% de la base) de la préparation univariée

Context

  • Khiops version: V10
  • OS description: linux Ubuntu Bionic

Distribution of packages and installers

Il s'agit de gérer la production des packages et installeurs fabriqués depuis github, leur stockage, et leur distribution via des repos ou le site web de download Khiops

  • choix des packages et installeurs à distribuer via le site web Khiops
    • les installeurs Windows
    • a priori, tous les package linux (comme pour les versions précédentes), même si ces packages peuvent également être distribués via des repos
  • spécification du lieux de stockage
    • a priori l'espace "release" de github
  • spécification de l'arborescence de stockage (par version, OS...)
  • spécification des pages de download du site web
    • une page pour la dernière version (format .md?)
    • autre(s) page(s) pour les versions précédentes
      • remarque: pour la release open source, il n'y a pas de précédentes version open source; on pourra se contenter d'un renvoi vers l'ancien site web
  • implémentation de script d'automatisation des page de download
    • input: un numéro de version
    • output: page de download au format .md, exploitant l'arborescence de stockage précédemment spécifiée

Note pour l'échéance du datacamp (mi-octobre)

  • ce ne sera pas encore la release open source "officielle", donc pas encore la version 10.2
  • incrémenter le numéro de version actuel (passer à 10.1.6)
  • bien se concerter entre FO, BG, SG et LAG pour avoir une solution consensuelle

Add Visual Studio resource files to CMake build

There are rc files for MODL, MODL_Coclustering and KhiopsNativeInterface. For the moment these resource files are not used by cmake. It should be easy to do it by adding them as source file in add_executable or add_library.

Port Khiops to macOS

  • Review CMakeFiles to remove __UNIX__ pragmas.
  • modify Norm module to build on macOS

Refactor finalization for Khiops V11

Corrections to repo:

  • keep en of lines in all file during pre-commit
    • otherwise the Windows RC compiler does not work
  • modify the Norm genere executable to be be resilient to blank space in '// ##" comments, added by the new format
    • otherwise, the genere executable does not work
  • corrections of new compiler warnings

Refactor coclustering instances x variables: simplify code, especially for classes:

  • KWDataGrid: extend Check methods
  • KWDataGridManager: mutualize common code
  • KWDataGridVNSOptimizer: idem
  • CCVarPartDataGridPostOptimizer: idem

pdf files are shrinked on deb and rpm packages

In the deb and rpm packages produced on github actions, the pdf files are shrinked:

 ls -gG usr/share/doc/khiops/
-rw-r--r-- 1   131 juin  19 16:51 KhiopsCoclusteringGuide.pdf
-rw-r--r-- 1   132 juin  19 16:51 KhiopsGuide.pdf
-rw-r--r-- 1   132 juin  19 16:51 KhiopsTutorial.pdf

When they are produced on my computer, we have

ls -gG usr/share/doc/khiops/
-rw-r--r-- 1  854509 juin  19 09:58 KhiopsCoclusteringGuide.pdf
-rw-r--r-- 1 1736158 juin  19 09:58 KhiopsGuide.pdf
-rw-r--r-- 1 4115198 juin  19 09:58 KhiopsTutorial.pdf

KNI missing KNIGetFullVersion

Description

After installation of version 10.1.1 of KNI from khiops.com on ubuntu jammy my app started crashing on KNIGetFullVersion

Questions/Ideas

I don't really need this function, since GetVersion is there.
What makes be believe this is a bug is the fact that the header file still shows the symbol, while it disappeared from the library.

Context

  • KNI v10.1.1
  • Ubuntu jammy
  • attached output from nm -gD /usr/lib/libKhiopsNativeInterface.so (listing symbols in library)
    nm.log

Fix windows unit test workflow

The windows variant of the unit test workflow fails because of a path error:

Output of Learning unit tests

Run build/windows-msvc-debug/bin/learning_test --gtest_output="xml:D:\a\khiops\khiops/reports/report-learning.xml"
Running main() from D:\a\khiops\khiops\build\windows-msvc-debug\_deps\googletest-src\googletest\src\gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from KWClass
[ RUN      ] KWClass.full
[       OK ] KWClass.full (10 ms)
[----------] 1 test from KWClass (10 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (11 ms total)
[  PASSED  ] 1 test.
NewMem alloc block warning id=3400 000001ED033172E8 (120): Block not free

Memory stats (number of pointers, and memory space)
  Alloc: 6538  Free: 6537  MaxAlloc: 1380
  Requested: 129010  Granted: 166368  Free: 166248  MaxGranted: 55248

NewMem Warning: Block not free: 1	Memory not free: 120

Output of Create unit test report

Run dorny/test-reporter@v1
Check runs will be created with SHA=0c46fadae637321e97df169a540246a4eaff6f9d
Listing all files tracked by git
Found 1390 files tracked by GitHub
Using test report parser 'jest-junit'
Creating test report Unit Tests
  Warning: No file matches path D:\a\khiops\khiops/reports/report-*.xml
Error: No test report files were found

Cmake does not work any more with Visual C++ 2022

Using Visual C++ 2022, I have the following error message
[CMake] -- The CXX compiler identification is unknown
[CMake] CMake Error at D:\Users\miib6422\Documents\boullema\DevGit\khiops\CMakeLists.txt:10 (project):
[CMake] The CMAKE_CXX_COMPILER:
[CMake]
[CMake] cl
[CMake]
[CMake] is not a full path and was not found in the PATH.
[CMake]
[CMake] Tell CMake where to find the compiler by setting either the environment
[CMake] variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path

It worked before on my PC.
It is broken since I had a patch of Windows and the following update of Visual C++ 2022:
Microsoft Visual Studio Professional 2022
Version 17.6.5
VisualStudio.17.Release/17.6.5+33829.357
Microsoft .NET Framework
Version 4.8.04084
Version installée : Professional
...

Run unit tests only when it is useful

When I work on workflows, each time I push my work, unit tests are triggered. And I am 100% sure they will pass because I don't modify the sources or the cmake files.

I suggest to trigger the unit tests based on which files are involved in the push. Some documentation here

For example:

on:
  push:
    paths:
      - '**.cpp'
      - '*.h'
      - '**/CMakeLists.txt'

MacOS build of dev-v11 doesn't work

Description

The dev-v11 branch doesnt build in macOS. This is due to a bad signature of the OpenApplication function in Portability.h

Questions/Ideas

  • Fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.