Skip to content

Commit 27607e5

Browse files
authored
fix: updated gpu model string - may contain a period, now (#390)
This is a tiny update to the GPU model string, see #387 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced validation to support GPU model names and GRES resource identifiers containing dots (e.g., "gpu:tesla.x"). This resolves issues where certain GPU configurations were previously rejected during validation. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 98e3191 commit 27607e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

snakemake_executor_plugin_slurm/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ def set_gres_string(job: JobExecutorInterface) -> str:
176176
"""
177177
# generic resources (GRES) arguments can be of type
178178
# "string:int" or "string:string:int"
179-
gres_re = re.compile(r"^[a-zA-Z0-9_]+(:[a-zA-Z0-9_]+)?:\d+$")
179+
gres_re = re.compile(r"^[a-zA-Z0-9_]+(:[a-zA-Z0-9_\.]+)?:\d+$")
180180
# gpu model arguments can be of type "string"
181-
gpu_model_re = re.compile(r"^[a-zA-Z0-9_]+$")
181+
# The model string may contain a dot for variants, see
182+
# https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/387
183+
gpu_model_re = re.compile(r"^[a-zA-Z0-9_\.]+$")
182184
# any arguments should not start and end with ticks or
183185
# quotation marks:
184186
string_check = re.compile(r"^[^'\"].*[^'\"]$")

0 commit comments

Comments
 (0)