Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SwanSpawner/swanspawner/_gpuinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _process_partitions(self,
'''
# Look for MIG partitions in the allocatable resources list
for resource_name,count in node_status.allocatable.items():
m = re.match('nvidia.com/mig-\d+g.(\d+)gb', resource_name) # e.g. nvidia.com/mig-1g.5gb
m = re.match(r'nvidia.com/mig-\d+g.(\d+)gb', resource_name) # e.g. nvidia.com/mig-1g.5gb
if m and int(count) > 0:
memory = m.group(1)
description = f'{gpu_model} partition ({memory} GB)'
Expand Down
2 changes: 1 addition & 1 deletion SwanSpawner/swanspawner/swanspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async def poll(self):
if exit_return_code.isdigit():
value_cleaned = exit_return_code
else:
result = re.search('ExitCode=(\d+)', exit_return_code)
result = re.search(r'ExitCode=(\d+)', exit_return_code)
if not result:
raise Exception("unknown exit code format for this Spawner")
value_cleaned = result.group(1)
Expand Down