Calibration distributed patterns - #416
Open
jonathanhhb wants to merge 3 commits into
Open
Conversation
Adds a 7-subsection block after Next Steps covering patterns,
anti-patterns, and deployment heuristics for distributed Optuna
calibration of LASER models on Kubernetes with a shared MySQL
backend. Drawn from one extended deployment cycle but written
project-neutrally — no references to specific projects, clusters,
node-pool names, or IP addresses.
Subsections:
- Kubernetes Deployment Patterns (nodeSelector + toleration;
enableServiceLinks: false; verify placement on first deploy)
- Container Build Patterns (wheel-based install; -march=x86-64-v2
for cluster images; PyMySQL; staged data assets; shell-glob
extras trap)
- Shared Optuna Backend Patterns (which API calls are safe at
scale on a long-history shared backend; local-vs-cluster
Optuna version skew)
- Probe-and-Diagnose Workflow (STAGE_MODULE env-var scaffold;
in-cluster probe Pod pattern; automated ditch-detection
heuristics)
- Calibration Objective Design (don't calibrate to pooled
summary stats alone; constrain physically meaningful
quantities; add mechanism only after demonstrated failure)
- Identifiability Workflow (1D sweep before widening; S/N
interpretation; edge minima caveats)
- Pre-Deployment Checklist (one-line questions mapped to each
pattern above)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two new subsections at the top of "Distributed Calibration Patterns", addressing users new to running on a managed Kubernetes cluster. Neither subsection re-documents Kubernetes or any specific cloud provider; they scope what to ask the cluster admin for and how to catch deployment bugs before reaching the cluster. Assumptions and Cluster Handoff: Lists what the patterns section assumes you already have (working local calibration, working local Docker, kubectl, KUBECONFIG, cluster network access) and what it deliberately does not require you to learn first (Kubernetes internals, vendor-specific admin concepts). Provides a one-page list of questions to put to the cluster admin in a single 15-minute handoff: kubeconfig, registry URL + imagePullSecret, simulation-pool nodeSelector + toleration, MySQL Secret name + keys, network restrictions, namespace quotas, autoscaling rules. Validate Locally with Docker Before Pushing to the Cluster: Codifies the rule that the cluster is a scaling environment, not a debugging environment. Provides a docker-compose template for a three-container local stand (MySQL + study-creator + worker) that runs the exact image that would be pushed to the cluster. Lists which classes of failure the local stand catches (build context, wheel-build errors, shell-glob extras trap, data-asset paths, native-extension crashes, MySQL URL bugs, Optuna round-trip failures, stage-module interface mismatches, trial completion failures) and which it does not (node-pool placement, shared-MySQL-at-scale issues, Optuna version skew, Kubernetes Pod-spec quirks). Pre-deployment checklist updated with two new items at the top covering cluster handoff and local validation, before the original node-pool / service-links / driver / native-extensions / build / data-paths / Optuna-API / version-parity / scaffold / objective / identifiability items. Section intro paragraph updated: "split into nine categories" (was seven), with the first two flagged as the cheapest investments. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new documentation section to guide running distributed Optuna-based calibrations of LASER models on Kubernetes with a shared MySQL backend, capturing operational patterns, anti-patterns, and workflow heuristics.
Changes:
- Added “Distributed Calibration Patterns” guidance covering cluster handoff, local Docker validation, Kubernetes scheduling, build practices, shared-DB scalability pitfalls, and probe workflows.
- Added objective-design and identifiability workflow recommendations plus a pre-deployment checklist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.