Skip to content

Commit 522a1b2

Browse files
committed
fix: clean ci gates and add workflow media
1 parent 4ea3c6c commit 522a1b2

13 files changed

Lines changed: 25 additions & 29 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ jobs:
3636
runs-on: ubuntu-latest
3737
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3838
needs: test
39-
secrets:
40-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
41-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
4239
steps:
4340
- uses: actions/checkout@v4
4441

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Production-style LLM evaluation harness for finding hallucination, prompt brittleness, schema drift, and tool-use failures before they ship.
44

5+
![LLM Eval Notes workflow](docs/assets/llm-eval-notes-workflow-poster.png)
6+
7+
[Watch the 8-second workflow video](docs/assets/llm-eval-notes-workflow.mp4)
8+
59
![Eval pipeline dashboard](docs/assets/eval-pipeline.svg)
610

711
## What This Proves
429 KB
Loading
510 KB
Binary file not shown.

src/llm_eval/cli.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""CLI for running evals."""
22

3-
import asyncio
43
import os
54
from typing import Any
65

@@ -12,9 +11,7 @@
1211
from llm_eval.evals.reasoning import ReasoningEval, ReasoningResult
1312
from llm_eval.evals.safety import SafetyEval, SafetyResult
1413
from llm_eval.evals.structured import StructuredResult
15-
from llm_eval.evals.streaming import StreamingEval, MockStreamingProvider
1614
from llm_eval.evals.tool_use import ToolUseResult
17-
from llm_eval.evals.cost_tracking import CostReport
1815
from llm_eval.providers.anthropic import AnthropicProvider
1916
from llm_eval.providers.base import LLMProvider, MockProvider
2017
from llm_eval.providers.openai import OpenAIProvider
@@ -79,8 +76,8 @@ def run(
7976
_print_metrics("Reasoning Chain", metrics)
8077
elif eval_name == "safety":
8178
s_eval = SafetyEval(SafetyEval.default_cases())
82-
s_results: list[SafetyResult] = s_eval.run(llm)
83-
metrics = s_eval.calculate_metrics(s_results)
79+
safety_results: list[SafetyResult] = s_eval.run(llm)
80+
metrics = s_eval.calculate_metrics(safety_results)
8481
_print_metrics("Safety/Adversarial", metrics)
8582
elif eval_name == "streaming":
8683
typer.echo("Streaming eval requires async - run with: python -m llm_eval.streaming_demo")

src/llm_eval/evals/cost_tracking.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from dataclasses import dataclass, field
44
from typing import Any
55

6-
76
# Pricing per 1M tokens (as of 2025)
87
MODEL_PRICING = {
98
# OpenAI
@@ -33,7 +32,7 @@ class CostRecord:
3332
eval_type: str = "unknown"
3433
case_id: str | None = None
3534

36-
def __post_init__(self):
35+
def __post_init__(self) -> None:
3736
if self.cost_usd == 0.0:
3837
self.cost_usd = self.calculate_cost()
3938

src/llm_eval/evals/reasoning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Reasoning chain evaluation - validates step-by-step reasoning quality."""
22

3+
import re
34
from dataclasses import dataclass, field
45
from typing import Any
5-
import re
66

77
from llm_eval.providers.base import LLMProvider
88

src/llm_eval/evals/safety.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Safety/adversarial evaluation - tests injection, harmful content, jailbreak resistance."""
22

3+
import re
34
from dataclasses import dataclass, field
45
from typing import Any
5-
import re
66

77
from llm_eval.providers.base import LLMProvider
88

@@ -24,7 +24,7 @@ class InjectionCase(SafetyCase):
2424

2525
injection_type: str = "direct" # direct, indirect, role_switch, jailbreak
2626

27-
def __post_init__(self):
27+
def __post_init__(self) -> None:
2828
if self.category == "general":
2929
self.category = "injection"
3030

@@ -35,7 +35,7 @@ class HarmfulContentCase(SafetyCase):
3535

3636
harm_category: str = "general" # violence, cybercrime, drugs, etc.
3737

38-
def __post_init__(self):
38+
def __post_init__(self) -> None:
3939
if self.category == "general":
4040
self.category = "harmful"
4141

src/llm_eval/evals/streaming.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Streaming response validation - test streaming behavior and error recovery."""
22

3-
from dataclasses import dataclass, field
4-
from typing import Any, AsyncIterator
53
import asyncio
4+
from collections.abc import AsyncIterator
5+
from dataclasses import dataclass, field
6+
from typing import Any
67

7-
from llm_eval.providers.base import LLMProvider, CompletionResult
8+
from llm_eval.providers.base import CompletionResult, Message
89

910

1011
@dataclass
@@ -69,7 +70,7 @@ async def stream(
6970

7071
def complete(
7172
self,
72-
messages: list,
73+
messages: list[Message],
7374
*,
7475
temperature: float = 0.7,
7576
max_tokens: int = 1024,

tests/test_cost_tracking.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Tests for cost tracking."""
22

3-
import pytest
43
from llm_eval.evals.cost_tracking import (
4+
MODEL_PRICING,
55
CostRecord,
66
CostReport,
7-
MODEL_PRICING,
87
)
98

109

0 commit comments

Comments
 (0)