Skip to content

Commit 53e7f9a

Browse files
committed
added support for ray 1.6 and 1.7
1 parent cc5d7e8 commit 53e7f9a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/ray-res-config.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from parse import *
99
from optparse import OptionParser
1010

11-
versions_list=['1.0.0', '1.1.0','1.2.0','1.3.0','1.4.0','1.4.1','1.5.0']
11+
versions_list=['1.0.0', '1.1.0','1.2.0','1.3.0','1.4.0','1.4.1','1.5.0', '1.6.0', '1.7.0']
1212

1313
res_modes_list=['relaxed', 'recommended', 'strict', 'custom']
1414

@@ -102,11 +102,14 @@ def parse_ray_config(ray_version, sig_str, is_multiline):
102102
# get the default value and associated env variable
103103
if '?' in conf_default:
104104
# TODO: make the parsing conditions more general
105-
if 'RAY_preallocate_plasma_memory' in conf_default and ray_version == '1.5.0':
105+
if 'RAY_preallocate_plasma_memory' in conf_default and ray_version in ['1.5.0', '1.6.0', '1.7.0']:
106106
conf_env = 'RAY_preallocate_plasma_memory'
107107
_, conf_default = parse('{}: {})', conf_default)
108+
elif 'getenv' in conf_default:
109+
conf_env,_,conf_default = parse('getenv("{}"){}: {})', conf_default)
108110
else:
109-
_, conf_env,_, conf_default = parse('{} ? {} : {}("{}"))', conf_default)
111+
print(conf_default)
112+
_, conf_env,_, conf_default = parse('{} ? {} : {}("{}"))', conf_default)
110113
elif 'getenv' in conf_default:
111114
_, conf_env, is_eq, _, conf_default = parse('{} getenv("{}") {} std::{}("{}"))', conf_default)
112115
if is_eq == "!=" and conf_type == "bool":

0 commit comments

Comments
 (0)