Skip to content

Commit 640134c

Browse files
linting
1 parent 2af8104 commit 640134c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/cloudai/configurator/cloudai_gym.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
from cloudai.core import METRIC_ERROR, Registry, Runner, TestRun
2424
from cloudai.util.lazy_imports import lazy
25-
from cloudai._core.exceptions import JobFailureError
2625

2726
from .base_gym import BaseGym
2827

@@ -109,14 +108,17 @@ def step(self, action: Any) -> Tuple[list, float, bool, dict]:
109108
new_tr = copy.deepcopy(self.test_run)
110109
new_tr.output_path = self.runner.runner.get_job_output_path(new_tr)
111110
self.runner.runner.test_scenario.test_runs = [new_tr]
112-
111+
113112
self.runner.runner.shutting_down = False
114113
self.runner.runner.jobs.clear()
115114
self.runner.runner.testrun_to_job_map.clear()
116-
115+
117116
asyncio.run(self.runner.run())
118-
119-
if self.runner.runner.test_scenario.test_runs and self.runner.runner.test_scenario.test_runs[0].output_path.exists():
117+
118+
if (
119+
self.runner.runner.test_scenario.test_runs
120+
and self.runner.runner.test_scenario.test_runs[0].output_path.exists()
121+
):
120122
self.test_run = self.runner.runner.test_scenario.test_runs[0]
121123
else:
122124
self.test_run = copy.deepcopy(self.original_test_run)

0 commit comments

Comments
 (0)