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

Refactor configuration utility tool; added support for latest Ray version #40

Merged
merged 5 commits into from Dec 1, 2021

Conversation

JainTwinkle
Copy link
Contributor

@JainTwinkle JainTwinkle commented Nov 20, 2021

Related PRs
Extending #37

What does this PR do?

This PR extends the Ray resiliency config tool. The PR does the following:

  1. The Ray config utility script now supports configurations from Ray v1.6, 1.7, and 1.8.

  2. The tool now saves config. files into their respective version directory. This is more organized as compared to saving files from all Ray versions into a single folder.
    For example, now the tools save output config. files in the following manner by default.
    ├── configs
    │ ├── 1.0.0
    │ │ ├── Ray 1.0.0 related config files
    │ ├── 1.1.0
    │ │ └── Ray 1.1.0 related config files

  3. The configuration parsing code is more generalized than before. Removed some hard-coded conditions and added functions to make the code less cluttered.

  4. Added a new field called config_string in the output config file. This field stores the original string from which we parsed the default value of the configuration. The config_string stores string whenever the default value is not a simple value but a conditional statement. This field will help in explaining how the associated environment variable's value will determine the default value.
    For example:
    For raylet_start_wait_time_s configuration, the signature/input is following:

RAY_CONFIG(uint32_t, raylet_start_wait_time_s,
           std::getenv("RAY_preallocate_plasma_memory") != nullptr &&
                   std::getenv("RAY_preallocate_plasma_memory") == std::string("1")
               ? 120
               : 10)

And, the script dumps following Yaml entry in the .conf file:

raylet_start_wait_time_s:
  config_string: 'std::getenv("RAY_preallocate_plasma_memory") != nullptr && std::getenv("RAY_preallocate_plasma_memory") == std::string("1") ? 120 : 10'
  default: '10'
  env: RAY_preallocate_plasma_memory
  type: uint32_t
  value_for_this_mode: '10'

The new field i.e. config_string is informatory and gives an idea about how the associated environment variable will be processed.

  1. The config tool now uses YAML format variable instead of a hardcoded string for system-config map YAML (system_cm.yaml)

@JainTwinkle
Copy link
Contributor Author

@chcost @raghukiran1224 Could we assign someone for this PR?
Thanks!
PS: I have fixed my notification settings this time. I'll respond to comments/suggestions on time.

Copy link
Contributor

@raghukiran1224 raghukiran1224 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@raghukiran1224 raghukiran1224 merged commit ba72969 into project-codeflare:develop Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants