@@ -216,17 +216,14 @@ Command line arguments are passed to the python engine like this:
216216dynamo-run out=pystr:my_python_engine.py -- -n 42 --custom-arg Orange --yes
217217```
218218
219- The python engine has two options for receiving those command line arguments (both of which are optional).
220-
221- In both cases the argument list will include some standard ones as well as anything after the ` -- ` .
219+ The python engine receives the arguments in ` sys.argv ` . The argument list will include some standard ones as well as anything after the ` -- ` .
222220
223221This input:
224222```
225223dynamo-run out=pystr:my_engine.py /opt/models/Llama-3.2-3B-Instruct/ --model-name llama_3.2 --tensor-parallel-size 4 -- -n 1
226224```
227225
228- 1 . In ` sys.argv ` :
229-
226+ is read like this:
230227```
231228async def generate(request):
232229 .. as before ..
@@ -235,31 +232,12 @@ if __name__ == "__main__":
235232 print(f"MAIN: {sys.argv}")
236233```
237234
238- Produces this output:
235+ and produces this output:
239236```
240237MAIN: ['my_engine.py', '--model-path', '/opt/models/Llama-3.2-3B-Instruct/', '--model-name', 'llama3.2', '--http-port', '8080', '--tensor-parallel-size', '4', '--base-gpu-id', '0', '--num-nodes', '1', '--node-rank', '0', '-n', '1']
241238```
242239
243- This form allows quick iteration on the engine setup.
244-
245- 2 . In an ` initialize ` function:
246-
247- ```
248- async def generate(request):
249- .. as before ..
250-
251- def initialize(args: list[str]) -> None:
252- print(f"initialize: {args}")
253- ```
254-
255- Produces this output:
256- ```
257- initialize: ['--model-path', '/opt/models/Llama-3.2-3B-Instruct/', '--model-name', 'llama3.2', '--http-port', '8080', '--tensor-parallel-size', '4', '--base-gpu-id', '0', '--num-nodes', '1', '--node-rank', '0', '-n', '1']
258- ```
259-
260- Note how in both cases the ` -n ` ` 1 ` is included.
261-
262- Flags ` --leader-addr ` and ` --model-config ` will also be added if provided to ` dynamo-run ` .
240+ This allows quick iteration on the engine setup. Note how the ` -n ` ` 1 ` is included. Flags ` --leader-addr ` and ` --model-config ` will also be added if provided to ` dynamo-run ` .
263241
264242### Dynamo does the pre-processing
265243
0 commit comments