Skip to content

Commit

Permalink
Modified regular expression (#5306)
Browse files Browse the repository at this point in the history
Modified regular expression to add support of unicode's characters and
simplify code

Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
  • Loading branch information
igeni and loadams authored Mar 27, 2024
1 parent 4520edd commit 19670b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/autotuning/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def find_replace_str(value, replace_dict):
if not isinstance(value, str):
return str(value)

matches = re.findall(r"\$[A-Za-z0-9_]+", value)
matches = re.findall(r"\$[\w]+", value)
for var in matches:
var_key = var.replace("$", "").lower()
if var_key == "nvme_path":
Expand Down

0 comments on commit 19670b4

Please sign in to comment.