Skip to content

Commit 39e5d7e

Browse files
abrichrclaude
andcommitted
fix: resolve lint errors (undefined use_fast, unused imports, f-strings)
- Remove undefined `use_fast` guard — always log tried sizes on failure - Remove unused PoolManager import in vm_cli.py - Remove extraneous f-string prefixes - Remove unused boto3 and SSH_OPTS imports in aws_vm.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f125a68 commit 39e5d7e

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

openadapt_evals/benchmarks/vm_cli.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ def cmd_create(args):
352352

353353
if not vm_created:
354354
log("CREATE", "ERROR: Could not create VM in any region with any size")
355-
if use_fast:
356-
log("CREATE", "Tried sizes: " + ", ".join(s[0] for s in sizes_to_try))
355+
log("CREATE", "Tried sizes: " + ", ".join(s[0] for s in sizes_to_try))
357356
return 1
358357

359358
log(
@@ -594,7 +593,7 @@ def cmd_pool_status(args):
594593
if remaining_min > 0:
595594
print(f"Auto-shutdown: in {remaining_min:.0f} minutes")
596595
else:
597-
print(f"Auto-shutdown: OVERDUE (check VM status)")
596+
print("Auto-shutdown: OVERDUE (check VM status)")
598597
except ValueError:
599598
pass
600599
print(f"Tasks: {pool.completed_tasks}/{pool.total_tasks}")
@@ -1577,7 +1576,6 @@ def cmd_image_create(args):
15771576
"""
15781577
init_logging()
15791578
from openadapt_evals.infrastructure.azure_vm import AzureVMManager
1580-
from openadapt_evals.infrastructure.pool import PoolManager
15811579
from openadapt_evals.infrastructure.vm_monitor import VMPoolRegistry
15821580

15831581
vm_manager = AzureVMManager(resource_group=RESOURCE_GROUP)
@@ -7916,7 +7914,7 @@ def cmd_gpu_train(args):
79167914
)
79177915
result = ssh_run(ip, "bash /tmp/setup_gpu_training.sh", username=username, stream=True)
79187916
if result.returncode != 0:
7919-
print(f"ERROR: Setup failed")
7917+
print("ERROR: Setup failed")
79207918
return 1
79217919

79227920
# Delegate to the E2E script's launch_training() which handles:

openadapt_evals/infrastructure/aws_vm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ def create_vm(
347347
Raises:
348348
RuntimeError: If instance creation fails.
349349
"""
350-
import boto3
351350

352351
# Update manager's region so subsequent operations find this instance
353352
if region != self.region:
@@ -519,7 +518,7 @@ def set_auto_shutdown(self, name: str, hours: int = 4) -> bool:
519518
A more robust approach would use CloudWatch Events + Lambda.
520519
"""
521520
try:
522-
from openadapt_evals.infrastructure.azure_vm import SSH_OPTS, ssh_run
521+
from openadapt_evals.infrastructure.azure_vm import ssh_run
523522

524523
ip = self.get_vm_ip(name)
525524
if not ip:

0 commit comments

Comments
 (0)