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

[Serve] support -h to serve cli #35754

Merged
merged 3 commits into from
May 25, 2023

Conversation

GeneDer
Copy link
Contributor

@GeneDer GeneDer commented May 25, 2023

Why are these changes needed?

  • -h is a common pattern and is not currently supported on serve cli. This PR adds the support to call serve -h

Related issue number

Closes #35734

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(
    • Tested by running python python/ray/setup-dev.py -y then seeing serve -h working

* also added serve symlink to setup-dev.py script

issue: ray-project#35734

Signed-off-by: Gene Su <e870252314@gmail.com>
@GeneDer GeneDer requested a review from edoakes May 25, 2023 01:12
@GeneDer GeneDer self-assigned this May 25, 2023
@@ -122,6 +122,7 @@ def do_link(package, force=False, skip_list=None, local_path=None):
skip_list=args.skip,
local_path="../../../dashboard",
)
do_link("serve", force=args.yes, skip_list=args.skip)
Copy link
Contributor

@edoakes edoakes May 25, 2023

Choose a reason for hiding this comment

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

Could you please do this in a separate PR? Better to keep things orthogonal where possible, makes it easier to track down issues if they happen.

In this case it's minor, but better to be disciplined about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

np, let me take this part out and open a separate PR

Signed-off-by: Gene Su <e870252314@gmail.com>
@click.group(help="CLI for managing Serve applications on a Ray cluster.")
@click.group(
help="CLI for managing Serve applications on a Ray cluster.",
context_settings=CONTEXT_SETTINGS,
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nit] Could you pass in the CONTEXT_SETTING dictionary directly instead of using a constant? Afaik, this dictionary is only used in this argument, so I don't think it needs to be stored as a global constant.

Signed-off-by: Gene Su <e870252314@gmail.com>
@edoakes edoakes merged commit a93fa8f into ray-project:master May 25, 2023
@GeneDer GeneDer deleted the add--h-help-docstring branch May 25, 2023 19:49
scv119 pushed a commit to scv119/ray that referenced this pull request Jun 16, 2023
`-h` is a common pattern and is not currently supported on `serve` cli. This PR adds the support to call `serve -h`
@GeneDer GeneDer mentioned this pull request Jul 27, 2023
8 tasks
edoakes pushed a commit that referenced this pull request Jul 27, 2023
Re: #35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.
edoakes pushed a commit to edoakes/ray that referenced this pull request Aug 2, 2023
Re: ray-project#35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
rickyyx pushed a commit that referenced this pull request Aug 8, 2023
Re: #35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: Gene Der Su <e870252314@gmail.com>
NripeshN pushed a commit to NripeshN/ray that referenced this pull request Aug 15, 2023
Re: ray-project#35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.
Signed-off-by: NripeshN <nn2012@hw.ac.uk>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
`-h` is a common pattern and is not currently supported on `serve` cli. This PR adds the support to call `serve -h`

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Re: ray-project#35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.
Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
Re: ray-project#35754 We previously added `-h` help command to the serve cli's click group. This caused the autogenerated help message to take `-h` as the default help command. For `serve run` we have a collusion on `-h` as it's used for host option as well. This PR changed the order of the click help option so the `--help` will be used in autogenerated help messages.
Signed-off-by: Victor <vctr.y.m@example.com>
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.

[serve] support -h in addition to --help
3 participants