Open popescu-v opened 1 month ago
It suffices to add a --environment
option that gives the path to the desired khiops_env
.
Alternative simple: réutiliser le paramètre existant binaries
pour y cherche le khiops_env
en priorité, et si non trouvé se rabattre sur la recherche des binaires comme actuellement
Alternative simple: réutiliser le paramètre existant
binaries
pour y cherche lekhiops_env
en priorité, et si non trouvé se rabattre sur la recherche des binaires comme actuellement
Indeed, we can reuse this parameter as follows:
khiops_env
is found in the binaries
directory, then the paths to the Khiops MODL_*
and MODL_Coclustering
binaries can be updated according to the values of the KHIOPS_PATH
and KHIOPS_COCLUSTERING_PATH
environment variables, respectively;Concretely, the changes would need to be done in the kht_test.py
/ build_tool_exe_path
function, in the form of an if / else
test on the existence of khiops_env
in the tool_binaries_dir
directory:
khiops_env
is found inside tool_binaries_dir
, then:
tool_name
equals KHIOPS
, then assign tool_exe_path
the value of KHIOPS_PATH
;tool_name
equals COCLUSTERING
, then assign tool_exe_path
the value of KHIOPS_COCLUSTERING_PATH
;
accessorily:error_message
accordingly if at least one of them does not;os.environ
according to the output of tool_binaries_dir/khiops_env --env
;os.environ["KHIOPS_MPI_COMMAND"]"
would need to be used in the kht_test.py
/ evaluate_tool_on_test_dir
function in order to update khiops_params
; also, the other updates of os.environ
with the various MPI-specific variables could be removed;
Description
Currently,
kht_test.py
inLearningTestTool/py
does not use the settings inkhiops_env
. This entails that, in order to make sure thatLearningTestTool
tests Khiops in (real) user-like conditions,LearningTestTool
needs to replicatekhiops_env
settings.For example, to match the
export MPICH__INTERFACE_HOSTNAME=localhost
command inkhiops_env
on MacOS,kht_test.py
needs to detect the "Darwin" platform and replicatekhiops_env
behavior by adding the-host localhost
options tompiexec
, which achieve the same effect (related issue on this point: #401).The goal of this issue is to make
LearningTestTool
launchable in two modes:khiops_env --env
to read the MPI command (and other settings); usable:Context
khiops -o scenario._kh
): Anykhiops -s
): All supported