Migrate release and test workflows for v1 (#548)
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
name: PyPI Nightly Build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run daily at 6:00 AM UTC+8.
|
||||
- cron: '0 22 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: pypi-nightly
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
publish-test-pypi:
|
||||
name: Publish nightly package to TestPyPI
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Create development version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
BASE_VERSION=$(uv version --short)
|
||||
TIMESTAMP=$(date -u +%Y%m%d%H%M%S)
|
||||
DEV_VERSION="${BASE_VERSION}.dev${TIMESTAMP}"
|
||||
uv version --frozen "${DEV_VERSION}"
|
||||
sed -i "s/^__version__ = \".*\"$/__version__ = \"${DEV_VERSION}\"/" agentlightning/__init__.py
|
||||
echo "version=${DEV_VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Verify version consistency
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
PACKAGE_VERSION=$(uv version --short)
|
||||
RUNTIME_VERSION=$(python -c 'from agentlightning import __version__; print(__version__)')
|
||||
if [[ "${PACKAGE_VERSION}" != "${RUNTIME_VERSION}" ]]; then
|
||||
echo "Package version ${PACKAGE_VERSION} does not match runtime version ${RUNTIME_VERSION}." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build package
|
||||
run: uv build --no-sources
|
||||
|
||||
- name: Verify package contents
|
||||
run: |
|
||||
python -m tarfile -l dist/*.tar.gz
|
||||
python -m zipfile -l dist/*.whl
|
||||
|
||||
- name: Publish ${{ steps.version.outputs.version }} to TestPyPI
|
||||
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
||||
with:
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
@@ -0,0 +1,71 @@
|
||||
name: PyPI Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish-pypi:
|
||||
name: Test, build, and publish package
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Verify version matches tag
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
PACKAGE_VERSION=$(uv version --short)
|
||||
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
||||
if [[ "${PACKAGE_VERSION}" != "${TAG_VERSION}" ]]; then
|
||||
echo "Package version ${PACKAGE_VERSION} does not match tag ${GITHUB_REF_NAME}." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify version consistency
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
PACKAGE_VERSION=$(uv version --short)
|
||||
RUNTIME_VERSION=$(python -c 'from agentlightning import __version__; print(__version__)')
|
||||
if [[ "${PACKAGE_VERSION}" != "${RUNTIME_VERSION}" ]]; then
|
||||
echo "Package version ${PACKAGE_VERSION} does not match runtime version ${RUNTIME_VERSION}." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Sync test dependencies
|
||||
run: uv sync --frozen --no-default-groups --extra dev --group dev
|
||||
|
||||
- name: Run tests
|
||||
run: >-
|
||||
uv run --locked --no-sync pytest -v --durations=20
|
||||
tests/server
|
||||
tests/controller
|
||||
tests/test_package.py
|
||||
tests/examples/test_swe_smith_images.py
|
||||
|
||||
- name: Build package
|
||||
run: uv build --no-sources
|
||||
|
||||
- name: Verify package contents
|
||||
run: |
|
||||
python -m tarfile -l dist/*.tar.gz
|
||||
python -m zipfile -l dist/*.whl
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
||||
@@ -0,0 +1,78 @@
|
||||
name: Test
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: test-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run core tests
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Sync test dependencies
|
||||
run: uv sync --frozen --no-default-groups --extra dev --group dev
|
||||
- name: Run tests
|
||||
run: >-
|
||||
uv run --locked --no-sync pytest -v --durations=20
|
||||
tests/server
|
||||
tests/controller
|
||||
tests/test_package.py
|
||||
tests/examples/test_swe_smith_images.py
|
||||
|
||||
package:
|
||||
name: Build package
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Build package
|
||||
run: uv build --no-sources
|
||||
- name: Verify package contents
|
||||
run: |
|
||||
python -m tarfile -l dist/*.tar.gz
|
||||
python -m zipfile -l dist/*.whl
|
||||
|
||||
docs:
|
||||
name: Build documentation
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Sync documentation dependencies
|
||||
run: uv sync --frozen --no-default-groups --group docs
|
||||
- name: Build documentation
|
||||
env:
|
||||
SOURCE_COMMIT: ${{ github.sha }}
|
||||
run: uv run --locked --no-sync mkdocs build --strict
|
||||
@@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="docs/images/agl-v1.0.jpg" alt="Agent Lightning v1.0" width="500">
|
||||
<img src="docs/images/agl-v1.0.svg" alt="Agent Lightning v1.0" width="500">
|
||||
</p>
|
||||
|
||||
<p align="center"><em>3,500-Line Lightweight Agentic RL Framework for Training Agents with Real Harnesses!</em></p>
|
||||
@@ -27,7 +27,7 @@ uv sync
|
||||
bash scripts/setup_verl.sh 0.8.0 cu130
|
||||
```
|
||||
|
||||
See the [Installation Guide](https://microsoft.github.io/agent-lightning/stable/1-installation/) for details.
|
||||
See the [Installation Guide](https://microsoft.github.io/agent-lightning/stable/00-installation/) for details.
|
||||
|
||||
|
||||
## ⚡ Architecture
|
||||
@@ -56,24 +56,24 @@ We evaluate Agent Lightning v1.0 across several practical training domains, incl
|
||||
|
||||
| Section | Content |
|
||||
|---------|---------|
|
||||
| [Installation](https://microsoft.github.io/agent-lightning/stable/1-installation/) | Base environment and `verl` GPU stack |
|
||||
| [Quick Start](https://microsoft.github.io/agent-lightning/stable/2-quick-start/) | Local first run and end-to-end flow |
|
||||
| [Basics](https://microsoft.github.io/agent-lightning/stable/3-basics/) | Components, rollouts, events, and trajectories |
|
||||
| [Trainer Configuration](https://microsoft.github.io/agent-lightning/stable/4-trainer-configuration/) | `verl` integration and trace aggregation |
|
||||
| [API Gateway Configuration](https://microsoft.github.io/agent-lightning/stable/5-api-gateway-configuration/) | Gateway and model proxy settings |
|
||||
| [Controller Configuration](https://microsoft.github.io/agent-lightning/stable/6-controller-configuration/) | Local and Kubernetes runners |
|
||||
| [Asynchronous Training](https://microsoft.github.io/agent-lightning/stable/7-asynchronous-training/) | Collocated async collection and pause/drain |
|
||||
| [Installation](https://microsoft.github.io/agent-lightning/stable/00-installation/) | Base environment and `verl` GPU stack |
|
||||
| [Quick Start](https://microsoft.github.io/agent-lightning/stable/01-quick-start/) | Local first run and end-to-end flow |
|
||||
| [Basics](https://microsoft.github.io/agent-lightning/stable/05-basics/) | Components, rollouts, events, and trajectories |
|
||||
| [Trainer Configuration](https://microsoft.github.io/agent-lightning/stable/20-trainer-configuration/) | `verl` integration and trace aggregation |
|
||||
| [API Gateway Configuration](https://microsoft.github.io/agent-lightning/stable/25-api-gateway-configuration/) | Gateway and model proxy settings |
|
||||
| [Controller Configuration](https://microsoft.github.io/agent-lightning/stable/30-controller-configuration/) | Local and Kubernetes runners |
|
||||
| [Asynchronous Training](https://microsoft.github.io/agent-lightning/stable/35-asynchronous-training/) | Collocated async collection and pause/drain |
|
||||
|
||||
## ⚡ Examples
|
||||
|
||||
| Example | Description |
|
||||
|---|---|
|
||||
| [Calc-X](https://microsoft.github.io/agent-lightning/stable/8-example-calc-x/) | POC math reasoning example with AutoGen and MCP calculator tools, requiring only one GPU. |
|
||||
| [GSM8K](https://microsoft.github.io/agent-lightning/stable/9-example-gsm8k/) | POC grade-school math reasoning example. |
|
||||
| [ScienceWorld](https://microsoft.github.io/agent-lightning/stable/10-example-science-world/) | Interactive science tasks in a text-based environment. |
|
||||
| [Search-R1](https://microsoft.github.io/agent-lightning/stable/11-example-search-r1/) | Multi-turn retrieval and reasoning agent. |
|
||||
| [LLM-in-Sandbox](https://microsoft.github.io/agent-lightning/stable/12-example-llm-in-sandbox/) | General agent with computer and code execution tools. |
|
||||
| [Coding Agent](https://microsoft.github.io/agent-lightning/stable/13-example-coding-agent/) | Coding agent trained with repository tests. |
|
||||
| [Calc-X](https://microsoft.github.io/agent-lightning/stable/50-example-calc-x/) | POC math reasoning example with AutoGen and MCP calculator tools, requiring only one GPU. |
|
||||
| [GSM8K](https://microsoft.github.io/agent-lightning/stable/55-example-gsm8k/) | POC grade-school math reasoning example. |
|
||||
| [ScienceWorld](https://microsoft.github.io/agent-lightning/stable/60-example-science-world/) | Interactive science tasks in a text-based environment. |
|
||||
| [Search-R1](https://microsoft.github.io/agent-lightning/stable/65-example-search-r1/) | Multi-turn retrieval and reasoning agent. |
|
||||
| [LLM-in-Sandbox](https://microsoft.github.io/agent-lightning/stable/70-example-llm-in-sandbox/) | General agent with computer and code execution tools. |
|
||||
| [Coding Agent](https://microsoft.github.io/agent-lightning/stable/75-example-coding-agent/) | Coding agent trained with repository tests. |
|
||||
|
||||
## ⚡ Articles
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
"""Agent Lightning."""
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
@@ -4,7 +4,7 @@ This quick start requires only one machine with one A100 GPU. It runs Agent Ligh
|
||||
|
||||
## Before you start
|
||||
|
||||
Complete [Installation](1-installation.md), including the `verl` GPU stack.
|
||||
Complete [Installation](00-installation.md), including the `verl` GPU stack.
|
||||
|
||||
> AGL v1.0 itself is lightweight, but policy inference and GRPO updates still require the GPU stack used by `verl` and vLLM.
|
||||
|
||||
@@ -51,5 +51,5 @@ When you want to stop the run, press `Ctrl+C` once and wait for the script to ex
|
||||
|
||||
## What's Next
|
||||
|
||||
1. Read [Basics](3-basics.md) to learn the core Agent Lightning >= v1.0 concepts.
|
||||
2. Read the complete [Calc-X example](8-example-calc-x.md), which also covers the Kubernetes controller mode.
|
||||
1. Read [Basics](05-basics.md) to learn the core Agent Lightning >= v1.0 concepts.
|
||||
2. Read the complete [Calc-X example](50-example-calc-x.md), which also covers the Kubernetes controller mode.
|
||||
@@ -91,6 +91,6 @@ The trainer also handles Agent Lightning-specific data processing. It merges con
|
||||
|
||||
The following chapters describe the settings for each component. Start with the trainer to define how rollouts are created and converted into training samples, then configure the server and the Controller that execute them:
|
||||
|
||||
1. [Trainer Configuration](4-trainer-configuration.md)
|
||||
2. [API Gateway Configuration](5-api-gateway-configuration.md)
|
||||
3. [Controller Configuration](6-controller-configuration.md)
|
||||
1. [Trainer Configuration](20-trainer-configuration.md)
|
||||
2. [API Gateway Configuration](25-api-gateway-configuration.md)
|
||||
3. [Controller Configuration](30-controller-configuration.md)
|
||||
@@ -212,4 +212,4 @@ For additional training stability, we recommend setting it to `2`. Samples beyon
|
||||
|
||||
## Asynchronous training
|
||||
|
||||
Agent Lightning supports collocated asynchronous rollout collection through `agentlightning.async_rollout`. For configuration, behavior, and constraints, see [Asynchronous Training](7-asynchronous-training.md).
|
||||
Agent Lightning supports collocated asynchronous rollout collection through `agentlightning.async_rollout`. For configuration, behavior, and constraints, see [Asynchronous Training](35-asynchronous-training.md).
|
||||
@@ -58,4 +58,3 @@ A mismatch produces a “model not found” error even if the vLLM endpoint itse
|
||||
The train and validation temperatures configured here are the values actually used for model requests. Note that `verl` has similar temperature settings, but those values are not used for proxied requests because the proxy replaces them automatically.
|
||||
|
||||
We recommend keeping `default_proxy.include_log_probs: true`. This records rollout log probabilities and allows `verl` to report rollout-correction metrics. Some rollout-correction features also require these log probabilities.
|
||||
|
||||
@@ -88,7 +88,6 @@ When the process pool reaches `maximum_size`, queued rollouts wait until capacit
|
||||
|
||||
## How agents are launched
|
||||
|
||||
In `k8s` mode, the Controller reads the Jinja Job template stored in each rollout. The template originates from `agentlightning.k8s.job_template_path` in the Trainer configuration. The Controller renders the template with the rollout's `input`, applies the Controller settings such as namespace, timeout, and cleanup TTL, and submits the resulting Kubernetes Job. It also injects rollout-specific `AGL_OPENAI_BASE_URL`, `AGL_EVENT_URL`, and `AGL_KEY` values into every container. See [Trainer Configuration](4-trainer-configuration.md#rollout-execution) for the template configuration and Jinja examples, and `agentlightning/controller/k8s_reconciler.py` for the implementation.
|
||||
In `k8s` mode, the Controller reads the Jinja Job template stored in each rollout. The template originates from `agentlightning.k8s.job_template_path` in the Trainer configuration. The Controller renders the template with the rollout's `input`, applies the Controller settings such as namespace, timeout, and cleanup TTL, and submits the resulting Kubernetes Job. It also injects rollout-specific `AGL_OPENAI_BASE_URL`, `AGL_EVENT_URL`, and `AGL_KEY` values into every container. See [Trainer Configuration](20-trainer-configuration.md#rollout-execution) for the template configuration and Jinja examples, and `agentlightning/controller/k8s_reconciler.py` for the implementation.
|
||||
|
||||
In `local` mode, the Controller reads `agent_class` and `env_map` from the rollout. It imports the Agent class, starts it in a local subprocess, and uses `env_map` to replace environment-variable values with fields from the rollout's `input`. The same rollout-specific Gateway URL, event URL, and key are injected automatically.
|
||||
|
||||
+14
-14
@@ -1,7 +1,7 @@
|
||||
# Agent Lightning Documentation
|
||||
|
||||
<p align="center">
|
||||
<img src="images/agl-v1.0.jpg" alt="Agent Lightning v1.0" width="500">
|
||||
<img src="images/agl-v1.0.svg" alt="Agent Lightning v1.0" width="500">
|
||||
</p>
|
||||
|
||||
Welcome to the Agent Lightning v1.0 documentation. Start with the installation and quick-start guides, then use the configuration guides and examples below to build and train your own agents.
|
||||
@@ -19,26 +19,26 @@ For the legacy Agent Lightning releases earlier than v1.0, see the [`v0.x` code
|
||||
|
||||
| Guide | Description |
|
||||
|---|---|
|
||||
| [Installation](1-installation.md) | Set up the base environment and the tested `verl` GPU stack. |
|
||||
| [Quick Start](2-quick-start.md) | Run a local end-to-end rollout-driven training job. |
|
||||
| [Basics](3-basics.md) | Learn the core components, rollouts, events, and trajectories. |
|
||||
| [Installation](00-installation.md) | Set up the base environment and the tested `verl` GPU stack. |
|
||||
| [Quick Start](01-quick-start.md) | Run a local end-to-end rollout-driven training job. |
|
||||
| [Basics](05-basics.md) | Learn the core components, rollouts, events, and trajectories. |
|
||||
|
||||
## Configuration
|
||||
|
||||
| Guide | Description |
|
||||
|---|---|
|
||||
| [Trainer Configuration](4-trainer-configuration.md) | Configure `verl` integration, rollout collection, and trace aggregation. |
|
||||
| [API Gateway Configuration](5-api-gateway-configuration.md) | Configure the API Gateway and model proxy. |
|
||||
| [Controller Configuration](6-controller-configuration.md) | Configure local and Kubernetes rollout runners. |
|
||||
| [Asynchronous Training](7-asynchronous-training.md) | Configure collocated asynchronous collection and pause/drain behavior. |
|
||||
| [Trainer Configuration](20-trainer-configuration.md) | Configure `verl` integration, rollout collection, and trace aggregation. |
|
||||
| [API Gateway Configuration](25-api-gateway-configuration.md) | Configure the API Gateway and model proxy. |
|
||||
| [Controller Configuration](30-controller-configuration.md) | Configure local and Kubernetes rollout runners. |
|
||||
| [Asynchronous Training](35-asynchronous-training.md) | Configure collocated asynchronous collection and pause/drain behavior. |
|
||||
|
||||
## Examples
|
||||
|
||||
| Example | Description |
|
||||
|---|---|
|
||||
| [Calc-X](8-example-calc-x.md) | Train a math reasoning agent with AutoGen and MCP calculator tools. |
|
||||
| [GSM8K](9-example-gsm8k.md) | Train an agent on grade-school math reasoning tasks. |
|
||||
| [ScienceWorld](10-example-science-world.md) | Train an agent on interactive science tasks in a text environment. |
|
||||
| [Search-R1](11-example-search-r1.md) | Train a multi-turn retrieval and reasoning agent. |
|
||||
| [LLM-in-Sandbox](12-example-llm-in-sandbox.md) | Train a general agent with computer and code execution tools. |
|
||||
| [Coding Agent](13-example-coding-agent.md) | Train a coding agent using repository tests as feedback. |
|
||||
| [Calc-X](50-example-calc-x.md) | Train a math reasoning agent with AutoGen and MCP calculator tools. |
|
||||
| [GSM8K](55-example-gsm8k.md) | Train an agent on grade-school math reasoning tasks. |
|
||||
| [ScienceWorld](60-example-science-world.md) | Train an agent on interactive science tasks in a text environment. |
|
||||
| [Search-R1](65-example-search-r1.md) | Train a multi-turn retrieval and reasoning agent. |
|
||||
| [LLM-in-Sandbox](70-example-llm-in-sandbox.md) | Train a general agent with computer and code execution tools. |
|
||||
| [Coding Agent](75-example-coding-agent.md) | Train a coding agent using repository tests as feedback. |
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 167 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
@@ -1,3 +1,3 @@
|
||||
# Calc-X
|
||||
|
||||
See the [Calc-X documentation](../../docs/8-example-calc-x.md) for data preparation, dependencies, and local or Kubernetes training instructions.
|
||||
See the [Calc-X documentation](../../docs/50-example-calc-x.md) for data preparation, dependencies, and local or Kubernetes training instructions.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# GSM8K
|
||||
|
||||
See the [GSM8K documentation](../../docs/9-example-gsm8k.md) for data preparation, dependencies, API modes, and training instructions.
|
||||
See the [GSM8K documentation](../../docs/55-example-gsm8k.md) for data preparation, dependencies, API modes, and training instructions.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# LLM-in-Sandbox
|
||||
|
||||
See the [LLM-in-Sandbox documentation](../../docs/12-example-llm-in-sandbox.md) for environment setup, data conversion, and Kubernetes training instructions.
|
||||
See the [LLM-in-Sandbox documentation](../../docs/70-example-llm-in-sandbox.md) for environment setup, data conversion, and Kubernetes training instructions.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# ScienceWorld
|
||||
|
||||
See the [ScienceWorld documentation](../../docs/10-example-science-world.md) for dependencies, runtime settings, and asynchronous training instructions.
|
||||
See the [ScienceWorld documentation](../../docs/60-example-science-world.md) for dependencies, runtime settings, and asynchronous training instructions.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Search-R1
|
||||
|
||||
See the [Search-R1 documentation](../../docs/11-example-search-r1.md) for data preparation, retrieval service setup, API modes, and training instructions.
|
||||
See the [Search-R1 documentation](../../docs/65-example-search-r1.md) for data preparation, retrieval service setup, API modes, and training instructions.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Coding Agent
|
||||
|
||||
See the [Coding Agent documentation](../../docs/13-example-coding-agent.md) for data filtering, distributed setup, repository image preparation, training, and reward-hacking protections.
|
||||
See the [Coding Agent documentation](../../docs/75-example-coding-agent.md) for data filtering, distributed setup, repository image preparation, training, and reward-hacking protections.
|
||||
|
||||
+13
-13
@@ -98,20 +98,20 @@ extra_javascript:
|
||||
nav:
|
||||
- Home: README.md
|
||||
- Documentation:
|
||||
- Installation: 1-installation.md
|
||||
- Quick Start: 2-quick-start.md
|
||||
- Basics: 3-basics.md
|
||||
- Trainer Configuration: 4-trainer-configuration.md
|
||||
- API Gateway Configuration: 5-api-gateway-configuration.md
|
||||
- Controller Configuration: 6-controller-configuration.md
|
||||
- Asynchronous Training: 7-asynchronous-training.md
|
||||
- Installation: 00-installation.md
|
||||
- Quick Start: 01-quick-start.md
|
||||
- Basics: 05-basics.md
|
||||
- Trainer Configuration: 20-trainer-configuration.md
|
||||
- API Gateway Configuration: 25-api-gateway-configuration.md
|
||||
- Controller Configuration: 30-controller-configuration.md
|
||||
- Asynchronous Training: 35-asynchronous-training.md
|
||||
- Examples:
|
||||
- Calc-X: 8-example-calc-x.md
|
||||
- GSM8K: 9-example-gsm8k.md
|
||||
- ScienceWorld: 10-example-science-world.md
|
||||
- Search-R1: 11-example-search-r1.md
|
||||
- LLM-in-Sandbox: 12-example-llm-in-sandbox.md
|
||||
- Coding Agent: 13-example-coding-agent.md
|
||||
- Calc-X: 50-example-calc-x.md
|
||||
- GSM8K: 55-example-gsm8k.md
|
||||
- ScienceWorld: 60-example-science-world.md
|
||||
- Search-R1: 65-example-search-r1.md
|
||||
- LLM-in-Sandbox: 70-example-llm-in-sandbox.md
|
||||
- Coding Agent: 75-example-coding-agent.md
|
||||
|
||||
extra_css:
|
||||
- https://unpkg.com/katex@0/dist/katex.min.css
|
||||
|
||||
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
# Bump the project version and keep pyproject.toml and uv.lock in sync.
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <major|minor|patch>"
|
||||
}
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUMP="$1"
|
||||
case "$BUMP" in
|
||||
major|minor|patch) ;;
|
||||
*)
|
||||
echo "ERROR: unsupported version bump: $BUMP" >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! command -v uv >/dev/null 2>&1; then
|
||||
echo "ERROR: uv is required to bump the project version." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
VERSION_FILE="$PROJECT_ROOT/agentlightning/__init__.py"
|
||||
|
||||
if ! grep -q '^__version__ = ".*"$' "$VERSION_FILE"; then
|
||||
echo "ERROR: package version not found in $VERSION_FILE." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURRENT_VERSION="$(uv version --project "$PROJECT_ROOT" --short)"
|
||||
uv version --project "$PROJECT_ROOT" --bump "$BUMP" --no-sync
|
||||
NEW_VERSION="$(uv version --project "$PROJECT_ROOT" --short)"
|
||||
|
||||
sed -i.bak "s/^__version__ = \".*\"$/__version__ = \"$NEW_VERSION\"/" "$VERSION_FILE"
|
||||
rm -f "$VERSION_FILE.bak"
|
||||
|
||||
echo "Bumped agentlightning version from $CURRENT_VERSION to $NEW_VERSION."
|
||||
@@ -2,11 +2,18 @@
|
||||
|
||||
"""Package rename and application metadata smoke tests."""
|
||||
|
||||
from importlib.metadata import version
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from agentlightning import __version__
|
||||
from agentlightning.server.app import create_app
|
||||
|
||||
|
||||
def test_package_version() -> None:
|
||||
assert __version__ == version("agentlightning")
|
||||
|
||||
|
||||
def test_server_metadata() -> None:
|
||||
app = create_app(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user