-
Notifications
You must be signed in to change notification settings - Fork 365
feat: add arbitrary metadata GET/POST endpoints #9130
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
Conversation
✅ Deploy Preview for determined-ui canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9130 +/- ##
========================================
Coverage 48.98% 48.99%
========================================
Files 1238 1240 +2
Lines 160518 160772 +254
Branches 2783 2784 +1
========================================
+ Hits 78629 78763 +134
- Misses 81714 81834 +120
Partials 175 175
Flags with carried forward coverage won't be shown. Click here to find out more.
|
77eaf89
to
a3d5165
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main comment is about the product question
master/static/migrations/20240409101349_add-arbitrary-metadata-table.tx.up.sql
Outdated
Show resolved
Hide resolved
72c28d4
to
a323e14
Compare
master/static/migrations/20240409101349_add-arbitrary-metadata-table.tx.up.sql
Outdated
Show resolved
Hide resolved
master/static/migrations/20240409101349_add-arbitrary-metadata-table.tx.up.sql
Outdated
Show resolved
Hide resolved
is there a way for someone to delete keys from the metadata or is that out of scope for this? |
@azhou-determined How granular are we wanting to allow a metadata to be deleted? I would be in favor of allowing requests to be made on at a key level + the ability to delete all arbitrary metadata on a given run at once. |
i guess if we're going with the "only set/update, never add/merge" approach, we don't really need to surface a way to delete. as you mentioned, |
92f7cde
to
05f3fbc
Compare
8e16475
to
5b2bad3
Compare
5b2bad3
to
a447850
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python side lgtm
2ad69b4
to
08a9ed5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
I think my only concern is the code duplication and the future of this. I would talk with @AmanuelAaron and see if we can design something that works for both cases?
) | ||
|
||
// FlattenMetadata flattens a nested map of run metadata into a list of RunMetadataIndex entries. | ||
func FlattenMetadata( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AmanuelAaron just landed a PR that boils down to wanting to index hyperparameters
Is there a way we could only have one way of flattening / indexing JSONB in our code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be down to make this more general & push it into a util file that can be shared!
master/internal/run/runs.go
Outdated
} | ||
|
||
// parseMetadataValueType converts a value to a string and returns the type of the value. | ||
func parseMetadataValueType(rawValue any) (value string, valueType string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary metrics does this same kinda thing
switch metricValue := metric.AsInterface().(type) { |
would be cool if we only had one place where we did this, since it is easy to get wrong. I would check to see what happens if you report NaN
in python code if it becomes a float
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great! I'm down to improve the reuse!
master/static/migrations/20240520133440_add-arbitrary-metadata-table.tx.up.sql
Outdated
Show resolved
Hide resolved
…p if run has no metadata instead of error
…-table.tx.up.sql Co-authored-by: Nick Blaskey <[email protected]>
…ore API function to remove redundant "metadata" key
f034c11
to
ca6c095
Compare
Ticket
ET-48
Description
Add support for storing arbitrary metadata associated with a given run. Additionally, this sets the groundwork for filtering runs based on flat_key-value pairs.
Test Plan
Checklist
docs/release-notes/
.See Release Note for details.