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 Layout and Create RayCluster function #227

Merged
merged 11 commits into from
Jul 26, 2023
Merged

CLI Layout and Create RayCluster function #227

merged 11 commits into from
Jul 26, 2023

Conversation

carsonmh
Copy link
Contributor

@carsonmh carsonmh commented Jul 14, 2023

closes #218

Creates layout, configuration, build configuration, and create raycluster command for the CLI. After building, get started with codeflare --help or just codeflare

How to test

  • Running unit tests pytest -v tests/unit_test.py or python -m pytest tests/unit_test.py
  • After building SDK, you can run codeflare create raycluster [options] command. This should create the yaml file with the specified options. Options should be in the format: --name=cluster-name or --machine_types='["gpu.large"]'

@carsonmh carsonmh mentioned this pull request Jul 14, 2023
@carsonmh carsonmh changed the base branch from main to cli-update July 20, 2023 20:06
tests/unit_test.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@MichaelClifford MichaelClifford left a comment

Choose a reason for hiding this comment

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

Really minor change otherwise looks good. Tested the CLI and define function as well. All seems to work as expected

👍

Copy link
Collaborator

@Maxusmusti Maxusmusti left a comment

Choose a reason for hiding this comment

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

Off to a good start! Just one thing I noticed initially:

  • Running codeflare create raycluster for me causes FileNotFoundError: [Errno 2] No such file or directory: '/Users/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/cli/commands/create.py'. I realized after that the command was changed to define but the CLI should be able to handle erroneous input. For example, if i write codeflare pizza, right now it will tell me FileNotFoundError: [Errno 2] No such file or directory: '/Users/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/cli/commands/pizza.py'. Basically, just make sure you are checking that commands are valid too, not just options, and if not just tell the user it is invalid and to check --help for more details. I think click may have something for this as well.

@MichaelClifford
Copy link
Collaborator

@carsonmh looks good. Thanks for the changes.

However, your commit history looks like you merged previous commits instead of re-baseing. Can you update this PR so that it only includes your commits?

Thanks

@Maxusmusti
Copy link
Collaborator

@MichaelClifford it should be fixed now

Copy link
Collaborator

@Maxusmusti Maxusmusti left a comment

Choose a reason for hiding this comment

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

LGTM, only one unit-test suggestion, then good to merge

tests/unit_test.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Maxusmusti Maxusmusti left a comment

Choose a reason for hiding this comment

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

LGTM

@Maxusmusti
Copy link
Collaborator

@MichaelClifford if it looks good to you, feel free to merge

@Maxusmusti Maxusmusti merged commit 3195eb1 into project-codeflare:cli-update Jul 26, 2023
1 check passed
Maxusmusti pushed a commit that referenced this pull request Jul 31, 2023
* Create: base and file layout for CLI

* Add: Create raycluster command for CLI

* Refactor: refactor CLI using pre-commit

* Test: unit tests for create raycluster function in the CLI

* Update: update egg-info with more paths

* Change: change Framework Cluster to RayCluster

* merge: rebase with main

* Fix: unit tests

* Change: create cluster to define cluster in unit tests

* Add: error handling for invalid command

* test: change tests so cli cluster definition has its own yaml file
carsonmh added a commit that referenced this pull request Aug 11, 2023
* Create: base and file layout for CLI

* Add: Create raycluster command for CLI

* Refactor: refactor CLI using pre-commit

* Test: unit tests for create raycluster function in the CLI

* Update: update egg-info with more paths

* Change: change Framework Cluster to RayCluster

* merge: rebase with main

* Fix: unit tests

* Change: create cluster to define cluster in unit tests

* Add: error handling for invalid command

* test: change tests so cli cluster definition has its own yaml file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI Create Ray Cluster
3 participants