245 support the new version of khiops env#252
Merged
Conversation
folmos-at-orange
requested changes
Oct 8, 2024
7eafdbd to
377f93a
Compare
folmos-at-orange
requested changes
Oct 10, 2024
bca99b4 to
bdda12b
Compare
folmos-at-orange
requested changes
Oct 10, 2024
Collaborator
Author
|
8abc494 to
1933dc6
Compare
folmos-at-orange
approved these changes
Oct 14, 2024
e28fb9d to
ec07ebe
Compare
folmos-at-orange
approved these changes
Oct 14, 2024
Thusly, various `KhiopsLocalRunner` attributes' values are sourced from the `khiops_env` script on all platforms: - `mpi_command_args`: set according to `KHIOPS_MPI_COMMAND` - `max_cores`: set according to `KHIOPS_PROC_NUMBER` Note: as `KHIOPS_MPI_COMMAND` depends on `KHIOPS_PROC_NUMBER`, `max_cores` cannot be updated directly on an existing `KhiopsLocalRunner` instance; to update this parameter, one needs to: 1. set the `KHIOPS_PROC_NUMBER` environment variable 2. create a new `KhiopsLocalRunner` instance - `max_memory_mb`: set according to `KHIOPS_MEMORY_LIMIT` - `khiops_temp_dir`: set according to `KHIOPS_TMP_DIR` - `khiops_path`: set according to `KHIOPS_PATH` - `khiops_coclustering_path`: set according to `KHIOPS_COCLUSTERING_PATH` This change also entails that: - the following environment variables are no longer used: - `KHIOPS_MPI_COMMAND_ARGS` - `KHIOPS_MPIEXEC_PATH` - `KHIOPS_MPI_LIB` - `KHIOPS_HOME` on Windows operating systems - the MPI command can be further customized, on distributed environments only, according to the new `khiops_env` script, via the `KHIOPS_MPI_HOST_FILE` environment variable, that is only used by `khiops_env` for customizing the MPI command - the MPI command is exposed as the `KHIOPS_MPI_COMMAND` environment variable that is set by the `khiops_env` script and cannot be changed by the user directly
ec07ebe to
baeb172
Compare
`bin` is not necessarily present; `mpiexec` can be anywhere.
Namely:
- call `_initialize_khiops_environment` only once, in
`KhiopsLocalRunner`'s `__init__` method
- initially set the global `_khiops_runner` to `None`
- in the `get_runner` function:
- if the global `khiops_runner` is `None`, then:
- create `KhiopsLocalRunner` instance, which initializes the
environment
- set the global `_khiops_runner` to the `KhiopsLocalRunner` instance
- return `_khiops_runner`, as before
Thusly, `KhiopsLocalRunner`'s environment is fully initialized upon
creation.
Only `khiops_version` is initialized lazily because this needs
a call to Khiops binaries, which incurs a time / performance cost and
hence is done only when needed.
This path change was meant to test issue #209, which is moot in our case, because: - all currently supported Linux distributions (Ubuntu 20.04, 22.04, 24.04; Rocky 8, 9; Debian 10, 11, 12) have `/usr/bin` before `/bin` in `PATH` - the Arch Linux distribution that is mentioned in the above-cited issue is not currently supported.
Thus, we ensure a `khiops-core` version that uses the updated `khiops_env` is installed.
…ops-core) TODO: Revert this just before merging PR #223
TODO: Revert after: - building `latest` on `dev` with the proper `10.2.3` Khiops version (once the Khiops 10.2.3 release is done) - merging this PR
baeb172 to
91ccb46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.