Closed amahussein closed 1 month ago
CC: @viadea FYI to control spillThreshold or coreSeconds in a specific environment.
overall looks good. are we documenting these for user, or mean for more advanced configuration?
It is meant for advanced configuration. We have an internal issue opened to document all the environment-variables. Thus, if users need specific tuning for their environment we can point them to the env-variables.
Signed-off-by: Ahmed Hussein ahussein@nvidia.com
Fixes #1387
This code change aims at parsing yaml configuration file and resolving the environment variables.
spillThresholdBytes
defined in qualification-conf.yaml can be overridden by an env-varRAPIDS_USER_TOOLS_SPILL_BYTES_THRESHOLD
.totalCoreSecThreshold
defined in qualification-conf.yaml can be overridden by an env-varRAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD
.These changes improve the flexibility and maintainability of the configuration management in the
user_tools
package.Usage:
Code changes
This pull request introduces several changes to the
user_tools
package, mainly focusing on dependency updates and configuration management enhancements. The key changes include updating dependencies inpyproject.toml
, integrating thepyaml_env
library for environment variable parsing in YAML files, and modifying configuration files to support environment variable substitution.Documentation Update
Filed an issue internally to add the new env_variables to the documentation
Dependency updates and integration:
user_tools/pyproject.toml
: Updated thepyYAML
dependency to a version range and addedpyaml_env
to handle environment variables in YAML files.Code changes for environment variable parsing:
user_tools/src/spark_rapids_pytools/common/prop_manager.py
: Importedparse_config
frompyaml_env
and replacedyaml.safe_load
withparse_config
in the__open_yaml_file
method. [1] [2]user_tools/src/spark_rapids_tools/utils/propmanager.py
: Importedparse_config
frompyaml_env
and replacedyaml.safe_load
withparse_config
in theload_yaml
function. [1] [2]Configuration file enhancements:
user_tools/src/spark_rapids_pytools/resources/qualification-conf.yaml
: Modified configuration parameters to support environment variable substitution using the!ENV
tag. [1] [2]