Skip to content

Commit

Permalink
use property in cloudai_gym
Browse files Browse the repository at this point in the history
  • Loading branch information
srivatsankrishnan committed Feb 12, 2025
1 parent b1272fa commit 629636b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cloudai/_core/configurator/cloudai_gym.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def step(self, action: Any) -> Tuple[list, float, bool, dict]:
for key, value in action.items():
self.update_nested_attr(self.test_run.test.test_definition.cmd_args, key, value)

constraint_check = getattr(self.test_run.test.test_definition, "constraint_check", None)
if constraint_check is not None and not constraint_check:
if not self.test_run.test.test_definition.constraint_check:
logging.info("Constraint check failed. Skipping step.")
return [-1.0], -1.0, True, {}
logging.info(f"Running step {self.test_run.current_iteration} with action {action}")
Expand Down

0 comments on commit 629636b

Please sign in to comment.