Repository navigation
Conversation
…hecks
Client (HTTPGenerator):
- push() sends the local configuration to the server, which keeps its data,
drops the fitted model and retrains. Editing or replacing the local copy
without pushing warns once per edit. push() warns when the copy was not
pulled since the last step, since it carries optimizer state too.
- A lost session (server restart) is recreated from the configuration the
server last had and the full local data, with a warning that says what it
resumed from. At most one attempt per request; recover_session=False
raises instead.
- A new session always receives the local data; the push happens outside
the recovery path so a failure rolls the session back.
- An ingest whose outcome is unknown (timeout, 5xx) is not retried; the
client replaces the server's data instead. 4xx rejections are raised.
- A server-side DataError arrives as DataError, so Xopt(strict=False)
behaves as with a local generator.
- Attribute delegation only resolves names the wrapped class defines,
never creates a session, and pulls once per step.
- pull(include_model=False) leaves out the fitted model but keeps custom
kernels and prior means; Xopt.dump() uses it unless serialize_torch.
- Rejects at wrap time: StateOwner generators, custom_objective, custom
multi-fidelity cost_function (all silently altered by the trip).
- Default timeout 30 s -> 300 s.
Server:
- GET /health (no token), GET /sessions, PUT /sessions/{id}/state,
?include_model= on GET state, XOPT_HTTP_MAX_SESSIONS cap (503).
- Construction warnings and a use_cuda-without-CUDA notice are returned
and re-raised on the client.
- Auth moved to the routers; the cloudpickle server shares the session
registry, cap and health route.
Core: Generator.sync_for_dump(include_model) and Xopt.dump() passing
serialize_torch through.
Guide: server restarts, deploying the server, limitations and next steps.
Generated with AI
Co-Authored-By: SLAC AI
This was referenced Nov 19, 2026
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Use a dedicated pytest temporary working directory for each test. Prevent stale model files from interfering with inline and external model serialization tests. Remove the deprecated module-scoped cleanup fixture without changing production serialization behavior.
Initialize CUDA linear algebra automatically on first use with thread-safe, per-device initialization. Prevent concurrent first-use PyTorch CUDA failures without serializing GP model training or acquisition optimization. Preserve CPU-only execution without triggering CUDA initialization or requiring additional user configuration. Add unit and integration tests covering six independent local and remote Xopt applications using UCB, BAX, and expected improvement across CPU, CUDA, and mixed workloads. Validate remote session isolation, selective finalization, continued optimization, and session cleanup. Improve HTTP server subprocess diagnostics and portable test logging. Validation: 865 GPU-enabled and 841 CPU-only regression tests passed with zero failures. CUDA initialization utility achieved 100% statement and branch coverage.
ernestow
marked this pull request as ready for review
November 20, 2026 15:11
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR continues the remote generator development initiated
by Sara Miskovich in pluflou#26, as part of our effort
to complete #469.
Sara's original commit and authorship have been preserved,
and her changes have been integrated with the upstream
http-generator branch.
Development and validation checklist
Related pull requests
The objective is to complete the HTTPGenerator implementation
and prepare PR #469 for final review and merging into main.