Metadata-Version: 2.4
Name: synth-optimizers
Version: 0.1.1
Summary: Public Synth MIPROv2 optimizer package.
Author-email: Synth Laboratories <josh@usesynth.ai>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/synth-laboratories/synth-cookbooks-public/tree/main/packages/synth-optimizers
Project-URL: Repository, https://github.com/synth-laboratories/synth-cookbooks-public
Project-URL: Issues, https://github.com/synth-laboratories/synth-cookbooks-public/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Requires-Dist: synth-containers>=0.1.0
Provides-Extra: dev
Requires-Dist: build>=1.2.1; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: ty>=0.0.32; extra == "dev"

# synth-optimizers

Public Synth optimizer package source.

PyPI distribution: `synth-optimizers`

Current package version: `0.1.1`

The initial public package contains the Synth Lab-derived MIPROv2 optimizer
surface under `synth_optimizers.miprov2`.

## Install

```bash
pip install synth-optimizers
```

## MIPROv2 Usage

```python
from synth_optimizers.miprov2 import MiproCompatRunConfig, optimize

result = optimize(
    seed_candidate={"system_prompt": "You are a careful assistant."},
    trainset=train_rows,
    valset=heldout_rows,
    adapter=my_adapter,
    task_lm="openai/gpt-4.1-mini",
    reflection_lm="openai/gpt-5",
    config=MiproCompatRunConfig(
        dataset="banking77",
        task="first5_intents",
        optimizer_budget=8,
        max_concurrency=4,
    ),
)

print(result.best_candidate)
print(result.val_aggregate_scores[result.best_idx])
```

## Layout

```text
src/
  synth_optimizers/
    miprov2/
```

## Release

This package releases independently from other packages in this monorepo. See
`RELEASE.md` for the manual release workflow.
