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

[CLI] add support to run app on a specific cluster #13894

Merged
merged 56 commits into from
Aug 4, 2022

Conversation

nicolai86
Copy link
Contributor

@nicolai86 nicolai86 commented Jul 27, 2022

Follow up PR for #13835.

This PR changes the run command to support a --cluster-id flag when --cloud is provided.
This way customers can run applications on their own BYOC compute clusters.

Verification

  • new unit tests
  • updated existing unit tests
  • working e2e test

nicolai86 and others added 30 commits July 25, 2022 09:46
I can run this with

```
python -m pytest tests/tests_clusters/test_cluster_lifecycle.py
```

test fails ofc because both the assertions don't work yet
supported commands:
- lightning clusters create
- lightning clusters list
- lightning clusters delete
verified e2e via

```
python -m pytest tests/tests_clusters/test_cluster_lifecycle.py::test_cluster_list
```
I can't validate this just yet because I don't have the feature flag enabled in prod.
we need this as a second step once BYOC compute clusters can be created - running apps on specific clusters
.lightningignore Outdated Show resolved Hide resolved
@nicolai86 nicolai86 added this to the app:0.6 milestone Aug 2, 2022
Copy link
Contributor

@hhsecond hhsecond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @nicolai86. Overall, the flow looks good

I have made few comments about some of the early design choices we made which conflicts with the design of this PR. We don't necessarily have to go with the original design but we need to come to a conscious consensus on how we should go about it

src/lightning_app/runners/cloud.py Show resolved Hide resolved
src/lightning_app/cli/lightning_cli.py Show resolved Hide resolved
src/lightning_app/runners/cloud.py Show resolved Hide resolved
@nicolai86 nicolai86 requested a review from hhsecond August 3, 2022 14:55
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

src/lightning_app/runners/cloud.py Outdated Show resolved Hide resolved
@@ -121,6 +130,9 @@ def run():
@run.command("app")
@click.argument("file", type=click.Path(exists=True))
@click.option("--cloud", type=bool, default=False, is_flag=True)
@click.option(
"--cluster-id", type=str, default=None, help="Run Lightning App on a specific Lightning AI BYOC compute cluster"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the cluster id relate to the cluster name given in the cloud compute?

Also, @nicolai86 can you give us an example of such an ID? Is it human readable or just a long number?

@nicolai86 nicolai86 dismissed hhsecond’s stale review August 4, 2022 16:24

addressed comments that are applicable

@mergify mergify bot added the ready PRs ready to be merged label Aug 4, 2022
@nicolai86 nicolai86 merged commit 341c63c into Lightning-AI:master Aug 4, 2022
@nicolai86 nicolai86 deleted the nicolai86/run-app-on-cluster branch August 4, 2022 17:48
@Borda Borda mentioned this pull request Aug 19, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (removed) Generic label for Lightning App package priority: 0 High priority task ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants