Skip to content

Commit a0112c8

Browse files
committed
Replaced hardcoded string with yaml for config map
1 parent a1b09ac commit a0112c8

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

utils/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Use `--help` option for all available options.
2525
- [x] Parse configs and dump configs in file to be edited later according to the res
2626
- [x] If any config value is different than default value then add that config to the --system-config parameter
2727
- [x] Dump config in a yaml file named system-cm.yaml
28-
- [ ] Change hardcoded string to dynamic to dump in system-cm.yaml
28+
- [x] Change hardcoded string to dynamic to dump in system-cm.yaml
29+
- [x] Extend to more Ray versions
2930
- [ ] Update format of system config string that works correctly
3031
- [ ] Segregate internal and external options
3132
- [ ] Spread code in multiple files
32-
- [ ] Extend to more Ray versions
3333
- [ ] Add Try-catch and checks to improve robustness
3434
- [ ] Add code to also dump Ray operator and cluster yamls
3535
- [ ] Give a sample cluster Yaml to user to let user edit cluster specific configurations, e.g., cpu, num of workers

utils/ray-res-config.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,12 @@ def gen_system_conf(conf_list, verbose):
246246
if verbose:
247247
print("Version 1.4.0 specific configs")
248248
conf_string = get_conf_string(conf_list)
249-
# FIXME: this should not be hardcoded and can be made a dict in python to be
250-
# loaded as yaml instead of a string
251-
sys_conf = """
252-
apiVersion: v1
253-
data:
254-
system_config: '{%s}'
255-
kind: ConfigMap
256-
metadata:
257-
name: system-config-json
258-
""" % (conf_string)
259-
return yaml.load(sys_conf, yaml.Loader)
249+
conf_str = '{%s}' % (conf_string)
250+
sys_conf = {'apiVersion': 'v1',
251+
'data': {'system_config': conf_str},
252+
'kind': 'ConfigMap',
253+
'metadata': {'name' : 'system-config-json'}}
254+
return sys_conf
260255

261256
# print next steps on how to use generated system-cm.yaml
262257
# TODO: generalize next steps for different deploy stratagies

0 commit comments

Comments
 (0)