-
Notifications
You must be signed in to change notification settings - Fork 2
245 support the new version of khiops env #252
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
Conversation
7eafdbd to
377f93a
Compare
bca99b4 to
bdda12b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All minor stuff.
However, it doesn't work in macOS. A change in khiops_env is necessary.
Update:
I'd also make private get_linux_distribution_name , check_samples_dir and get_dir_status so they dont pollute the documentation.
|
8abc494 to
1933dc6
Compare
e28fb9d to
ec07ebe
Compare
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
No description provided.