Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
dd9b58d
B7: receipt for execution-server isolation
trissim Oct 11, 2026
2219b28
WIP B7: point zmqruntime at fix/B7-server-isolation
trissim Oct 12, 2026
d8deeac
WIP B7: launch record, checkout socket root, private harness servers
trissim Oct 12, 2026
f9f5c67
WIP B7: private socket root for tests, real-server isolation tests
trissim Oct 12, 2026
8f01769
WIP B7: guards and adapted harness tests
trissim Oct 12, 2026
45dfa27
B7: receipt matches the built design; require zmqruntime 0.6.2
trissim Oct 12, 2026
1a7be0d
B7: client and server inherit their code root from one mixin
trissim Oct 12, 2026
6465476
B7: the launcher records the launch on the server it builds
trissim Oct 12, 2026
aadfa71
B7: the launch argument defaults to a server started by hand
trissim Oct 12, 2026
7276148
B7: launcher test fakes record the launch
trissim Oct 12, 2026
cfe74f9
B7: receipt records the result and release order
trissim Oct 12, 2026
def7369
Merge remote-tracking branch 'origin/main' into refactor/B7-server-is…
trissim Oct 12, 2026
7c07efe
B7: zmqruntime 0.6.3 carries server isolation; bound and submodule fo…
trissim Oct 12, 2026
607a489
Merge origin/main into B7 (U4, K1 landed); zmqruntime 0.6.3
trissim Oct 12, 2026
8fea7f3
B7: master viewer endpoint test reads the socket root instead of ~/.o…
trissim Oct 12, 2026
2a3afea
B7: pin released zmqruntime 0.6.3
trissim Oct 12, 2026
5337348
Merge remote-tracking branch 'origin/main' into refactor/B7-server-is…
trissim Oct 12, 2026
08f861f
B7: private socket root sits beneath the checkout root, not TMPDIR; u…
trissim Oct 12, 2026
5071609
Merge remote-tracking branch 'origin/main' into refactor/B7-server-is…
trissim Oct 12, 2026
f29abc7
Merge origin/main into B7 (E2, B6 fixes, R1 discovery landed)
trissim Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions benchmark/matched_cellprofiler_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
ensure_global_config_context,
rebuild_lazy_config_with_new_global_reference,
)
from zmqruntime import DataControlPortPairAuthority
from zmqruntime.messages import ExecutionStatusSnapshot

from benchmark.adapters.cellprofiler import (
Expand Down Expand Up @@ -114,7 +113,6 @@
from openhcs.interop.cellprofiler.plate_workspace import (
prepare_cellprofiler_input_workspace,
)
from openhcs.runtime.zmq_config import OPENHCS_ZMQ_CONFIG
from openhcs.runtime.zmq_execution_client import (
OpenHCSExecutionSubmission,
ZMQExecutionClient,
Expand Down Expand Up @@ -1206,11 +1204,7 @@ def main(argv: list[str] | None = None) -> int:
if args.preflight_native_references:
execution_scope = nullcontext(None)
else:
port = DataControlPortPairAuthority.acquire(
OPENHCS_ZMQ_CONFIG,
transport_mode=OPENHCS_ZMQ_CONFIG.transport_mode,
).data_port
execution_scope = ZMQExecutionClient(port=port, persistent=False)
execution_scope = ZMQExecutionClient.with_private_server()
receipts = {}
with execution_scope as client:
for case in selected_cases:
Expand Down
46 changes: 31 additions & 15 deletions benchmark/openhcs_measured_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
import sys
import time
from collections.abc import Callable, Mapping
from dataclasses import dataclass
from contextlib import AbstractContextManager
from dataclasses import (
dataclass,
field,
)
from pathlib import Path
from typing import Any

from zmqruntime import DataControlPortPairAuthority
from zmqruntime.messages import PongResponse

from benchmark.contracts.measured_run_receipt import (
Expand All @@ -31,7 +34,6 @@
RuntimeArtifactExecutionObservation,
)
from openhcs.runtime.zmq_application import OPENHCS_ENDPOINT_APPLICATION
from openhcs.runtime.zmq_config import OPENHCS_ZMQ_CONFIG
from openhcs.runtime.zmq_execution_client import (
ZMQExecutionRequestBuilder,
OpenHCSExecutionSubmission,
Expand Down Expand Up @@ -251,6 +253,29 @@ def _require_measured_submission(
raise ValueError("Measured OpenHCS observation export path must be absolute.")


def measured_execution_client(
*,
execution_port: int | None,
progress_callback=None,
) -> AbstractContextManager[ZMQExecutionClient]:
"""The client of one measured run.

With no port the run starts a server at an address of its own. A port is
an address the caller named; the client still refuses a server there that
another process started for its own use or that runs other code.
"""

if execution_port is None:
return ZMQExecutionClient.with_private_server(
progress_callback=progress_callback
)
return ZMQExecutionClient(
port=execution_port,
persistent=False,
progress_callback=progress_callback,
)


def execute_measured_openhcs_pipeline(
*,
submission: OpenHCSExecutionSubmission,
Expand All @@ -263,18 +288,9 @@ def execute_measured_openhcs_pipeline(
"""Measure an ordinary pipeline submission with its requested observation."""

_require_measured_submission(submission, expected_axis_count)
client_port = execution_port
if client_port is None and require_owned_server:
client_port = DataControlPortPairAuthority.acquire(
OPENHCS_ZMQ_CONFIG,
transport_mode=OPENHCS_ZMQ_CONFIG.transport_mode,
).data_port
client = ZMQExecutionClient(
port=client_port,
persistent=False,
progress_callback=timing_observer,
)
with client:
with measured_execution_client(
execution_port=execution_port, progress_callback=timing_observer
) as client:
return execute_measured_openhcs_pipeline_on_client(
client=client,
submission=submission,
Expand Down
14 changes: 3 additions & 11 deletions benchmark/well_throughput_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import psutil
from objectstate.lazy_factory import rebuild_lazy_config_with_new_global_reference
from zmqruntime import DataControlPortPairAuthority

if TYPE_CHECKING:
from benchmark.reports.cppipe_figures import BenchmarkMetricRow
Expand All @@ -34,6 +33,7 @@
_ZMQProgressTimingObserver,
execute_measured_openhcs_pipeline,
execute_measured_openhcs_pipeline_on_client,
measured_execution_client,
)
from benchmark.timing import BenchmarkPhase, PhaseTimingTrace
from openhcs.core.components.parser_metaprogramming import FilenameParseResult
Expand Down Expand Up @@ -68,7 +68,6 @@
prepare_cellprofiler_input_workspace,
)
from openhcs.core.dataset_sources.source_schema import SourceSchemaFilenameParser
from openhcs.runtime.zmq_config import OPENHCS_ZMQ_CONFIG
from openhcs.runtime.zmq_execution_client import (
OpenHCSExecutionSubmission,
ZMQExecutionClient,
Expand Down Expand Up @@ -2001,16 +2000,9 @@ def run_well_throughput_suite(
if observation_key in completed or observation_key in skipped:
continue
if reuse_execution_server and shared_client is None:
client_port = execution_port
if client_port is None:
client_port = DataControlPortPairAuthority.acquire(
OPENHCS_ZMQ_CONFIG,
transport_mode=OPENHCS_ZMQ_CONFIG.transport_mode,
).data_port
shared_client = client_stack.enter_context(
ZMQExecutionClient(
port=client_port,
persistent=False,
measured_execution_client(
execution_port=execution_port,
progress_callback=shared_observer,
)
)
Expand Down
Loading
Loading