Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/.codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ ignore:
- "**/repo/mysql/**"
- "**/repo/**/mysql/**"
- "**/repo/redis/**"
- "**/repo/**/redis/**"
- "backend/api/router/coze/loop/apis/*.go"

parsers:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/ai-cr-required.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ release/deployment/helm-chart/umbrella/Chart.lock
.coda/
backend/script/errorx/.env
.cursor/
AGENTS.md
35 changes: 6 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ IMAGE_REGISTRY := docker.io
IMAGE_REPOSITORY := cozedev
IMAGE_NAME := coze-loop

# Python FaaS image config
PYFAAS_IMAGE_NAME := coze-loop-python-faas
PYFAAS_DOCKERFILE := ./release/image/python-faas.Dockerfile

DOCKER_COMPOSE_DIR := ./release/deployment/docker-compose

HELM_CHART_DIR := ./release/deployment/helm-chart/umbrella
Expand Down Expand Up @@ -37,37 +33,18 @@ image%:
docker run --rm $(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest du -sh /coze-loop/bin; \
docker run --rm $(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest du -sh /coze-loop/resources; \
docker run --rm $(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest du -sh /coze-loop ;; \
-python-faas-bpush-*) \
version="$*"; \
version="$${version#-python-faas-bpush-}"; \
docker buildx build \
--platform linux/amd64,linux/arm64 \
--progress=plain \
--push \
--build-context bootstrap=$(DOCKER_COMPOSE_DIR)/bootstrap/python-faas \
-f $(PYFAAS_DOCKERFILE) \
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME):latest \
-t $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME):"$$version" \
.; \
docker pull $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME):latest; \
docker run --rm $(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME):latest du -sh /app; \
docker run --rm $(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME):latest du -sh /app/vendor; \
;; \
-help|*) \
echo "Usage:"; \
echo " make image--login # Login to the image registry ($(IMAGE_REGISTRY))"; \
echo " make image-<version> # Build & push coze-loop image (<version>, latest)"; \
echo " make image-python-faas-bpush-<version> # Build & push python-faas image (<version>, latest)"; \
echo " make image--login # Login to the image registry ($(IMAGE_REGISTRY))"; \
echo " make image-<version> # Build & push multi-arch image with tags <version> and latest"; \
echo; \
echo "Examples:"; \
echo " make image--login"; \
echo " make image-1.0.0"; \
echo " make image-python-faas-bpush-1.0.0"; \
echo " make image--login # Login before pushing images"; \
echo " make image-1.0.0 # Build & push images tagged '1.0.0' and 'latest'"; \
echo; \
echo "Notes:"; \
echo " - 'image--login' logs in using IMAGE_REPOSITORY as the username."; \
echo " - 'image-<version>' pushes to $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME)"; \
echo " - 'image-python-faas-bpush-<version>' pushes to $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(PYFAAS_IMAGE_NAME)"; \
echo " - 'image--login' logs in using IMAGE_REPOSITORY as the username."; \
echo " - 'image-<version>' will push to $(IMAGE_REGISTRY)/$(IMAGE_REPOSITORY)/$(IMAGE_NAME)"; \
exit 1 ;; \
esac

Expand Down
34 changes: 0 additions & 34 deletions backend/api/handler/coze/loop/apis/eval_open_apiservice.go

This file was deleted.

56 changes: 35 additions & 21 deletions backend/api/handler/coze/loop/apis/eval_target_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion backend/api/handler/coze/loop/apis/evaluator_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions backend/api/handler/coze/loop/apis/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/eval_target"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/evaluator"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/expt"
evalopen "github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/openapi"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/auth"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/authn"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/foundation/file"
Expand All @@ -49,7 +48,6 @@ import (
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loeval_target"
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loevaluator"
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loexpt"
loevalopen "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/evaluation/loopenapi"
"github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/loauthn"
foundationlofile "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/lofile"
foundationloopenapi "github.com/coze-dev/coze-loop/backend/loop_gen/coze/loop/foundation/loopenapi"
Expand Down Expand Up @@ -87,7 +85,6 @@ type EvaluationHandler struct {
evaluation.EvaluatorService
evaluation.EvaluationSetService
evaluation.EvalTargetService
evaluation.EvalOpenAPIService
}

type FoundationHandler struct {
Expand Down Expand Up @@ -128,20 +125,17 @@ func NewEvaluationHandler(
evaluatorApp evaluation.EvaluatorService,
evaluationSetApp evaluation.EvaluationSetService,
evalTargetService evaluation.EvalTargetService,
evalOpenAPIApp evaluation.EvalOpenAPIService,
) *EvaluationHandler {
h := &EvaluationHandler{
EvaluatorService: evaluatorApp,
IExperimentApplication: exptApp,
EvaluationSetService: evaluationSetApp,
EvalTargetService: evalTargetService,
EvalOpenAPIService: evalOpenAPIApp,
}
bindLocalCallClient(expt.ExperimentService(h), &localExptSvc, loexpt.NewLocalExperimentService)
bindLocalCallClient(evaluator.EvaluatorService(h), &localEvaluatorSvc, loevaluator.NewLocalEvaluatorService)
bindLocalCallClient(eval_set.EvaluationSetService(h), &localEvalSetSvc, loeval_set.NewLocalEvaluationSetService)
bindLocalCallClient(eval_target.EvalTargetService(h), &localEvalTargetSvc, loeval_target.NewLocalEvalTargetService)
bindLocalCallClient(evalopen.EvaluationOpenAPIService(h), &localEvalOpenAPIClient, loevalopen.NewLocalEvaluationOpenAPIService)
return h
}

Expand Down
32 changes: 0 additions & 32 deletions backend/api/handler/coze/loop/apis/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,3 @@ func Test_invokeAndRender(t *testing.T) {
})
}
}

func TestValidateEvaluator(t *testing.T) {
tests := []struct {
name string
wantPanic bool
}{
{
name: "ValidateEvaluator function exists and can be called",
wantPanic: false,
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx := context.Background()
c := &app.RequestContext{}

// The function will panic due to nil localEvaluatorSvc, but we verify it exists and can be called
// This test mainly ensures the function compiles and follows the expected pattern
if tt.wantPanic {
assert.Panics(t, func() {
ValidateEvaluator(ctx, c)
})
} else {
// Even though it panics, we verify the function signature is correct
assert.Panics(t, func() {
ValidateEvaluator(ctx, c)
})
}
})
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions backend/api/handler/coze/loop/apis/observability_trace_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion backend/api/handler/coze/loop/apis/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var (
evaluationapp.InitEvaluatorApplication,
evaluationapp.InitEvaluationSetApplication,
evaluationapp.InitEvalTargetApplication,
evaluationapp.InitEvalOpenAPIApplication,
)
dataSet = wire.NewSet(
NewDataHandler,
Expand Down
Loading