KhiopsML / khiops-python

The Python library of the Khiops AutoML suite
https://khiops.org
BSD 3-Clause Clear License
8 stars 1 forks source link

Scenarios' `MaxCoreNumber`, `MemoryLimit` and `TemporaryDirectoryName` `AnalysisSpec.SystemParameters` Are Set via Environment-set Values #263

Open popescu-v opened 3 weeks ago

popescu-v commented 3 weeks ago

Description

Currently, Khiops scenarios's MaxCoreNumber, MemoryLimit and TemporaryDirectoryName SystemParameters are set either from a custom GeneralOptions instance, or from KhiopsRunner's general_options attribute. But, the GeneralOptions's attributes max_cores, max_memory_mb and khiops_temp_dir are initialized from khiops_env KHIOPS_PROC_NUMBER, KHIOPS_MEMORY_LIMIT and KHIOPS_TMP_DIR attributes, respectively.

However:

Hence, these are global settings which set bounds for any processing done by Khiops in the current working session.

However, Khiops scenarios' parameters SystemParameters.{MaxCoreNumber,MemoryLimit,TemporaryDirecytoryName} are local to each processing (i.e. to each Core API call), hence:

Questions/Ideas

folmos-at-orange commented 3 weeks ago

So, these parameters will be part of the official API ? Not only for Python ?

folmos-at-orange commented 2 weeks ago

One detail: When executing a large quantity small tasks is often convenient to execute with just 1 CPU because the overhead coming from the MPI process creation dominates the execution time. This overhead is worse on machines with many CPUs.

So when an API with max_cores set to 1 or 2 I think MPI should not be used on execution.