Skip to content

Move from fork to forkserver as default multiprocessing context #559

@sjmonson

Description

@sjmonson

Is your feature request related to a problem? Please describe.

GuideLLM defaults to fork as the multiprocessing context for workers. This is considered unsafe for Python applications that contain threads.

Describe the solution you'd like

We should switch to forkserver as the default multiprocessing method; as of Python 3.14 it is the default for MacOS and Linux.

Additional context

There are a few issues that must be addressed before the default can be changed:

  1. Most multi-processing primitives are created in the default context rather then respecting GUIDELLM__MP_CONTEXT_TYPE.
  2. GuideLLM is designed to explicitly import itself and all dependencies on import. This leads to slow process startups on Linux; due mostly to transformers and torch

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions