From d4ed92ee13e667f7cec47fcc7dbea4f778020627 Mon Sep 17 00:00:00 2001 From: Ira Date: Mon, 14 Jul 2025 12:27:11 +0300 Subject: [PATCH] Fixed readme, removed error for --help Signed-off-by: Ira --- README.md | 4 ++-- pkg/llm-d-inference-sim/simulator.go | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b992681..749a613 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ API responses contains a subset of the fields provided by the OpenAI API. For more details see the vLLM documentation ## Command line parameters -- `config`: the path to a yaml configuration file +- `config`: the path to a yaml configuration file that can contain the simulator's command line parameters. If a parameter is defined in both the config file and the command line, the command line value overwrites the configuration file value. An example configuration file can be found at `manifests/config.yaml` - `port`: the port the simulator listents on, default is 8000 - `model`: the currently 'loaded' model, mandatory - `served-model-name`: model names exposed by the API (a list of space-separated strings) @@ -134,7 +134,7 @@ The following environment variables can be used to change the image tag: `REGIST ### Running To run the vLLM Simulator image under Docker, run: ```bash -docker run --rm --publish 8000:8000 ghcr.io/llm-d/llm-d-inference-sim:dev --port 8000 --model "Qwen/Qwen2.5-1.5B-Instruct" --lora "tweet-summary-0,tweet-summary-1" +docker run --rm --publish 8000:8000 ghcr.io/llm-d/llm-d-inference-sim:dev --port 8000 --model "Qwen/Qwen2.5-1.5B-Instruct" --lora-modules '{"name":"tweet-summary-0"}' '{"name":"tweet-summary-1"}' ``` **Note:** To run the vLLM Simulator with the latest release version, in the above docker command replace `dev` with the current release which can be found on [GitHub](https://github.com/llm-d/llm-d-inference-sim/pkgs/container/llm-d-inference-sim). diff --git a/pkg/llm-d-inference-sim/simulator.go b/pkg/llm-d-inference-sim/simulator.go index f3ce985..ae1af71 100644 --- a/pkg/llm-d-inference-sim/simulator.go +++ b/pkg/llm-d-inference-sim/simulator.go @@ -158,7 +158,7 @@ func (s *VllmSimulator) parseCommandParamsAndLoadConfig() error { // These values were manually parsed above in getParamValueFromArgs, we leave this in order to get these flags in --help var dummyString string - f.StringVar(&dummyString, "config", "", "The configuration file") + f.StringVar(&dummyString, "config", "", "The path to a yaml configuration file. The command line values overwrite the configuration file values") var dummyMultiString multiString f.Var(&dummyMultiString, "served-model-name", "Model names exposed by the API (a list of space-separated strings)") f.Var(&dummyMultiString, "lora-modules", "List of LoRA adapters (a list of space-separated JSON strings)") @@ -171,6 +171,10 @@ func (s *VllmSimulator) parseCommandParamsAndLoadConfig() error { f.AddGoFlagSet(flagSet) if err := f.Parse(os.Args[1:]); err != nil { + if err == pflag.ErrHelp { + // --help - exit without printing an error message + os.Exit(0) + } return err }