Skip to content

Commit 8c1516c

Browse files
committed
Allow paths in xla options
GitOrigin-RevId: a9b350d
1 parent 3bb2bd7 commit 8c1516c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

axlearn/common/compiler_options.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,12 @@ def default_xla_options(
181181
if isinstance(v, (int, bool)):
182182
continue
183183
elif isinstance(v, str):
184-
# Allow numeric strings, time-based strings (e.g., "10m", "30s", "60m"), and bool str
184+
# Allow numeric strings, time-based strings (e.g., "10m", "30s", "60m"), and bool str.
185185
if v.isdigit() or re.match(r"^\d+[ms]$", v.strip()) or v.strip() in ["true", "false"]:
186186
continue
187+
# Allow paths.
188+
if v.startswith("/"):
189+
continue
187190
else:
188191
raise ValueError(f"Invalid string value for option {k}: {v}")
189192
else:

0 commit comments

Comments
 (0)