Skip to content

Commit 7f0e808

Browse files
ryan-williamsclaude
andcommitted
Add descriptive runner labels: lambda, instance type, region, GPU
Runners now have labels like: - `lambda` - identifies as Lambda Labs runner - `gpu_1x_a10` - the instance type - `us-east-1` - the region - `GPU` - indicates GPU capability - (user's extra_gh_labels) - `runner-xxxxx` - random unique label Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1c89608 commit 7f0e808

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/lambda_gha/start.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,15 @@ def create_instances(self) -> dict[str, dict]:
497497
# Failed to launch for this token
498498
continue
499499

500+
# Build full labels including instance type and region
501+
# Format: lambda,<instance_type>,<region>,GPU,<user_labels>,<random_label>
502+
auto_labels = ["lambda", successful_type, successful_region, "GPU"]
503+
if self.labels:
504+
all_labels = auto_labels + [self.labels] + [label]
505+
else:
506+
all_labels = auto_labels + [label]
507+
full_labels = ",".join(all_labels)
508+
500509
# Build env vars for SSH setup (will be set on instance)
501510
env_vars = {
502511
"action_sha": action_sha,
@@ -509,7 +518,7 @@ def create_instances(self) -> dict[str, dict]:
509518
"repo": self.repo,
510519
"runner_grace_period": self.runner_grace_period,
511520
"runner_initial_grace_period": self.runner_initial_grace_period,
512-
"runner_labels": labels,
521+
"runner_labels": full_labels,
513522
"runner_poll_interval": self.runner_poll_interval,
514523
"runner_registration_timeout": environ.get("INPUT_RUNNER_REGISTRATION_TIMEOUT", "").strip() or RUNNER_REGISTRATION_TIMEOUT,
515524
"runner_release": self.runner_release,
@@ -519,7 +528,7 @@ def create_instances(self) -> dict[str, dict]:
519528

520529
id_dict[instance_id] = {
521530
"label": label,
522-
"labels": labels,
531+
"labels": full_labels,
523532
"env_vars": env_vars,
524533
"action_sha": action_sha,
525534
"instance_type": successful_type,

0 commit comments

Comments
 (0)