determined icon indicating copy to clipboard operation
determined copied to clipboard

feat: add arbitrary metadata GET/POST endpoints

Open corban-beaird opened this issue 10 months ago • 5 comments

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

  • Automated integration testing for API
  • Automated unit testing

Checklist

  • [ ] Changes have been manually QA'd
  • [ ] User-facing API changes need the "User-facing API Change" label.
  • [ ] Release notes should be added as a separate file under docs/release-notes/. See Release Note for details.
  • [ ] Licenses should be included for new code which was copied and/or modified from any external code.

corban-beaird avatar Apr 09 '24 04:04 corban-beaird

Deploy Preview for determined-ui canceled.

Name Link
Latest commit 2367ef8027e390d5280dbd13bc7d9c5468cec90b
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/666b1727e0c43a00087055c8

netlify[bot] avatar Apr 09 '24 04:04 netlify[bot]

Codecov Report

Attention: Patch coverage is 54.29688% with 117 lines in your changes missing coverage. Please review.

Project coverage is 48.99%. Comparing base (e3d01c1) to head (2367ef8). Report is 5 commits behind head on main.

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            
Flag Coverage Δ
backend 43.91% <62.79%> (+0.05%) :arrow_up:
harness 63.80% <36.90%> (-0.06%) :arrow_down:
web 44.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
master/internal/api_experiment.go 56.79% <100.00%> (+0.02%) :arrow_up:
master/internal/db/postgres_trial.go 62.61% <100.00%> (ø)
master/pkg/model/experiment.go 14.63% <100.00%> (+0.34%) :arrow_up:
master/internal/api_runs.go 63.19% <82.75%> (+0.89%) :arrow_up:
harness/determined/core/_train.py 39.83% <33.33%> (-1.08%) :arrow_down:
master/internal/run/runs.go 87.09% <87.09%> (ø)
harness/determined/common/api/bindings.py 40.21% <37.33%> (-0.02%) :arrow_down:
master/internal/db/postgres_runs.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

codecov[bot] avatar Apr 09 '24 15:04 codecov[bot]

is there a way for someone to delete keys from the metadata or is that out of scope for this?

azhou-determined avatar May 02 '24 22:05 azhou-determined

is there a way for someone to delete keys from the metadata or is that out of scope for this?

@azhou-determined Not currently, I do believe it's out of scope for this PR, but I don't see a reason why we shouldn't add it to the backlog of items to knock out with this project.

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.

corban-beaird avatar May 02 '24 22:05 corban-beaird

is there a way for someone to delete keys from the metadata or is that out of scope for this?

@azhou-determined Not currently, I do believe it's out of scope for this PR, but I don't see a reason why we shouldn't add it to the backlog of items to knock out with this project.

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, set_metadata(metadata=None) seems logical to me. i think we should have remove if we go with add though.

azhou-determined avatar May 03 '24 19:05 azhou-determined