Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] Always use
spawn
mp method from the CLI
When using the CLI entry point, always default to using the `spawn` multprocessing method. The safest multiprocessing method is `spawn`, as the default `fork` method is not compatible with some accelerators. The default method will be changing in future versions of Python, so we should use it explicitly when possible. We only set it here in the CLI entrypoint, because changing to `spawn` could break some existing code using vLLM as a library since some configurations will work fine with the default of `fork`. `spawn` will cause unexpected behavior if the code is not protected by `if __name__ == "__main__":`. Signed-off-by: Russell Bryant <rbryant@redhat.com>
- Loading branch information