Skip to content

Commit

Permalink
Release 0.6 rc5a (#1187)
Browse files Browse the repository at this point in the history
* Bump Aim UI version (#1186)

bump ui version

Co-authored-by: fabio vincenzi <[email protected]>

* Fix issues related to context serialisation for `/metrics/search` endpoint. (#1185)

---------

Co-authored-by: fabiovincenzi <[email protected]>
Co-authored-by: fabio vincenzi <[email protected]>
Co-authored-by: Software Developer <[email protected]>
  • Loading branch information
4 people authored May 6, 2024
1 parent 4627ee1 commit d906f21
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 156 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
dagger.io/dagger v0.11.2
dario.cat/mergo v1.0.0
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/G-Research/fasttrackml-ui-aim v0.31705.41
github.com/G-Research/fasttrackml-ui-aim v0.31705.43
github.com/G-Research/fasttrackml-ui-mlflow v0.20902.7
github.com/PuerkitoBio/goquery v1.9.2
github.com/apache/arrow/go/v14 v14.0.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/99designs/gqlgen v0.17.44/go.mod h1:UTCu3xpK2mLI5qcMNw+HKDiEL77it/1Xt
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/G-Research/fasttrackml-ui-aim v0.31705.41 h1:7t6pGfrvraKBtWtCNzQ7cofkpAAKJnXJ9ZFvYOYaTkA=
github.com/G-Research/fasttrackml-ui-aim v0.31705.41/go.mod h1:1ydj5zgJgklq4gf3jkKMh+OrBXRz/5hZtx+1aROuWaM=
github.com/G-Research/fasttrackml-ui-aim v0.31705.43 h1:c/kcjIU7WnqCc+Xejg+Wf1uiroh82ft5R5WzAo119mk=
github.com/G-Research/fasttrackml-ui-aim v0.31705.43/go.mod h1:1ydj5zgJgklq4gf3jkKMh+OrBXRz/5hZtx+1aROuWaM=
github.com/G-Research/fasttrackml-ui-mlflow v0.20902.7 h1:GPNCKPkUBBx54JYCRX8r06WvBa7sep5ppm1VQiPYZKY=
github.com/G-Research/fasttrackml-ui-mlflow v0.20902.7/go.mod h1:Bg/xSCP6KzFDVDBSfJfrGmXuU6H8lFtboy+bTiHK6c4=
github.com/Khan/genqlient v0.7.0 h1:GZ1meyRnzcDTK48EjqB8t3bcfYvHArCUUvgOwpz1D4w=
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/aim2/api/request/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ type SearchRunsRequest struct {

// MetricTuple represents a metric with key and context.
type MetricTuple struct {
Key string `json:"key"`
Context string `json:"context"`
Key string `json:"key"`
Context fiber.Map `json:"context"`
}

// SearchMetricsRequest is a request struct for `GET /runs/search/metric` endpoint.
Expand Down
7 changes: 6 additions & 1 deletion pkg/api/aim2/dao/repositories/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package repositories
import (
"context"
"database/sql"
"encoding/json"
"fmt"
"strings"

Expand All @@ -14,6 +15,7 @@ import (
"github.com/G-Research/fasttrackml/pkg/api/aim2/common"
"github.com/G-Research/fasttrackml/pkg/api/aim2/dao/models"
"github.com/G-Research/fasttrackml/pkg/api/aim2/query"
"github.com/G-Research/fasttrackml/pkg/common/api"
"github.com/G-Research/fasttrackml/pkg/common/dao/repositories"
"github.com/G-Research/fasttrackml/pkg/common/dao/types"
)
Expand Down Expand Up @@ -257,7 +259,10 @@ func (r MetricRepository) findContextIDs(ctx context.Context, req *request.Searc
contextList := []types.JSONB{}
contextsMap := map[string]types.JSONB{}
for _, r := range req.Metrics {
data := types.JSONB(r.Context)
data, err := json.Marshal(r.Context)
if err != nil {
return nil, api.NewInternalError("error serializing context: %s", err)
}
contextList = append(contextList, data)
contextsMap[string(data)] = data
}
Expand Down
Loading

0 comments on commit d906f21

Please sign in to comment.