determined-ai / determined

Determined is an open-source machine learning platform that simplifies distributed training, hyperparameter tuning, experiment tracking, and resource management. Works with PyTorch and TensorFlow.
https://determined.ai
Apache License 2.0
2.93k stars 347 forks source link

feat: pause unpause UX #9615

Closed keita-determined closed 1 week ago

keita-determined commented 1 week ago

Ticket

ET-293

Description

Support pause/unpause in flat run table

In context menu, if you run is part of a search it should be disabled. In bulk actions dropdown, we send request unmodified, and we need to interpret error where trial is part of a multi trial and raise it as part of a toast.

from ET-293

Test Plan

Checklist

netlify[bot] commented 1 week ago

Deploy Preview for determined-ui ready!

Name Link
Latest commit 655c7f4bd842f5e3d600ca08f156883e6c435e59
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/668d93f3715a2d0008a2d71f
Deploy Preview https://deploy-preview-9615--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.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.03540% with 9 lines in your changes missing coverage. Please review.

Project coverage is 48.24%. Comparing base (547a4c4) to head (655c7f4). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9615 +/- ## ========================================== - Coverage 52.88% 48.24% -4.64% ========================================== Files 1255 932 -323 Lines 153087 124035 -29052 Branches 3230 3239 +9 ========================================== - Hits 80961 59843 -21118 + Misses 71975 64041 -7934 Partials 151 151 ``` | [Flag](https://app.codecov.io/gh/determined-ai/determined/pull/9615/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Δ | | |---|---|---| | [harness](https://app.codecov.io/gh/determined-ai/determined/pull/9615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `?` | | | [web](https://app.codecov.io/gh/determined-ai/determined/pull/9615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `51.36% <92.03%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/determined-ai/determined/pull/9615?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Δ | | |---|---|---| | [webui/react/src/services/api.ts](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Fservices%2Fapi.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3NlcnZpY2VzL2FwaS50cw==) | `97.69% <100.00%> (+0.02%)` | :arrow_up: | | [webui/react/src/services/apiConfig.ts](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Fservices%2FapiConfig.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3NlcnZpY2VzL2FwaUNvbmZpZy50cw==) | `74.15% <100.00%> (+0.24%)` | :arrow_up: | | [webui/react/src/types.ts](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Ftypes.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3R5cGVzLnRz) | `99.68% <100.00%> (+<0.01%)` | :arrow_up: | | [webui/react/src/utils/flatRun.ts](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Futils%2FflatRun.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3V0aWxzL2ZsYXRSdW4udHM=) | `98.68% <100.00%> (+0.17%)` | :arrow_up: | | [webui/react/src/components/RunActionDropdown.tsx](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Fcomponents%2FRunActionDropdown.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL2NvbXBvbmVudHMvUnVuQWN0aW9uRHJvcGRvd24udHN4) | `95.59% <97.61%> (+0.91%)` | :arrow_up: | | [...i/react/src/pages/FlatRuns/FlatRunActionButton.tsx](https://app.codecov.io/gh/determined-ai/determined/pull/9615?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Fpages%2FFlatRuns%2FFlatRunActionButton.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3BhZ2VzL0ZsYXRSdW5zL0ZsYXRSdW5BY3Rpb25CdXR0b24udHN4) | `73.23% <68.00%> (+1.31%)` | :arrow_up: | ... and [325 files with indirect coverage changes](https://app.codecov.io/gh/determined-ai/determined/pull/9615/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai)
keita-determined commented 1 week ago

functionality looks good!

one minor issue is that the toasts for bulk actions say "1 runs" instead of "1 run" -- not introduced by this PR but should be a quick fix to use the pluralizer util in submitBatchAction in TableActionBar and FlatRunActionButton

also think patch coverage will probably hit 80% by adding assertions that mocked pauseRuns and resumeRuns are called (see killRuns test case example).

fixed