Skip to content
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

[FEA] Use environment variables to set thresholds in static yaml configurations #1387

Closed
amahussein opened this issue Oct 17, 2024 · 1 comment · Fixed by #1389
Closed

[FEA] Use environment variables to set thresholds in static yaml configurations #1387

amahussein opened this issue Oct 17, 2024 · 1 comment · Fixed by #1389
Assignees
Labels
cicd feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python)

Comments

@amahussein
Copy link
Collaborator

amahussein commented Oct 17, 2024

Is your feature request related to a problem? Please describe.

Currently, we have some thresholds hardcoded in the yaml configurations of the qualification/profiling tool.
Recently, the daily QA tests are failing because the totalCoreSecThreshold defined in qualification-conf.yaml is too strict which causes all the eventlogs to be filtered out.
In general, we should be able:

  • to configure those thresholds without need to rebuild the entire wheel package
  • to control those thresholds on user environments

Describe the solution you'd like

Modify the tools to parse the yaml file after resolving the environment variables. The variable will use the default if no env_variable is defined.
This will be done for both spillThresholdBytes, and totalCoreSecThreshold
For example:

local:
  output:
     topCandidates:
        spillBased:
           spillThresholdBytes:  !ENV ${RAPIDS_USER_TOOLS_SPILL_BYTES_THRESHOLD:10737418240}
local:
  output:
     topCandidates:
        additionalHeuristics:
          totalCoreSecThreshold: !ENV ${RAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD:691200}

The ENV_VAR names follow the same pattern commonly used "RAPIDS_USER_TOOLS_*". If we want that shorter, I like to change all other env_variables.

CC: @mattahrens @tgravescs

@amahussein amahussein added ? - Needs Triage feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python) labels Oct 17, 2024
@amahussein amahussein self-assigned this Oct 17, 2024
@amahussein
Copy link
Collaborator Author

@parthosa
I have a fix for this.
We will need to add those environment variables in the CI-CD/QA/unit tests if we want to specify different environmental settings

amahussein added a commit to amahussein/spark-rapids-tools that referenced this issue Oct 21, 2024
…ions

Signed-off-by: Ahmed Hussein <[email protected]>

Fixes NVIDIA#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-var `RAPIDS_USER_TOOLS_SPILL_BYTES_THRESHOLD`.
- `totalCoreSecThreshold` defined in qualification-conf.yaml can be
  overridden by an env-var `RAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD`.

Usage:

```
export RAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD=1024
spark_rapids <args>
```
amahussein added a commit that referenced this issue Oct 21, 2024
…ions (#1389)

* Use environment variables to set thresholds in static yaml configurations

Signed-off-by: Ahmed Hussein <[email protected]>

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-var `RAPIDS_USER_TOOLS_SPILL_BYTES_THRESHOLD`.
- `totalCoreSecThreshold` defined in qualification-conf.yaml can be
  overridden by an env-var `RAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD`.

Usage:

```
export RAPIDS_USER_TOOLS_CORE_SECONDS_THRESHOLD=1024
spark_rapids <args>
```

---------

Signed-off-by: Ahmed Hussein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python)
Projects
None yet
1 participant