Skip to content
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
1 change: 1 addition & 0 deletions src/lightning_app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Changed

- Improved the show logs command to be standalone and re-usable ([#15343](https://github.com/Lightning-AI/lightning/pull/15343)
- Removed the `--instance-types` option when creating clusters ([#15314](https://github.com/Lightning-AI/lightning/pull/15314))

### Fixed

Expand Down
4 changes: 0 additions & 4 deletions src/lightning_app/cli/cmd_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
V1ClusterState,
V1ClusterType,
V1CreateClusterRequest,
V1InstanceSpec,
V1KubernetesClusterDriver,
)
from rich.console import Console
Expand Down Expand Up @@ -86,7 +85,6 @@ def create(
role_arn: str = None,
region: str = "us-east-1",
external_id: str = None,
instance_types: List[str] = [],
edit_before_creation: bool = False,
wait: bool = False,
) -> None:
Expand All @@ -98,7 +96,6 @@ def create(
role_arn: AWS IAM Role ARN used to provision resources
region: AWS region containing compute resources
external_id: AWS IAM Role external ID
instance_types: AWS instance types supported by the cluster
edit_before_creation: Enables interactive editing of requests before submitting it to Lightning AI.
wait: Waits for the cluster to be in a RUNNING state. Only use this for debugging.
"""
Expand All @@ -119,7 +116,6 @@ def create(
region=region,
role_arn=role_arn,
external_id=external_id,
instance_types=[V1InstanceSpec(name=x) for x in instance_types],
)
)
),
Expand Down
10 changes: 0 additions & 10 deletions src/lightning_app/cli/lightning_cli_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ def create() -> None:
help="AWS region that is used to host the associated resources.",
hidden=True,
)
@click.option(
"--instance-types",
"instance_types",
type=str,
required=False,
default=None,
help="Instance types that you want to support, for computer jobs within the cluster.",
)
@click.option(
"--enable-performance",
"enable_performance",
Expand Down Expand Up @@ -66,7 +58,6 @@ def create_cluster(
role_arn: str,
external_id: str,
provider: str,
instance_types: str,
edit_before_creation: bool,
enable_performance: bool,
wait: bool,
Expand All @@ -82,7 +73,6 @@ def create_cluster(
region=region,
role_arn=role_arn,
external_id=external_id,
instance_types=instance_types.split(",") if instance_types is not None else [],
edit_before_creation=edit_before_creation,
cost_savings=not enable_performance,
wait=wait,
Expand Down
13 changes: 4 additions & 9 deletions tests/tests_app/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ def test_main_lightning_cli_help():
@mock.patch("lightning_cloud.login.Auth.authenticate", MagicMock())
@mock.patch("lightning_app.cli.cmd_clusters.AWSClusterManager.create")
@pytest.mark.parametrize(
"extra_arguments,expected_instance_types,expected_cost_savings_mode",
"extra_arguments,expected_cost_savings_mode",
[
(["--instance-types", "t3.xlarge"], ["t3.xlarge"], True),
(["--instance-types", "t3.xlarge,t3.2xlarge"], ["t3.xlarge", "t3.2xlarge"], True),
([], [], True),
(["--enable-performance"], [], False),
([], True),
(["--enable-performance"], False),
],
)
def test_create_cluster(
create_command: mock.MagicMock, extra_arguments, expected_instance_types, expected_cost_savings_mode
):
def test_create_cluster(create_command: mock.MagicMock, extra_arguments, expected_cost_savings_mode):
runner = CliRunner()
runner.invoke(
create_cluster,
Expand All @@ -130,7 +126,6 @@ def test_create_cluster(
region="us-east-1",
role_arn="arn:aws:iam::1234567890:role/lai-byoc",
external_id="dummy",
instance_types=expected_instance_types,
edit_before_creation=False,
cost_savings=expected_cost_savings_mode,
wait=False,
Expand Down
3 changes: 0 additions & 3 deletions tests/tests_app/cli/test_cmd_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
V1ClusterStatus,
V1ClusterType,
V1CreateClusterRequest,
V1InstanceSpec,
V1KubernetesClusterDriver,
V1ListClustersResponse,
)
Expand Down Expand Up @@ -43,7 +42,6 @@ def test_create_cluster(api: mock.MagicMock):
cluster_name="test-7",
external_id="dummy",
role_arn="arn:aws:iam::1234567890:role/lai-byoc",
instance_types=["t2.small"],
region="us-west-2",
)

Expand All @@ -59,7 +57,6 @@ def test_create_cluster(api: mock.MagicMock):
region="us-west-2",
role_arn="arn:aws:iam::1234567890:role/lai-byoc",
external_id="dummy",
instance_types=[V1InstanceSpec(name="t2.small")],
)
)
),
Expand Down