refactor(plugin-eval): remove dead auth/model_tier config (#591)
这个提交包含在:
@@ -35,7 +35,6 @@ def _run_score(
|
||||
output: str,
|
||||
verbose: bool,
|
||||
concurrency: int,
|
||||
auth: str,
|
||||
threshold: float | None,
|
||||
) -> int:
|
||||
"""Core scoring logic; returns exit code."""
|
||||
@@ -48,7 +47,6 @@ def _run_score(
|
||||
output_format=output,
|
||||
verbose=verbose,
|
||||
concurrency=concurrency,
|
||||
auth=auth,
|
||||
)
|
||||
engine = EvalEngine(config)
|
||||
|
||||
@@ -96,13 +94,12 @@ def score(
|
||||
output: str = typer.Option("markdown", help="Output format: json|markdown|html"), # noqa: B008
|
||||
verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"), # noqa: B008
|
||||
concurrency: int = typer.Option(4, help="Max concurrent LLM calls"), # noqa: B008
|
||||
auth: str = typer.Option("max", help="Auth mode: max|api-key"), # noqa: B008
|
||||
threshold: float | None = typer.Option( # noqa: B008
|
||||
None, help="Minimum score threshold; exit code 1 if below"
|
||||
),
|
||||
) -> None:
|
||||
"""Evaluate a plugin or skill directory and report its quality score."""
|
||||
exit_code = _run_score(path, depth, output, verbose, concurrency, auth, threshold)
|
||||
exit_code = _run_score(path, depth, output, verbose, concurrency, threshold)
|
||||
if exit_code != 0:
|
||||
raise typer.Exit(code=exit_code)
|
||||
|
||||
@@ -113,11 +110,10 @@ def certify(
|
||||
output: str = typer.Option("markdown", help="Output format: json|markdown|html"), # noqa: B008
|
||||
verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"), # noqa: B008
|
||||
concurrency: int = typer.Option(4, help="Max concurrent LLM calls"), # noqa: B008
|
||||
auth: str = typer.Option("max", help="Auth mode: max|api-key"), # noqa: B008
|
||||
threshold: float | None = typer.Option(None, help="Minimum score threshold"), # noqa: B008
|
||||
) -> None:
|
||||
"""Certify a plugin or skill (runs at deep depth)."""
|
||||
exit_code = _run_score(path, Depth.DEEP, output, verbose, concurrency, auth, threshold)
|
||||
exit_code = _run_score(path, Depth.DEEP, output, verbose, concurrency, threshold)
|
||||
if exit_code != 0:
|
||||
raise typer.Exit(code=exit_code)
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ class EvalEngine:
|
||||
|
||||
judge_config = JudgeConfig(
|
||||
judges=self.config.judges,
|
||||
auth=self.config.auth,
|
||||
concurrency=self.config.concurrency,
|
||||
)
|
||||
judge = JudgeAnalyzer(judge_config)
|
||||
@@ -98,7 +97,6 @@ class EvalEngine:
|
||||
mc_config = MonteCarloConfig(
|
||||
n_runs=n_runs,
|
||||
concurrency=self.config.concurrency,
|
||||
auth=self.config.auth,
|
||||
)
|
||||
mc = MonteCarloAnalyzer(mc_config)
|
||||
|
||||
|
||||
@@ -147,9 +147,7 @@ def _measured_score(result: dict, key: str) -> float | None:
|
||||
@dataclass
|
||||
class JudgeConfig:
|
||||
judges: int = 1
|
||||
auth: str = "max"
|
||||
concurrency: int = 4
|
||||
model_tier: str = "auto"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -40,7 +40,6 @@ class MonteCarloConfig:
|
||||
|
||||
n_runs: int = 50
|
||||
concurrency: int = 4
|
||||
auth: str = "max"
|
||||
seed: int = 42
|
||||
progress_callback: Callable[[int, int], None] | None = None
|
||||
|
||||
|
||||
@@ -36,11 +36,9 @@ class Depth(StrEnum):
|
||||
class EvalConfig(BaseModel):
|
||||
depth: Depth = Depth.STANDARD
|
||||
concurrency: int = Field(default=4, ge=1, le=20)
|
||||
model_tier: str = "auto"
|
||||
output_format: str = "json"
|
||||
verbose: bool = False
|
||||
corpus_path: str | None = None
|
||||
auth: str = "max"
|
||||
judges: int = Field(default=1, ge=1, le=5)
|
||||
monte_carlo_n: int | None = None
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class TestJudgeConfig:
|
||||
def test_default_config(self):
|
||||
config = JudgeConfig()
|
||||
assert config.judges == 1
|
||||
assert config.auth == "max"
|
||||
assert config.concurrency == 4
|
||||
|
||||
|
||||
class TestJudgeAnalyzer:
|
||||
|
||||
@@ -21,7 +21,6 @@ class TestEvalConfig:
|
||||
config = EvalConfig()
|
||||
assert config.depth == Depth.STANDARD
|
||||
assert config.concurrency == 4
|
||||
assert config.auth == "max"
|
||||
|
||||
def test_custom_config(self):
|
||||
config = EvalConfig(depth=Depth.DEEP, concurrency=8)
|
||||
|
||||
在新工单中引用