diff options
Diffstat (limited to 'dashboard/app/aidb')
6 files changed, 6 insertions, 7 deletions
diff --git a/dashboard/app/aidb/crud.go b/dashboard/app/aidb/crud.go index 4f7e93f6a..872a70ace 100644 --- a/dashboard/app/aidb/crud.go +++ b/dashboard/app/aidb/crud.go @@ -129,12 +129,6 @@ func StartJob(ctx context.Context, req *dashapi.AIJobPollReq) (*Job, error) { job = jobs[0] } job.Started = spanner.NullTime{Time: TimeNow(ctx), Valid: true} - for _, flow := range req.Workflows { - if job.Workflow == flow.Name { - job.LLMModel = flow.LLMModel - break - } - } job.CodeRevision = req.CodeRevision mut, err := spanner.InsertOrUpdateStruct("Jobs", job) if err != nil { @@ -184,6 +178,7 @@ func StoreTrajectorySpan(ctx context.Context, jobID string, span *trajectory.Spa Nesting: int64(span.Nesting), Type: string(span.Type), Name: span.Name, + Model: span.Model, Started: span.Started, Finished: toNullTime(span.Finished), Error: toNullString(span.Error), diff --git a/dashboard/app/aidb/entities.go b/dashboard/app/aidb/entities.go index 23df884df..0a3e7b164 100644 --- a/dashboard/app/aidb/entities.go +++ b/dashboard/app/aidb/entities.go @@ -28,7 +28,6 @@ type Job struct { Created time.Time Started spanner.NullTime Finished spanner.NullTime - LLMModel string // LLM model used to execute the job, filled when the job is started CodeRevision string // syzkaller revision, filled when the job is started Error string // for finished jobs Args spanner.NullJSON @@ -43,6 +42,7 @@ type TrajectorySpan struct { Nesting int64 Type string Name string + Model string Started time.Time Finished spanner.NullTime Error spanner.NullString diff --git a/dashboard/app/aidb/migrations/3_add_trajectory_model.down.sql b/dashboard/app/aidb/migrations/3_add_trajectory_model.down.sql new file mode 100644 index 000000000..9c8ee7020 --- /dev/null +++ b/dashboard/app/aidb/migrations/3_add_trajectory_model.down.sql @@ -0,0 +1 @@ +ALTER TABLE TrajectorySpans DROP COLUMN Model; diff --git a/dashboard/app/aidb/migrations/3_add_trajectory_model.up.sql b/dashboard/app/aidb/migrations/3_add_trajectory_model.up.sql new file mode 100644 index 000000000..c5cd8821d --- /dev/null +++ b/dashboard/app/aidb/migrations/3_add_trajectory_model.up.sql @@ -0,0 +1 @@ +ALTER TABLE TrajectorySpans ADD COLUMN Model STRING(1000); diff --git a/dashboard/app/aidb/migrations/4_remove_jobs_model.down.sql b/dashboard/app/aidb/migrations/4_remove_jobs_model.down.sql new file mode 100644 index 000000000..1d9885cb8 --- /dev/null +++ b/dashboard/app/aidb/migrations/4_remove_jobs_model.down.sql @@ -0,0 +1 @@ +ALTER TABLE Jobs ADD COLUMN LLMModel STRING(1000); diff --git a/dashboard/app/aidb/migrations/4_remove_jobs_model.up.sql b/dashboard/app/aidb/migrations/4_remove_jobs_model.up.sql new file mode 100644 index 000000000..85b4c74e4 --- /dev/null +++ b/dashboard/app/aidb/migrations/4_remove_jobs_model.up.sql @@ -0,0 +1 @@ +ALTER TABLE Jobs DROP COLUMN LLMModel; |
