Skip to content

Commit

Permalink
use iterators to avoid indexing errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
srivatsankrishnan committed Jan 11, 2025
1 parent 15be693 commit d5d1e14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cloudai/cli/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def handle_dry_run_and_run(args: argparse.Namespace) -> int:

logging.info(test_scenario.pretty_print())

tr = test_scenario.test_runs[0]
tr = next(iter(test_scenario.test_runs), None)
if tr is None:
logging.error("No test runs found in the test scenario.")
return 1

agent = GridSearchAgent(tr)
env = CloudAIGymEnv(test_run=tr, system=system, test_scenario=test_scenario)
Expand Down

0 comments on commit d5d1e14

Please sign in to comment.