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

[Bugfix] Fix CLI arguments in OpenAI server docs #4729

Merged
merged 1 commit into from
May 10, 2024

Conversation

AllenDou
Copy link
Contributor

@AllenDou AllenDou commented May 10, 2024

fix #4707 Fix CLI arguments in OpenAI server docs

:module: vllm.entrypoints.openai.cli_args
:func: make_arg_parser
:prog: -m vllm.entrypoints.openai.api_server

is similar with

# python3 -c "from vllm.entrypoints.openai.cli_args import make_arg_parser"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/vllm/vllm/entrypoints/openai/cli_args.py", line 12, in <module>
    from vllm.entrypoints.openai.serving_engine import LoRAModulePath
  File "/root/vllm/vllm/entrypoints/openai/serving_engine.py", line 11, in <module>
    from vllm.entrypoints.openai.protocol import (ChatCompletionRequest,
  File "/root/vllm/vllm/entrypoints/openai/protocol.py", line 7, in <module>
    from openai.types.chat import ChatCompletionMessageParam
ModuleNotFoundError: No module named 'openai'

In fact serving_chat.py protocol.py depends on openai, "from openai.types.chat import **"

when openai package was removed, the problem occurred

# make html 
Running Sphinx v6.2.1
making output directory... done
[autosummary] generating autosummary for: dev/dockerfile/dockerfile.rst, dev/engine/async_llm_engine.rst, dev/engine/engine_index.rst, dev/engine/llm_engine.rst, dev/kernel/paged_attention.rst, dev/sampling_params.rst, getting_started/amd-installation.rst, getting_started/cpu-installation.rst, getting_started/examples/api_client.rst, getting_started/examples/aqlm_example.rst, ..., serving/deploying_with_kserve.rst, serving/deploying_with_triton.rst, serving/distributed_serving.rst, serving/env_vars.rst, serving/integrations.rst, serving/metrics.rst, serving/openai_compatible_server.md, serving/run_on_sky.rst, serving/serving_with_langchain.rst, serving/usage_stats.md
myst v2.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
The default value for `navigation_with_keys` will change to `False` in the next release. If you wish to preserve the old behavior for your site, set `navigation_with_keys=True` in the `html_theme_options` dict in your `conf.py` file. Be aware that `navigation_with_keys = True` has negative accessibility implications: https://github.com/pydata/pydata-sphinx-theme/issues/1492
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 48 source files that are out of date
updating environment: [new config] 48 added, 0 changed, 0 removed
reading sources... [100%] serving/usage_stats                                                                          
/root/vllm/docs/source/serving/openai_compatible_server.md:108: ERROR: Failed to import "make_arg_parser" from "vllm.entrypoints.openai.cli_args".
No module named 'openai'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] serving/usage_stats                                                                           
generating indices... genindex py-modindex done
highlighting module code... [100%] vllm.sampling_params                                                                
writing additional pages... search done
copying images... [100%] assets/logos/vllm-logo-text-light.png                                                         

the problem is sphinx doesn't show more details about needed package info. https://readthedocs.org/projects/vllm/builds/24329938/ "python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html"

PR Checklist (Click to Expand)

Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Model] for adding a new model or improving an existing model. Model name should appear in the title.
  • [Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
  • [Kernel] for changes affecting CUDA kernels or other compute kernels.
  • [Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
  • [Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • We adhere to Google Python style guide and Google C++ style guide.
  • Pass all linter checks. Please use format.sh to format your code.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
  • Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Notes for Large Changes

Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.

What to Expect for the Reviews

The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

  • After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
  • After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
  • After the review, the reviewer will put an action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
  • Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You

Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

@rkooo567
Copy link
Collaborator

@AllenDou did you verify it locally?

@AllenDou
Copy link
Contributor Author

@AllenDou did you verify it locally?

yes, I did.

@rkooo567 rkooo567 merged commit 706588a into vllm-project:main May 10, 2024
55 checks passed
@AllenDou AllenDou deleted the fix_docs branch May 11, 2024 00:12
dtrifiro pushed a commit to dtrifiro/vllm that referenced this pull request May 21, 2024
tybalex pushed a commit to rubra-ai/vllm that referenced this pull request May 25, 2024
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.

[Doc]: OpenAI Server Command Line Args Broken
2 participants