Skip to content

feat: Read log signal from DB #9959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions harness/determined/common/api/bindings.py

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

1 change: 1 addition & 0 deletions master/internal/api_experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2706,6 +2706,7 @@ func (a *apiServer) SearchExperiments(
Column("searcher_metric_value").
Column("trials.external_trial_id").
ColumnExpr("nullif(trials.metadata, 'null') as metadata").
ColumnExpr("NULL as log_signals").
Join("LEFT JOIN validations bv ON trials.best_validation_id = bv.id").
Join("LEFT JOIN validations lv ON trials.latest_validation_id = lv.id").
Join("LEFT JOIN checkpoints_v2 new_ckpt ON new_ckpt.id = trials.warm_start_checkpoint_id").
Expand Down
5 changes: 4 additions & 1 deletion master/internal/api_runs.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@ func getRunsColumns(q *bun.SelectQuery) *bun.SelectQuery {
'pachyderm_integration', NULLIF(e.config#>'{integrations,pachyderm}', 'null'),
'id', e.id) AS experiment`).
ColumnExpr("rm.metadata AS metadata").
ColumnExpr("ta.log_signal AS log_signal").
Join("LEFT JOIN experiments AS e ON r.experiment_id=e.id").
Join("LEFT JOIN runs_metadata AS rm ON r.id=rm.run_id").
Join("LEFT JOIN users u ON e.owner_id = u.id").
Join("LEFT JOIN projects p ON r.project_id = p.id").
Join("LEFT JOIN workspaces w ON p.workspace_id = w.id")
Join("LEFT JOIN workspaces w ON p.workspace_id = w.id").
Join("LEFT JOIN run_id_task_id rt ON r.id=rt.run_id").
Join("LEFT JOIN tasks ta ON ta.task_id=rt.task_id")
}

func sortRuns(sortString *string, runQuery *bun.SelectQuery) error {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER table public.tasks
ADD COLUMN log_signal text;
7 changes: 7 additions & 0 deletions master/static/srv/proto_get_trials_plus.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ SELECT
WHERE tt.run_id = t.id
ORDER BY ta.start_time
) sub_tasks)) AS task_ids,
(
(SELECT json_agg(log_signal) FILTER (WHERE log_signal IS NOT NULL) FROM (
SELECT ta.log_signal FROM run_id_task_id tt
JOIN tasks ta ON tt.task_id = ta.task_id
WHERE tt.run_id = t.id
ORDER BY ta.start_time
) log_signals)) AS log_signals,
t.checkpoint_size AS total_checkpoint_size,
t.checkpoint_count,
t.total_batches AS total_batches_processed,
Expand Down
Loading
Loading