Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cloudai/_core/test_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def apply_params_set(self, action: dict[str, Any], env_params: dict[str, Any] |
for key, value in full_action.items():
if key.startswith("extra_env_vars."):
tdef.extra_env_vars[key[len("extra_env_vars.") :]] = value
elif key == "NUM_NODES":
# Handled below via new_tr.num_nodes; cmd_args has no such field, and CmdArgs'
# extra="allow" would otherwise let this create a phantom attribute on it.
continue
else:
attrs = key.split(".")
obj = tdef.cmd_args
Expand Down
1 change: 1 addition & 0 deletions tests/test_cloudaigym.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ def test_params_set(setup_env: tuple[TestRun, Runner], num_nodes: int):
assert new_tr.test.extra_env_vars[key[len("extra_env_vars.") :]] == value
elif key == "NUM_NODES":
assert new_tr.num_nodes == value
assert "NUM_NODES" not in cmd_args
else:
assert cmd_args[key] == value

Expand Down