Agent-native cloud parameter sweeps for Python simulations.
Project description
Combinate
Combinate is a Python-first cloud parameter-sweep platform for simulation-style workloads.
The SDK is designed for the common case where you already have a Python function and a set of parameter combinations you want to evaluate. Instead of managing nested loops, retries, and result collection yourself, you submit a sweep and get structured results back.
Install
Current private-beta prerelease install target:
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple combinate==0.1.0b1
This version is intentionally a prerelease. Do not use final 0.1.0 on TestPyPI while the install, onboarding, and support loop are still being proven in private beta.
This README is the minimum self-contained install-to-first-sweep guide that should be usable from the installed package alone.
Richer walkthroughs such as the repository quickstart and usage guides may exist outside the installed artifact and should not be assumed to be locally bundled in the wheel.
The published package intentionally contains only the Python SDK and CLI surface. The hosted control plane remains a separate deployed service and is not bundled into the PyPI artifact.
Try It Locally First (No Account Required)
local_sweep runs your function in-process against a sampled parameter space without connecting to the Combinate cloud. No API key, project ID, or sign-in required.
from combinate import local_sweep
def simulate(alpha: float, beta: float) -> dict:
return {"objective": alpha * beta}
result = local_sweep(
simulate,
params={
"alpha": {"type": "range", "min": 0.1, "max": 10.0},
"beta": [1.0, 5.0, 10.0],
},
sampling_spec={"method": "random", "sampler": "sobol", "samples": 20, "seed": 42},
max_tasks=20,
)
print(result.describe())
for task in result.succeeded_tasks:
print(task.parameter_values, task.inline_output)
When you are ready to scale to a full cloud run, change local_sweep to sweep and add a CombinateConfig. Everything else — params, sampling_spec, result inspection — stays identical.
local_sweep defaults to a cap of 25 tasks (hard limit: 200). Use it to validate your function signature, parameter space, and output shape before committing to a large cloud run.
Pre-Sweep Validation
run_preflight analyzes your parameter space and function before any cloud submission. It runs two checks automatically:
Static analysis — inspects parameter definitions without executing your function:
- flags
min=0on any dimension as a division or logarithm risk - flags
min=1as an off-by-one risk when your model usescount - 1patterns - flags inverted ranges (
min > max) - flags grid sweeps above 500 tasks
Boundary probes — runs your function at 5 targeted parameter sets: all-min, all-max, midpoint, and two cross-combos (first half lo/second half hi, and vice versa). Cross-combos catch interaction bugs that only appear when two dimensions are simultaneously at their extremes.
from combinate import run_preflight
def simulate(alpha: float, beta: float) -> dict:
return {"objective": alpha / beta} # would fail at beta=0
params = {
"alpha": {"type": "range", "min": 0.1, "max": 10.0},
"beta": {"type": "range", "min": 0.0, "max": 5.0}, # min=0 → flagged
}
spec = {"method": "random", "sampler": "sobol", "samples": 200}
report = run_preflight(simulate, params, "random", spec)
# prints formatted analysis to stderr
# report.static_warnings — list of warning strings
# report.probe_results — list of ProbeResult(label, params, elapsed_s, output, error)
# report.probe_failures — subset where error is not None
# report.task_count — estimated task count
# report.median_task_s — median probe wall time
# report.estimated_wall_s — task_count / parallelism * median_task_s
# report.estimated_cost_usd — planning estimate
sweep() calls run_preflight() automatically before submission. Pass preflight=False to skip it:
result = sweep(simulate, params=params, config=config, preflight=False)
Agent Quick Reference
If you are a coding agent integrating combinate into a fresh project, these are the current contract-critical facts:
- primary entry points:
from combinate import CombinateConfig, sweep, local_sweep, run_preflight - local validation path (no account):
local_sweep(fn, params=..., max_tasks=25)— runs in-process, no credentials needed - pre-submission analysis:
run_preflight(fn, params, method, spec)— static warnings + 5 boundary probes, returnsPreflightReport; called automatically bysweep()unlesspreflight=False - setup path: install the package, then run
python -m combinate login ...from the hosted onboarding page or setCOMBINATE_API_BASE_URL,COMBINATE_API_KEY, andCOMBINATE_PROJECT_ID - outside private-alpha testers must use the deployed hosted control-plane URL from onboarding, not
localhostor127.0.0.1 - stable submission mode:
grid - bounded stochastic mode:
sampling_spec={"method": "random", ...} - bounded experimental search mode:
sampling_spec={"method": "genetic", ...}
Current alpha project limits:
- maximum active sweeps per project:
2 - maximum active tasks per project:
6
Current submission task estimation:
grid: Cartesian product of list-valued parameter dimensionsrandom:samples, defaulting to1genetic:population_size * max_generations
Current method defaults that matter:
random: defaults tosamples=1,seed=0,sampler="uniform"genetic: defaults toplanner="reference",seed=0,population_size=4,max_generations=3,objective_metric="objective",objective_goal="maximize",elite_count=1,mutation_rate=0.2,range_mutation_locality=0.25
Important alpha consequence:
- a bare
method="genetic"submission uses the default genetic settings above, which estimate4 * 3 = 12tasks and will exceed the current6-task project cap - for a small hosted alpha smoke, use an explicit bounded genetic
sampling_spec, such aspopulation_size=2andmax_generations=2
Quick Start
Preferred hosted setup path:
python -m combinate login --api-base-url "https://<operator-provided-control-plane-url>" --api-key "<your-sdk-key>" --project-id "<your-project-id>"
Environment-variable equivalent:
$env:COMBINATE_API_BASE_URL = "https://<operator-provided-control-plane-url>"
$env:COMBINATE_API_KEY = "<your-sdk-key>"
$env:COMBINATE_PROJECT_ID = "<your-project-id>"
For outside private-alpha testers, COMBINATE_API_BASE_URL must be the deployed control-plane URL from the onboarding flow. Do not substitute localhost or 127.0.0.1.
Then run a sweep from Python:
from combinate import CombinateConfig, sweep
def simulate(alpha: float, beta: float) -> dict[str, float]:
return {"objective": alpha * beta}
result = sweep(
simulate,
params={"alpha": [0.1, 0.2], "beta": [10.0, 20.0]},
config=CombinateConfig(project_id="proj-example"),
)
print(result.describe())
print(result.to_dict())
Useful follow-up CLI commands after a submission:
python -m combinate show-config
python -m combinate list-sweeps
python -m combinate get-sweep <sweep-id>
python -m combinate watch-sweep <sweep-id>
python -m combinate cancel-sweep <sweep-id>
Current support rule of thumb:
- keep the returned
sweep_idfor any suspicious or failed run - use
get-sweepbefore retrying so operator support stays keyed on the same documented identifier
The same sweep() entry point also supports small alpha smoke cases for bounded random sampling and experimental genetic search through sampling_spec:
random_result = sweep(
simulate,
params={"alpha": [0.1, 0.2, 0.3], "beta": [10.0, 20.0, 30.0]},
sampling_spec={"method": "random", "samples": 3, "seed": 42},
config=CombinateConfig(),
)
genetic_result = sweep(
simulate,
params={"alpha": [0.1, 0.2, 0.3], "beta": [10.0, 20.0, 30.0]},
sampling_spec={
"method": "genetic",
"population_size": 2,
"max_generations": 2,
"objective_metric": "objective",
"objective_goal": "maximize",
"seed": 7,
},
config=CombinateConfig(),
)
Result Model
The synchronous sweep() path returns a SweepResult that includes:
- sweep status and task counts
- per-task output summaries
- failed task summaries when execution does not fully succeed
- structured result data suitable for logs, notebooks, or downstream automation
Current Alpha Notes
- the current alpha path uses an SDK credential issued from the browser onboarding flow
COMBINATE_API_KEYis read byCombinateConfigfrom the environment by default- prerelease artifacts are currently published through TestPyPI during the alpha phase
- run grid, random, and genetic smoke cases one at a time during private alpha so project concurrency limits do not hide the result behavior you are trying to inspect
- prefer explicit
sampling_specvalues forrandomandgeneticinstead of relying on method defaults during alpha smoke testing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file combinate-0.1.0rc1.tar.gz.
File metadata
- Download URL: combinate-0.1.0rc1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
280c213cac3af72863cca69a7371d5875f4151872ba3ebf6941ea613a044fdbe
|
|
| MD5 |
87fca13c74293867b19c1f95e94ba22d
|
|
| BLAKE2b-256 |
f7d487fe095121af8504d1dde47c06854c2303d55c5747ac559a0472f23dfffa
|
File details
Details for the file combinate-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: combinate-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92faf7f6145c962c03a460afd6ab742f5c75ccd8f2d3eaedf4a95babb8c055a6
|
|
| MD5 |
4b431a2fed22e0e51f7d974cbe684035
|
|
| BLAKE2b-256 |
4bc8670a2120f8b8d6113323db2378bf2979467a25e2c3b96a2a79d2cd7544f6
|