Hardened the proposal modules to skip malformed proposals rather than hard failing the entire run
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
This commit is contained in:
@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
|
||||
LLMClient: req.LLMClient,
|
||||
Scheduler: req.LLMScheduler,
|
||||
DiagnosticsDir: req.DiagnosticsDir,
|
||||
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
|
||||
if req.OnDroppedCandidate == nil {
|
||||
return
|
||||
}
|
||||
req.OnDroppedCandidate(
|
||||
dropped.ProposalIndex,
|
||||
dropped.TargetSegmentID,
|
||||
dropped.OriginalText,
|
||||
dropped.CorrectedText,
|
||||
dropped.Confidence,
|
||||
dropped.ReasonCode,
|
||||
dropped.Message,
|
||||
)
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
|
||||
LLMClient: req.LLMClient,
|
||||
Scheduler: req.LLMScheduler,
|
||||
DiagnosticsDir: req.DiagnosticsDir,
|
||||
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
|
||||
if req.OnDroppedCandidate == nil {
|
||||
return
|
||||
}
|
||||
req.OnDroppedCandidate(
|
||||
dropped.ProposalIndex,
|
||||
dropped.TargetSegmentID,
|
||||
dropped.OriginalText,
|
||||
dropped.CorrectedText,
|
||||
dropped.Confidence,
|
||||
dropped.ReasonCode,
|
||||
dropped.Message,
|
||||
)
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
|
||||
LLMClient: req.LLMClient,
|
||||
Scheduler: req.LLMScheduler,
|
||||
DiagnosticsDir: req.DiagnosticsDir,
|
||||
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
|
||||
if req.OnDroppedCandidate == nil {
|
||||
return
|
||||
}
|
||||
req.OnDroppedCandidate(
|
||||
dropped.ProposalIndex,
|
||||
dropped.TargetSegmentID,
|
||||
dropped.OriginalText,
|
||||
dropped.CorrectedText,
|
||||
dropped.Confidence,
|
||||
dropped.ReasonCode,
|
||||
dropped.Message,
|
||||
)
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -72,6 +72,20 @@ func (m *Module) Propose(ctx context.Context, req contracts.ProposalRequest) ([]
|
||||
LLMClient: req.LLMClient,
|
||||
Scheduler: req.LLMScheduler,
|
||||
DiagnosticsDir: req.DiagnosticsDir,
|
||||
OnDroppedCandidate: func(dropped proposal_generation.DroppedCandidate) {
|
||||
if req.OnDroppedCandidate == nil {
|
||||
return
|
||||
}
|
||||
req.OnDroppedCandidate(
|
||||
dropped.ProposalIndex,
|
||||
dropped.TargetSegmentID,
|
||||
dropped.OriginalText,
|
||||
dropped.CorrectedText,
|
||||
dropped.Confidence,
|
||||
dropped.ReasonCode,
|
||||
dropped.Message,
|
||||
)
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user