Skip to content

Add libE service mode#1737

Open
shuds13 wants to merge 7 commits into
developfrom
feature/libe_service_mode
Open

Add libE service mode#1737
shuds13 wants to merge 7 commits into
developfrom
feature/libe_service_mode

Conversation

@shuds13
Copy link
Copy Markdown
Member

@shuds13 shuds13 commented May 25, 2026

Allow libE to act as a dispatch engine for an external producer.

Typical examples may include MCP servers, LLM agents, REST services, message-queue consumers, or an interactive environment.

@shuds13 shuds13 requested review from jlnav and jmlarson1 May 26, 2026 17:30
only simulator functions.

**service_mode** [bool] = ``False``:
If ``True``, the manager tolerates idle workers + an alloc returning no work
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe this docstring could emphasize usage and implications more than internal implementation.

e.g. "If True libEnsemble waits for work idly, like from queue-backed generators or MCP servers, instead of exiting immediately if work isn't available. Termination is still the user's responsibility, via "exit_criteria" or other external signals."

@jlnav
Copy link
Copy Markdown
Member

jlnav commented May 26, 2026

I can also imagine pushing "sim work" onto a queue for libE to evaluate in parallel. But I guess if the gen grabs that works and gives to libE, the same thing is accomplished.

import numpy as np
from gest_api.vocs import VOCS

from libensemble.gen_classes.queue_gen import QueueService
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a different namespace like libensemble.services.QueueService ?

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.

2 participants