AI Skill Hub 推荐使用:鹰AI评估 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
云端运行AI评估工具,支持Inspect AI evals
鹰AI评估 是一款基于 Python 开发的开源工具,专注于 aws、evals、inspect-ai 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
云端运行AI评估工具,支持Inspect AI evals
鹰AI评估 是一款基于 Python 开发的开源工具,专注于 aws、evals、inspect-ai 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install hawk
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install hawk
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/METR/hawk
cd hawk
pip install -e .
# 验证安装
python -c "import hawk; print('安装成功')"
# 命令行使用
hawk --help
# 基本用法
hawk input_file -o output_file
# Python 代码中调用
import hawk
# 示例
result = hawk.process("input")
print(result)
# hawk 配置文件示例(config.yml) app: name: "hawk" debug: false log_level: "INFO" # 运行时指定配置文件 hawk --config config.yml # 或通过环境变量配置 export HAWK_API_KEY="your-key" export HAWK_OUTPUT_DIR="./output"
<p align="center"> <img src="docs/logo.png" alt="Inspect-Hawk" width="320"> </p>
<p align="center"> <em>Run evals at scale in AWS</em> </p>
<p align="center"> <a href="https://hawk.metr.org/">Documentation</a> · <a href="https://inspect.aisi.org.uk">Inspect AI</a> · <a href="https://inspectcommunity.slack.com/signup#/domain-signup">Community Slack</a> (support in <code>#inspect-hawk</code>) </p>
---
Looking to run evals against an existing Hawk deployment? You just need the CLI — see hawk/README.md for install, auth, and usage. Deploying your own Hawk instance? This README walks through the full AWS deployment.
Inspect-Hawk is a platform for running Inspect AI evaluations on cloud infrastructure. You define tasks, agents, and models in a YAML config, and Hawk handles everything else: provisioning isolated Kubernetes pods, managing LLM API credentials, streaming logs, storing results in a PostgreSQL warehouse, and serving a web UI to browse them.
Inspect-Hawk is built on Inspect AI, the open-source evaluation framework created by the UK AI Safety Institute. Inspect provides the evaluation primitives (tasks, solvers, scorers, sandboxes). Hawk provides the infrastructure to run those evaluations reliably at scale across multiple models and tasks, without manually provisioning machines or managing API keys.
The system is designed for teams that need to run evaluations regularly and at volume. It supports row-level security and access control per model, a managed LLM proxy, and a data warehouse for querying results across runs. It also supports Inspect Scout scans over previous evaluation transcripts — Scout is a tool for running automated scanners (e.g. for reward hacking, safety-relevant behavior) across transcripts from completed evaluations, producing structured per-sample scan results.
pulumi up builds the frontend using pnpm, so you need Node.js and pnpm on your PATH.
You also need Docker running — the deploy builds container images.
Make sure you have at least ~20gb space free for the Pulumi stack.
brew install pulumi awscli uv python@3.13 jq node@22 pnpm
Or on Linux, install Pulumi, uv, the AWS CLI, Python 3.13+, jq, Node.js 22, pnpm, and Docker.
| Config Key | Description | Example |
|---|---|---|
hawk:domain | Internal domain for services | hawk.example.com |
hawk:publicDomain | Public domain for DNS zones | example.com |
hawk:primarySubnetCidr | VPC CIDR block | 10.0.0.0/16 |
Before your first deploy, make sure Docker Hub authentication is set up — the build pulls base images from Docker Hub, which rate-limits anonymous pulls:
docker login # Docker Hub — required; anonymous pulls are rate-limited (https://hub.docker.com/)
docker login dhi.io # Docker Hardened Images — Hawk's Python base lives here (free Community tier; same Docker Hub credentials work)
pulumi up
Secrets encryption (AWS KMS): Withpulumi stack init ... --secrets-provider="awskms://alias/pulumi-secrets"(step 5), secret stack configuration is encrypted using KMS, not a passphrase. Do not setPULUMI_CONFIG_PASSPHRASEor rely on passphrase-based encryption for Hawk stacks.
KNOWN ISSUE — Pulumi prompts for a passphrase if--secrets-providerwas omitted atpulumi stack initThe project-levelPulumi.yamlships with a hardcodedsecretsprovider:pointing at a KMS alias most users don't have access to. Ifpulumi stack initwas run without--secrets-provider, the stack inherits that default; Pulumi can't reach the key and falls back to prompting for a passphrase. Workaround: re-point the stack at your own KMS alias:This rewrites the per-stack> pulumi stack change-secrets-provider "awskms://alias/<your-alias>" >Pulumi.<stack>.yamlwith the correctsecretsprovider:line. Safe to run on a fresh stack with no resources yet. See Pulumi: changing secrets providers for context. This callout should be removed oncePulumi.yamlno longer ships with a real-looking default.
This creates roughly 200+ AWS resources including a VPC, EKS cluster, ALB, ECS services, Aurora PostgreSQL, S3 buckets, Lambda functions, and more. First deploy takes about 15-20 minutes.
KNOWN ISSUE — git-config secret placeholder is missing required keys The Pulumi-created secret<stack>/inspect/api-git-confighas value{"GIT_CONFIG_COUNT": "0"}, but the API task definition references 7 JSON keys in it:GIT_CONFIG_COUNT,GIT_CONFIG_KEY_0..2,GIT_CONFIG_VALUE_0..2. ECS refuses to start a task whose secret reference points at a missing JSON key, so the API service enters deployment-circuit-breaker failure. Symptom:pulumi upsucceeds but the API URL returns 503 with no healthy targets. The fix is a one-line change to the placeholder ininfra/hawk/__init__.py. Until that lands, run one of the two workarounds below before continuing: Default — running only public evals (no GitHub auth needed): push an empty-but-structured secret. No PAT required:If you need private GitHub repo cloning during evals (eval configs that reference packages via> aws secretsmanager put-secret-value \ > --secret-id <stack>/inspect/api-git-config \ > --secret-string '{"GIT_CONFIG_COUNT":"0","GIT_CONFIG_KEY_0":"","GIT_CONFIG_VALUE_0":"","GIT_CONFIG_KEY_1":"","GIT_CONFIG_VALUE_1":"","GIT_CONFIG_KEY_2":"","GIT_CONFIG_VALUE_2":""}' >git+https://github.com/org/private-repo.gitorgit+ssh://git@github.com/...): run the helper script with a GitHub PAT:Minimum permissions for a fine-grained PAT: - Resource owner: your user, or an org whose private repos the runner needs to clone - Repository access: the specific repos referenced in your eval configs (or "All repositories" within the owner) - Permissions → Repository permissions → Contents: Read-only Classic-PAT equivalent:> scripts/dev/set-git-config.sh <stack> <github-pat> >reposcope (broader — also grants issues/PR access — but works). If every package you reference is in a public repo, don't bother with a PAT — the empty secret above is sufficient. Either way, force a new ECS deployment so the task picks up the corrected secret:Wait ~60–90 seconds, then verify with> aws ecs update-service --cluster <stack>-platform --service <stack>-hawk-api --force-new-deployment >aws ecs describe-services --cluster <stack>-platform --services <stack>-hawk-api --query 'services[0].[runningCount,deployments[0].rolloutState]'— should showrunningCount: 1androlloutState: COMPLETED.
```bash uv pip install "hawk[cli] @ git+https://github.com/METR/hawk#subdirectory=hawk"
uv run python scripts/dev/generate-env.py <stack> > hawk/.env
uv run hawk login uv run hawk eval-set hawk/examples/simple.eval-set.yaml uv run hawk logs -f # watch it run uv run hawk web # open results in browser ```
When you run pulumi up, Hawk creates the following infrastructure on AWS:
| Component | Service | Purpose |
|---|---|---|
| Compute (evals) | EKS | Runs evaluation jobs as isolated Kubernetes pods |
| Compute (API) | ECS Fargate | Hosts the Hawk API server and LLM proxy |
| Database | Aurora PostgreSQL Serverless v2 | Results warehouse with IAM auth, auto-pauses when idle |
| Storage | S3 | Eval logs, written directly by Inspect AI |
| Event processing | EventBridge + Lambda | Imports logs into the warehouse, manages access control |
| Web viewer | CloudFront | Browse and analyze evaluation results |
| Networking | VPC + ALB | Internet-facing load balancer with TLS (configurable) |
| DNS | Route53 | Service discovery and public DNS |
The infrastructure is designed to scale down to near-zero cost when idle (Aurora auto-pauses, Karpenter scales EKS nodes to zero) and scale up automatically when you submit evaluations.
This gets you from zero to a working Hawk deployment on AWS. You'll need an AWS account and a domain name. You can use your existing OIDC identity provider for authentication, or a Cognito user pool by default.
KNOWN ISSUE —us-east-1is currently broken; use a different region Two us-east-1-specific failure modes prevent Hawk from running there: (1) EKS doesn't supportus-east-1eas a control-plane AZ, while Hawk's VPC uses all available AZs; (2) us-east-1 uses the legacyec2.internalDNS suffix instead of<region>.compute.internal, which Bottlerocket'splutodoesn't accept — EKS nodes never join the cluster. Workaround: deploy tous-west-2(project default, most-tested) or an EU region likeeu-west-1/eu-central-1. This warning should be removed once both underlying issues are fixed upstream.
cd infra
pulumi stack init my-org --secrets-provider="awskms://alias/pulumi-secrets"
cp ../Pulumi.example.yaml ../Pulumi.my-org.yaml
Edit Pulumi.my-org.yaml with your values. At minimum, you need:
config:
aws:region: us-west-2
hawk:domain: hawk.example.com # domain you control — used for API and service routing
hawk:publicDomain: example.com # parent domain for DNS zones and TLS certs
hawk:primarySubnetCidr: "10.0.0.0/16"
That's enough to get started. The environment name defaults to your stack name.
Authentication: if you leave hawk:oidcClientId unset (the default), Hawk automatically provisions a Cognito user pool during pulumi up and wires it up as the auth provider. You'll create your first user in step 8 below using scripts/dev/create-cognito-user.sh.
Note that if you are using Cognito, then hawk login in step 9 requires browser authentication to complete the login flow. If you are deploying to a headless environment (such as a remote container) you will instead need to switch to the web viewer to continue, or setup your own authentication flow.
If you already have an OIDC provider (Okta, Auth0, etc.), use it instead (and skip step 8). Run the autodiscovery script to generate the config:
python scripts/dev/discover-oidc.py <issuer-url> <client-id> <audience>
Copy the output into your Pulumi.<stack>.yaml. See Pulumi.example.yaml for the full list of OIDC settings.
All configuration lives in Pulumi.<stack-name>.yaml. See Pulumi.example.yaml for a fully documented reference with all available options.
| Config Key | Default | Description |
|---|---|---|
hawk:eksK8sVersion | 1.33 | Kubernetes version for EKS |
hawk:albIdleTimeout | 3600 | ALB idle timeout in seconds |
hawk:albInternal | false | Set to true to make the ALB internal (requires VPN) |
hawk:cloudwatchLogsRetentionDays | 14 | CloudWatch log retention |
hawk:vpcFlowLogsRetentionDays | 14 | VPC flow log retention |
hawk:agentCpuCount | 4 | CPU cores per eval agent |
hawk:agentRamGb | 16 | RAM in GB per eval agent |
These are all disabled by default. Enable them in your stack config when needed.
Datadog (monitoring, APM, log forwarding):
hawk:enableDatadog: "true"
hawk:datadogSite: datadoghq.com
Requires a <env>/platform/datadog-api-key secret in AWS Secrets Manager.
DNS / Route 53 / Cloudflare:
DNS is not optional — see Choose a domain and DNS strategy above for the four configuration paths (Route 53 Domains, manual delegation, Cloudflare automatic delegation, or HTTP-only testing mode).
Tailscale (VPN overlay for private service access):
Set hawk:albInternal: "true" and store a Tailscale auth key in AWS Secrets Manager. This makes all services accessible only through your Tailscale network.
Budget alerts:
hawk:budgetLimit: "10000"
hawk:budgetNotificationEmails:
- "team@example.com"
When integrations are disabled, services fall back to simpler alternatives (CloudWatch instead of Datadog, no DNS delegation, etc.).
An eval set config is YAML that defines a grid of tasks, agents, and models. Hawk runs every combination.
tasks:
- package: git+https://github.com/UKGovernmentBEIS/inspect_evals
name: inspect_evals
items:
- name: mbpp
models:
- package: openai
name: openai
items:
- name: gpt-4o-mini
limit: 1 # optional: cap samples
Submit it:
hawk eval-set config.yaml
You can run multiple Hawk environments (staging, production, dev) from the same repo. Each gets its own Pulumi stack and isolated AWS resources.
```bash pulumi stack init staging
pulumi up -s staging
pulumi stack init production
pulumi up -s production ```
For development, you can create lightweight environments that share an existing stack's VPC, ALB, and EKS cluster while getting their own database and services:
./scripts/dev/new-dev-env.sh alice # creates a dev-alice stack
Requires a deployed stg stack in the Pulumi backend (the script clones its config). Set PULUMI_BACKEND_URL and AWS_PROFILE first; see AGENTS.local.example.md for the env-var template.
Services appear at https://api-alice.hawk.<domain> and https://viewer-alice.hawk.<domain>. Tear down with:
pulumi destroy -s dev-alice
pulumi stack rm dev-alice # only after destroy completes
For production environments, we recommend for added security that your VPC is private (change hawk:albInternal: "true") and Hawk CLI on your development machine is used through Tailscale (see Tailscale under Optional Integrations below).
INFO: infra/hawk/api.py will automatically create A-alias records for api.hawk.<privateDomain> and middleman.<privateDomain> in your private hosted zone which are resolved through Tailscale DNS to access your API and middleman. Attempting to access either without Tailscale will result in DNS resolution errors.
For development environments, your VPC can be public (the default) and Tailscale is optional. Authentication is still required for API and middleman functionality. Hawk CLI on your personal machine will access the API over the public internet.
INFO: if your VPC is public (the default hawk:albInternal: "false"), then infra/hawk/api.py will create additional A-alias records to your public hosted zone to resolve the DNS for api.hawk.<publicDomain> and middleman.hawk.<publicDomain>. This is for convenience during development.
- To add a public Route 53 alias record manually forapi.hawk.<publicDomain>(andmiddleman.<publicDomain>if you'll hit it directly) pointing at the ALB. Get the ALB info frompulumi stack output alb_dns_nameandpulumi stack output alb_zone_id, then in the public hosted zone for yourpublicDomaincreate A-alias records. Example:> AWS_PROFILE=<profile> aws route53 change-resource-record-sets \ > --hosted-zone-id <public-zone-id> \ > --change-batch '{ "Changes": [{ "Action": "UPSERT", "ResourceRecordSet": { > "Name": "api.hawk.<publicDomain>.", "Type": "A", > "AliasTarget": { "DNSName": "dualstack.<alb-dns>", "HostedZoneId": "<alb-zone-id>", "EvaluateTargetHealth": true } } }] }' >
Hawk routes model API calls through its built-in LLM proxy (Middleman). You need to provide at least one provider's API key:
scripts/dev/set-api-keys.sh <stack> OPENAI_API_KEY=sk-...
This stores the key in Secrets Manager and restarts Middleman. You can set multiple keys at once:
scripts/dev/set-api-keys.sh <stack> OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-...
<stack> is your Pulumi stack name (look it up with pulumi stack --show-name). Used consistently across steps 7–9 below. Supported providers: OpenAI, Anthropic, Gemini, DeepInfra, DeepSeek, Fireworks, Mistral, OpenRouter, Together, xAI.
KNOWN ISSUE — Middleman startup crashes if GCP project isn't set, even with no Vertex models in use Middleman's startup atmiddleman/src/middleman/server.py:136unconditionally callsinit_vertex_urls(), which requiresGOOGLE_CLOUD_PROJECT_FOR_PUBLIC_MODELSor aproject_idinGOOGLE_APPLICATION_CREDENTIALS_JSON. Symptom: Middleman tasks fail ALB health checks ("Target.Timeout" on port 3500); subsequenthawk eval-setcalls returnMiddleman timeout. The proper fix is to make Vertex URL init lazy or gate it on whether any Vertex/Gemini model is configured. Workaround until fixed: set the Pulumi config to any value (a real GCP project if you use Gemini, or a sentinel likenoneotherwise) and re-runpulumi up:> pulumi config set hawk:middlemanGcpProjectForPublicModels none > pulumi up >
KNOWN ISSUE — Middleman's model registry is empty on standalone deployshawk/hawk/tools/sync_models.pyonly does DB→DB sync (used by Pulumi for dev envs pointing at staging). For a fresh standalone deploy there's no source DB to sync from and no shippeddefault_models.json, so the registry stays empty. Symptom:hawk eval-setreturnsMiddleman error: Models not found. The proper fix is forsync_models.pyto accept a--from-jsonsource plus a shipped default seed file in the repo. Workaround until fixed: insert at least one model manually via the RDS Data API:Then force Middleman to reload:> CLUSTER_ARN="arn:aws:rds:<region>:<account>:cluster:<stack>-inspect-ai-warehouse" > SECRET_ARN='arn:aws:secretsmanager:<region>:<account>:secret:rds!cluster-<...>' # single-quoted — Aurora's auto-created master secret has `!` in its name > > aws rds-data execute-statement \ > --resource-arn "$CLUSTER_ARN" --secret-arn "$SECRET_ARN" --database inspect \ > --sql " > WITH new_group AS ( > INSERT INTO middleman.model_group (name) VALUES ('model-access-public') > ON CONFLICT (name) DO UPDATE SET name = EXCLUDED.name RETURNING pk > ), > new_model AS ( > INSERT INTO middleman.model (name, model_group_pk) > SELECT 'claude-haiku-4-5', pk FROM new_group RETURNING pk > ) > INSERT INTO middleman.model_config (model_pk, config, is_active) > SELECT pk, > jsonb_build_object('lab','anthropic','danger_name','claude-haiku-4-5', > 'are_details_secret',false,'dead',false,'vision',false, > 'max_tokens_keyword','max_tokens','request_timeout_minutes',30,'stream',false), > true FROM new_model RETURNING pk; > " >aws ecs update-service --cluster <stack>-platform --service <stack>-middleman --force-new-deployment. Naming gotcha: Middleman model groups use the prefixmodel-access-<name>(middleman/src/middleman/models.py:634). The user's JWT scope must match the group name exactly. For Cognito users,hawk:defaultPermissionsdefaults to"model-access-public"— so the model has to be in groupmodel-access-publicto be reachable (or you sethawk:defaultPermissionsto grant another group). The SQL above already uses the right group name. Other validlabvalues:openai,gemini,vertex,deepseek,mistral,xai, plus others — seemiddleman/src/middleman/models.py:32.
一个简单的云端AI评估工具,支持多种AI模型
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
总体来看,鹰AI评估 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | hawk |
| 原始描述 | 开源AI工具:Run Inspect AI evals in the cloud。⭐18 · Python |
| Topics | awsevalsinspect-aillmpython |
| GitHub | https://github.com/METR/hawk |
| 语言 | Python |
收录时间:2026-05-25 · 更新时间:2026-05-30 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。