Skip to content

Commit

Permalink
Reverse logic in valid_placement_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jvilarru authored and bsngardner committed Sep 21, 2023
1 parent d78431e commit 990d776
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Migrate from network overrides in bulkInsert to honoring instance templates.
- Add additional_networks support to instance template and partition_nodes.
- Support Tier 1 networking in instance templates.
- Reverse logic in valid_placement_nodes

## \[5.8.0\]

Expand Down
6 changes: 3 additions & 3 deletions scripts/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,14 @@ def valid_placement_nodes(job_id, nodelist):
for node in nodelist
}
fail = False
valid_types = ["a2", "a3", "c2", "c2d", "c3", "n2", "n2d"]
invalid_types = ["e2", "t2d", "n1", "t2a", "m1", "m2", "m3"]
for prefix, machine_type in machine_types.items():
if machine_type.split("-")[0] not in valid_types:
if machine_type.split("-")[0] in invalid_types:
log.warn(f"Unsupported machine type for placement policy: {machine_type}.")
fail = True
if fail:
log.warn(
f"Please use a valid machine type with placement policy: ({','.join(valid_types)})"
f"Please do not use any the following machine types with placement policy: ({','.join(invalid_types)})"
)
return False
return True
Expand Down

0 comments on commit 990d776

Please sign in to comment.