Skip to content
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

chore: remove deprecated labels config option #9609

Merged
merged 14 commits into from
Jul 10, 2024

Conversation

kkunapuli
Copy link
Contributor

@kkunapuli kkunapuli commented Jul 5, 2024

Ticket

RM-343

Description

Label was deprecated and removed from agent configuration over a year ago. Reduce confusion by removing references from the code and docs.

If label is still present in an agent config, the following error message will be logged:

fatal error running Determined agent          error="cannot unmarshal configuration: error unmarshaling JSON: while decoding JSON: json: unknown field \"label\""

Test Plan

None needed.

Checklist

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

@cla-bot cla-bot bot added the cla-signed label Jul 5, 2024
Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 4129d21
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/668da70854491900087cd7b9
😎 Deploy Preview https://deploy-preview-9609--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.88%. Comparing base (262ad5a) to head (4129d21).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9609   +/-   ##
=======================================
  Coverage   52.88%   52.88%           
=======================================
  Files        1255     1255           
  Lines      153086   153084    -2     
  Branches     3230     3230           
=======================================
  Hits        80964    80964           
+ Misses      71971    71969    -2     
  Partials      151      151           
Flag Coverage Δ
backend 44.00% <ø> (+<0.01%) ⬆️
harness 72.76% <ø> (ø)
web 51.30% <ø> (ø)

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

Files Coverage Δ
agent/cmd/determined-agent/init.go 100.00% <ø> (ø)
agent/internal/options/options.go 29.09% <ø> (ø)
master/pkg/model/experiment_config.go 39.24% <ø> (ø)

... and 1 file with indirect coverage changes

@kkunapuli kkunapuli marked this pull request as ready for review July 5, 2024 15:36
@kkunapuli kkunapuli requested a review from a team as a code owner July 5, 2024 15:36
@kkunapuli kkunapuli marked this pull request as draft July 8, 2024 14:43
@determined-ci determined-ci requested a review from a team July 8, 2024 17:03
@determined-ci determined-ci added the documentation Improvements or additions to documentation label Jul 8, 2024
@kkunapuli kkunapuli force-pushed the kunapuli/delete-deprecated-labels-agent-config branch from b6578a6 to 22cfc6a Compare July 8, 2024 19:38
@kkunapuli kkunapuli marked this pull request as ready for review July 8, 2024 20:42
@kkunapuli kkunapuli requested a review from a team as a code owner July 8, 2024 20:42
Copy link
Contributor

@corban-beaird corban-beaird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid!


- Cluster: ``resources.agent_label`` task option and agent config ``label`` option have been
removed. Beginning with 0.20.0 release, these options have been ignored. Please remove any
remaining references from configuration files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add "Use resource_pool feature instead"?

@@ -312,7 +312,10 @@ def main(det_callback, tb_callback, model_args, data_args, training_args):
id2label[str(i)] = label

# Load the accuracy metric from the datasets package
metric = datasets.load_metric("accuracy", trust_remote_code=True,)
metric = datasets.load_metric(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's an odd random reformat. maybe removing the last comma would've been okay as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can undo this; it came from auto-formatting.

@@ -49,7 +49,7 @@ message Agent {
// A map of container id to all containers assigned to this agent.
map<string, determined.container.v1.Container> containers = 4;
// This field has been deprecated and will be empty.
string label = 5;
string label = 5 [deprecated = true];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we simply remove this and other protobuf field, instead of making them deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do, make -C proto check fails.

for example,

buf lint
buf breaking --against buf.image.bin
src/determined/api/v1/agent.proto:12:1:Previously present field "5" with name "label" on message "GetAgentsRequest" was deleted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's make gen-buf-image in there which'll force-regenerate the buf image. this is a protective measure against breaking an API accidentally but here we break it explicitly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@MikhailKardash MikhailKardash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harness changes look fine. +1 to @ioga's comment to mention resource_pool in the release note. Otherwise LGTM.

@determined-ci determined-ci requested a review from a team July 9, 2024 20:53
@kkunapuli kkunapuli merged commit 55b6d25 into main Jul 10, 2024
83 of 96 checks passed
@kkunapuli kkunapuli deleted the kunapuli/delete-deprecated-labels-agent-config branch July 10, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants