Skip to content

Commit 12c010d

Browse files
dsf86Coda-botlsy357
authored
[feat][evaluation] custom target (#165)
* fix Change-Id: I28e9043d7fc92be8a5967f99308d84e8920ecf26 * fix Change-Id: Icfaa097086770b4272d17451da1793662fdb8e66 * fix Change-Id: I7bfa075fb27ff072cd88a839ea34a9e376158455 * fix Change-Id: I8a707cf43498ee967cfdba57ef86efeffc1030cf * fix Change-Id: Ieefca2bbaa98ba7232a47ef6a66d378cb1f03e00 * fix Change-Id: Ia6915b5f07839436d00d0c1ef372fa1e08cb01ef * fi Change-Id: I93dab02d49da4ef4344a3a24bf2494bb712e9106 * fix: [Coda] complete CustomPSM DO to DTO conversion in eval_target.go (LogID: 20250915202050010091094121747A8EC) Co-Authored-By: Coda <coda@bytedance.com> * fix Change-Id: I6736d7c0bb734a78fe6c4d8eb17815d7e70742b7 * fix Change-Id: I35feace15e2bcd68beaab2c408bda4a59f1a6d82 * delete Change-Id: I11f9c2fe8afc48e7d5a3207e1f1846ad6a357400 * fix Change-Id: I3ea100fd14ec463236b991d315b09b8939ee5299 * fix Change-Id: Ic2f65b1d4227ca52a1c309f5293b4324f2276f7b * fix Change-Id: I07971653610c864df49bb4ee0109e2195da47132 * fix Change-Id: I85ba8299df085da4e887f919635456c545e9be65 * fix Change-Id: I983651fd7489a515390887ee6cff9b7a2e58766a * fix Change-Id: I2578a4e1147fb285ad2113437b59bf0d8cf04d1a * fix Change-Id: I147144480dd2819a357d5925ec1f24c75f1652f3 * fix Change-Id: I0a3872541575cc24e77d1103221409c50f7c8940 * fix Change-Id: Iffd3c2524485a307c0e38260fcde03a50e59d39a * fix Change-Id: Ie819a628599e0d9d77b1b7e0d6c24d09277e5a80 * fix Change-Id: I3e779cda5e72bb4284b643d565b4b5407b8f635b * fix Change-Id: I1b5e391e311d09e442261c19174c12db0ac94de5 * fix Change-Id: I89dc3d66c52de645587b0defca59159278848754 * fix Change-Id: I9bd09ee904fbbe335b82c23a5825c611b03363ef * fi Change-Id: I1014e03889fc43f974c481bbd458e7d31191b7a4 * fix Change-Id: I299cc05f9b6a7612e7e69f628149f88125f810ab * fix Change-Id: Ic6e803bc1827cb4207481037694e6e558291b0b3 * fix(evaluation): PassbackEvalTargetInvokeResult openapi feat(evaluation): custom target exec * fix Change-Id: Id2c5b00e06032cf0a7284b11b35831a4b910ddb1 * fix Change-Id: Id3593c7c69804d5c0a9a36f6b6f4be843bff0063 * feat(evaluation): spi service code gen * fix Change-Id: Ie09dcddfb349ae728e406d144ba807df3edf737c * fix(evaluation): scheduler item zombie time * fix(evaluation): spi kitex gen * fix Change-Id: I55db7249ac8993e14dc39175dae975e52838755b * fix Change-Id: Ie235409a243c3e0ddabac0cebda49aeeefc89caa * feat(evaluation): evaltarget debug content * feat(evaluation): evaltarget debug method * feat(evaluation): evaltarget asyncdebug method * fix Change-Id: If2d50e3d915fef80f5300a9e293cda7c843b6955 * feat(evaluation): target service with async execute * fix(evaluation): debug target auth * fix Change-Id: I3a6d36c15b2862ec925aa7c84689fcd5f08070ab * fix(evaluation): panic * fix(evaluation): target exec err * fix(evaluation): target debug * fix(evaluation): debug target * fix(evaluation): target asyncdebug abort err * fix Change-Id: Id08349ac29a8862f3e2fc5e69eb1b23e45ef1e72 * fix(evaluation): proxy path * fix(evaluation): evalasyncrepo * fix(evaluation): debug trace * fix(evaluation): target debug param * fix(evaluation): target debug param * fix(evaluation): report status * fix(evaluation): async call * fix(evaluation): expt async exec * fix(evaluation): expt async exec * fix(evaluation): async return invoke_id * fix(evaluation): async abort * fix(evaluation): async reentry * dev: commit * fix(evaluation): target async callee * fix(evaluation): AsyncExecuteEvalTargetResponse with callee * feat(evaluation): ReportEvalTargetInvokeResult with callee * fix(evaluation): ReportEvalTargetInvokeResult check * fix(evaluation): log * fix(evaluation): calltarget inputfields * feat(evaluation): ExecuteEvalTargetRequest * fix(evaluation): AsyncDebugTarget with callee * fix(evaluation): panic * fix(evaluation): EvalTargetVersionDTO2DO panic * fix(evaluation): record nil * fix(evaluation): target service createrecord * fix(evaluation): asyncevalctx * fix(evaluation): target async debug record * fix(evaluation): target async debug record * add test Change-Id: Ic9e5644f0aa580a0331ea4e44db72a044002246c * fix Change-Id: I0d43dc00d3efb12c9661e1b7f4576dcb22ed5ed1 * fix Change-Id: I4d7713ab45e038d8e11f2d89a4b054281392a08b * fix Change-Id: Id81ce7c9149fa4b21bd843cfa50f662c7742ba64 * fix(evaluation): spi exec err * fix(evaluation): EvalTarget span error * fix(evaluation): ut * fix(evaluation): ut panic * fix(evaluation): ut * test: [Coda] add eval target async debug tests (LogID: 20251019223217192168001011361AB57) Co-Authored-By: Coda <coda@bytedance.com> * test: [Coda] add eval target service unit tests (LogID: 20251019235519192168001011515D01D) Co-Authored-By: Coda <coda@bytedance.com> * fix Change-Id: I233cafb16116e8a67adfce78899b462f81217ed2 * test: [Coda] add eval openapi invoke result tests (LogID: 20251020121552010079145031634481D) Co-Authored-By: Coda <coda@bytedance.com> * test: [Coda] add eval target app and convertor coverage (LogID: 202510201405230100791450314179984) Co-Authored-By: Coda <coda@bytedance.com> * test: [Coda] enhance evaluation module unit tests (LogID: 20251020145031010079145031340757A) Co-Authored-By: Coda <coda@bytedance.com> * fix Change-Id: I0d679cd402159c271b53c497563e4b477e24632b * fix Change-Id: I97789c10adfd899c0ffa41ea200cdaf029b2828f * fix(evaluation): golangci-lint err * fix Change-Id: I6c85e9ce2fa3a9d2cf4394b34a4a126c5f272e63 * fix(evaluation): ut * fix(evaluation): ut * fix(evaluation): ut --------- Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com>
1 parent aab6f4f commit 12c010d

110 files changed

Lines changed: 36415 additions & 5560 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/.codecov.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ ignore:
5656
- "**/repo/mysql/**"
5757
- "**/repo/**/mysql/**"
5858
- "**/repo/redis/**"
59+
- "**/repo/**/redis/**"
5960
- "backend/api/router/coze/loop/apis/*.go"
6061

6162
parsers:

backend/api/handler/coze/loop/apis/eval_open_apiservice.go

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/api/handler/coze/loop/apis/eval_target_service.go

Lines changed: 21 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/api/handler/coze/loop/apis/handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/eval_target"
2929
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/evaluator"
3030
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/expt"
31+
evalopen "github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/openapi"
3132
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/auth"
3233
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/authn"
3334
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/file"
@@ -48,6 +49,7 @@ import (
4849
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loeval_target"
4950
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loevaluator"
5051
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loexpt"
52+
loevalopen "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loopenapi"
5153
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/loauthn"
5254
foundationlofile "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/lofile"
5355
foundationloopenapi "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/loopenapi"
@@ -85,6 +87,7 @@ type EvaluationHandler struct {
8587
evaluation.EvaluatorService
8688
evaluation.EvaluationSetService
8789
evaluation.EvalTargetService
90+
evaluation.EvalOpenAPIService
8891
}
8992

9093
type FoundationHandler struct {
@@ -125,17 +128,20 @@ func NewEvaluationHandler(
125128
evaluatorApp evaluation.EvaluatorService,
126129
evaluationSetApp evaluation.EvaluationSetService,
127130
evalTargetService evaluation.EvalTargetService,
131+
evalOpenAPIApp evaluation.EvalOpenAPIService,
128132
) *EvaluationHandler {
129133
h := &EvaluationHandler{
130134
EvaluatorService: evaluatorApp,
131135
IExperimentApplication: exptApp,
132136
EvaluationSetService: evaluationSetApp,
133137
EvalTargetService: evalTargetService,
138+
EvalOpenAPIService: evalOpenAPIApp,
134139
}
135140
bindLocalCallClient(expt.ExperimentService(h), &localExptSvc, loexpt.NewLocalExperimentService)
136141
bindLocalCallClient(evaluator.EvaluatorService(h), &localEvaluatorSvc, loevaluator.NewLocalEvaluatorService)
137142
bindLocalCallClient(eval_set.EvaluationSetService(h), &localEvalSetSvc, loeval_set.NewLocalEvaluationSetService)
138143
bindLocalCallClient(eval_target.EvalTargetService(h), &localEvalTargetSvc, loeval_target.NewLocalEvalTargetService)
144+
bindLocalCallClient(evalopen.EvaluationOpenAPIService(h), &localEvalOpenAPIClient, loevalopen.NewLocalEvaluationOpenAPIService)
139145
return h
140146
}
141147

backend/api/handler/coze/loop/apis/wire.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ var (
8181
evaluationapp.InitEvaluatorApplication,
8282
evaluationapp.InitEvaluationSetApplication,
8383
evaluationapp.InitEvalTargetApplication,
84+
evaluationapp.InitEvalOpenAPIApplication,
8485
)
8586
dataSet = wire.NewSet(
8687
NewDataHandler,

backend/api/handler/coze/loop/apis/wire_gen.go

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/api/router/coze/loop/apis/coze.loop.apis.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/api/router/coze/loop/apis/middleware.go

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAx
473473
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
474474
github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM=
475475
github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA=
476+
github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE=
476477
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
477478
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
478479
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

backend/infra/http/http.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ type RequestParam struct {
2121
Response interface{}
2222

2323
Timeout time.Duration
24+
Cluster *string
25+
WithSD *bool
2426
}

0 commit comments

Comments
 (0)