Add validator chain config overrides
This commit is contained in:
@@ -495,6 +495,13 @@ func effectiveLLMProfileIDs(resolved pipeline.ResolvedPipeline) []string {
|
||||
add(lane.Merge)
|
||||
add(lane.Normalize)
|
||||
}
|
||||
for _, chain := range resolved.ValidatorChains {
|
||||
for _, validator := range chain.Validators {
|
||||
if validator.ExecutionClass == contracts.ExecutionClassLLMBacked {
|
||||
add(validator.Binding)
|
||||
}
|
||||
}
|
||||
}
|
||||
ids := make([]string, 0, len(seen))
|
||||
for id := range seen {
|
||||
ids = append(ids, id)
|
||||
|
||||
@@ -858,16 +858,32 @@ func TestEffectiveLLMProfileIDsUsesLLMCapableStagesOnly(t *testing.T) {
|
||||
Output: pipeline.ModuleBinding{LLMProfile: "output-profile"},
|
||||
ArtifactLanes: []pipeline.ResolvedArtifactLane{
|
||||
{
|
||||
Extract: pipeline.ModuleBinding{LLMProfile: "extract-profile"},
|
||||
Merge: pipeline.ModuleBinding{LLMProfile: "merge-profile"},
|
||||
Normalize: pipeline.ModuleBinding{LLMProfile: "normalize-profile"},
|
||||
Validators: []pipeline.ModuleBinding{{LLMProfile: "validator-profile"}},
|
||||
Extract: pipeline.ModuleBinding{LLMProfile: "extract-profile"},
|
||||
Merge: pipeline.ModuleBinding{LLMProfile: "merge-profile"},
|
||||
Normalize: pipeline.ModuleBinding{LLMProfile: "normalize-profile"},
|
||||
},
|
||||
},
|
||||
ValidatorChains: []pipeline.ResolvedValidatorChain{
|
||||
{
|
||||
Stage: pipeline.StageExtract,
|
||||
LaneID: "events",
|
||||
ModuleKey: "extract",
|
||||
Validators: []pipeline.ResolvedValidator{
|
||||
{
|
||||
Binding: pipeline.ModuleBinding{Module: "deterministic-validator", LLMProfile: "ignored-validator-profile"},
|
||||
ExecutionClass: contracts.ExecutionClassDeterministic,
|
||||
},
|
||||
{
|
||||
Binding: pipeline.ModuleBinding{Module: "llm-validator", LLMProfile: "validator-profile"},
|
||||
ExecutionClass: contracts.ExecutionClassLLMBacked,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
got := effectiveLLMProfileIDs(resolved)
|
||||
want := []string{"chunk-profile", "extract-profile", "merge-profile", "normalize-profile"}
|
||||
want := []string{"chunk-profile", "extract-profile", "merge-profile", "normalize-profile", "validator-profile"}
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("effectiveLLMProfileIDs() = %#v, want %#v", got, want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user