Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Add best-effort launch strategy for job-level scaling #560

Merged
merged 1 commit into from
Sep 15, 2023
Merged
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
8 changes: 7 additions & 1 deletion src/slurm_plugin/fleet_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from botocore.exceptions import ClientError
from common.ec2_utils import get_private_ip_address_and_dns_name
from common.utils import setup_logging_filter
from slurm_plugin.common import print_with_count

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -172,7 +173,12 @@ def launch_ec2_instances(self, count, job_id=None):

launch_params = self._evaluate_launch_params(count)
assigned_nodes = self._launch_instances(launch_params)
logger.debug("Launched the following instances: %s", assigned_nodes.get("Instances"))
if len(assigned_nodes.get("Instances")) > 0:
logger.info(
"Launched the following instances %s",
print_with_count([instance.get("InstanceId", "") for instance in assigned_nodes.get("Instances")]),
)
logger.debug("Full launched instances information: %s", assigned_nodes.get("Instances"))

return [EC2Instance.from_describe_instance_data(instance_info) for instance_info in assigned_nodes["Instances"]]

Expand Down
Loading
Loading