Skip to content

Commit

Permalink
fine tune spot placement script
Browse files Browse the repository at this point in the history
The max we are allowed for target unit is 50.
We also should likely not group metal instances
as they are different.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Sep 16, 2023
1 parent 5ba8102 commit 4816a13
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/saving-prices/save-aws-prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def get_parser():
parser.add_argument(
"--target-units",
dest="target_units",
help="Number of target units for score (defaults to 100)",
default=100,
help="Number of target units for score (defaults to 50, the default max)",
default=50,
type=int,
)
parser.add_argument(
Expand Down Expand Up @@ -206,6 +206,10 @@ def run():
prefix = instance_name.split(".")[0]
if prefix not in by_prefix:
by_prefix[prefix] = []
# Don't add metal types
if "metal" in instance_name:
print(f"Skipping {instance_name}, found metal.")
continue
by_prefix[prefix].append(instance_name)

# Group scores by prefixes
Expand Down

0 comments on commit 4816a13

Please sign in to comment.