docs: sync documentation with post-v0.2 changes
This commit is contained in:
+98
-23
@@ -3,16 +3,44 @@
|
||||
## Requirements
|
||||
|
||||
- Python ≥ 3.10
|
||||
- At least one model API key (Azure OpenAI, OpenAI, Anthropic, or local Qwen)
|
||||
- For research training/evaluation, access to at least one configured model
|
||||
backend (hosted API, local server, or an installed execution CLI)
|
||||
- The SkillOpt-Sleep `mock` backend needs no credentials
|
||||
|
||||
## Quick Install
|
||||
## Choose an Install
|
||||
|
||||
### PyPI
|
||||
|
||||
Use PyPI for the Python packages and installed commands:
|
||||
|
||||
```bash
|
||||
python -m pip install skillopt
|
||||
skillopt-sleep --help
|
||||
```
|
||||
|
||||
This installs `skillopt-train`, `skillopt-eval`, and `skillopt-sleep`. The wheel
|
||||
does not include the repository's benchmark configs, data materializers,
|
||||
agent-integration shells/MCP servers, or development tests; use a source
|
||||
checkout for those files.
|
||||
|
||||
!!! important "PyPI versus `main`"
|
||||
These docs track the latest `main`. The current PyPI release is `0.2.0`.
|
||||
The generic research `openai_compatible` backend, SkillOpt-Sleep handoff,
|
||||
Sleep support for non-Azure OpenAI-compatible endpoints, and the Sleep
|
||||
`--preferences` flag landed after that release and require a source install
|
||||
from `main` until the next release.
|
||||
|
||||
### Source checkout
|
||||
|
||||
```bash
|
||||
git clone https://github.com/microsoft/SkillOpt.git
|
||||
cd SkillOpt
|
||||
pip install -e .
|
||||
python -m pip install -e .
|
||||
```
|
||||
|
||||
Use the source checkout for paper reproduction, built-in benchmark configs,
|
||||
and contributions.
|
||||
|
||||
## Optional Dependencies
|
||||
|
||||
Install extras for specific benchmarks or backends:
|
||||
@@ -20,68 +48,115 @@ Install extras for specific benchmarks or backends:
|
||||
=== "ALFWorld"
|
||||
|
||||
```bash
|
||||
pip install -e ".[alfworld]"
|
||||
python -m pip install -e ".[alfworld]"
|
||||
```
|
||||
|
||||
=== "Claude Backend"
|
||||
=== "Claude agent SDK (optional)"
|
||||
|
||||
```bash
|
||||
pip install -e ".[claude]"
|
||||
python -m pip install -e ".[claude]"
|
||||
```
|
||||
|
||||
This extra does not install the `claude` executable. The research
|
||||
`claude_chat` backend launches `claude -p`, so install and authenticate the
|
||||
Claude Code CLI separately. The SDK extra is only needed when selecting an
|
||||
SDK-backed Claude Code exec path.
|
||||
|
||||
=== "Qwen (Local)"
|
||||
|
||||
```bash
|
||||
pip install -e ".[qwen]"
|
||||
python -m pip install -e ".[qwen]"
|
||||
```
|
||||
|
||||
=== "SearchQA data"
|
||||
|
||||
```bash
|
||||
python -m pip install -e ".[searchqa]"
|
||||
```
|
||||
|
||||
=== "WebUI"
|
||||
|
||||
```bash
|
||||
pip install -e ".[webui]"
|
||||
python -m pip install -e ".[webui]"
|
||||
```
|
||||
|
||||
=== "Development"
|
||||
|
||||
```bash
|
||||
pip install -e ".[dev]"
|
||||
python -m pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
=== "All"
|
||||
|
||||
```bash
|
||||
pip install -e ".[alfworld,claude,qwen,webui,dev]"
|
||||
python -m pip install -e ".[alfworld,claude,qwen,searchqa,webui,docs,dev]"
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Copy the example `.env` file and fill in your credentials:
|
||||
From a source checkout, copy the template and fill in only the backend you
|
||||
will use:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
Edit `.env` with your API keys:
|
||||
SkillOpt does not automatically load `.env`; export it into the current shell
|
||||
before running commands:
|
||||
|
||||
```ini
|
||||
# Azure OpenAI (default backend)
|
||||
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
|
||||
AZURE_OPENAI_API_KEY=your-key
|
||||
|
||||
# Or use OpenAI directly
|
||||
OPENAI_API_KEY=sk-...
|
||||
|
||||
# Or Anthropic Claude
|
||||
ANTHROPIC_API_KEY=sk-ant-...
|
||||
```bash
|
||||
set -a
|
||||
source .env
|
||||
set +a
|
||||
```
|
||||
|
||||
For Azure OpenAI with API-key authentication, the minimum settings are:
|
||||
|
||||
```ini
|
||||
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
|
||||
AZURE_OPENAI_API_VERSION=2024-12-01-preview
|
||||
AZURE_OPENAI_API_KEY=your-key
|
||||
AZURE_OPENAI_AUTH_MODE=api_key
|
||||
```
|
||||
|
||||
Use `AZURE_OPENAI_AUTH_MODE=azure_cli` for Azure CLI credentials, or
|
||||
`managed_identity` with an optional
|
||||
`AZURE_OPENAI_MANAGED_IDENTITY_CLIENT_ID`.
|
||||
|
||||
The research `claude_chat` backend is a Claude Code CLI adapter, not a direct
|
||||
Anthropic API client. Install and authenticate `claude`, and set
|
||||
`CLAUDE_CLI_BIN` only if the executable is not available as `claude` on
|
||||
`PATH`. `ANTHROPIC_API_KEY` is one authentication option the CLI may consume.
|
||||
|
||||
OpenAI-compatible servers have three distinct entry points:
|
||||
|
||||
1. The research engine's generic `openai_compatible` backend uses
|
||||
`OPENAI_COMPATIBLE_BASE_URL`, `OPENAI_COMPATIBLE_API_KEY`, and
|
||||
`OPENAI_COMPATIBLE_MODEL`.
|
||||
2. The research `openai_chat` backend can use
|
||||
`AZURE_OPENAI_AUTH_MODE=openai_compatible` with
|
||||
`AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_API_KEY`.
|
||||
3. SkillOpt-Sleep uses the same Azure-family variables as item 2 with
|
||||
`skillopt-sleep run --backend azure_openai`.
|
||||
|
||||
For research train/eval commands, `model.optimizer` and `model.target` in the
|
||||
YAML config are applied after backend initialization. They override model-name
|
||||
environment variables such as `OPENAI_COMPATIBLE_MODEL` and
|
||||
`QWEN_CHAT_MODEL`; set both role models explicitly when selecting those
|
||||
backends.
|
||||
|
||||
!!! tip
|
||||
You only need credentials for the backend you plan to use. Azure OpenAI is the default.
|
||||
You only need to configure the backend you plan to use. See
|
||||
[Configuration](configuration.md#model-backends) for exact backend names
|
||||
and role-specific overrides.
|
||||
|
||||
## Verify Installation
|
||||
|
||||
```bash
|
||||
python -c "import skillopt; print('SkillOpt ready!')"
|
||||
skillopt-train --help
|
||||
skillopt-eval --help
|
||||
skillopt-sleep --help
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Reference in New Issue
Block a user