determined
determined copied to clipboard
feat: add task allocation card and modal
Description
Ticket: WEB-1659
This PR adds the allocation card and modal to the single trial experiments and trial detail pages.
After a few test runs and some investigation with the help from @corban-beaird and @keita-determined, we discovered that there are more than a few cases where we won't be able to display the card and modal for the task allocation due to insufficient/missing data from the API's. The main reason is that it can be a legacy allocation/task that was created prior to the transition to how we store & access accelerator info today.
It's also possible for this to happen if they've been created, but the request to set the accelerator data for an allocation hasn't been sent yet (this is likely less of an issue after the experiment/trial has completed).
So, perhaps, it will be necessary to add a disclaimer/release message while posting this feature.
Test Plan
Regression check
- make sure that there's a trial/experiment running
- Go to the resource pool page
- select the active pool
- there should be a
Topology
section visible - all active nodes should have a visual representation
- Refer back to the #8276 for more details
Checking the new functionality
- go to a workspace (or the uncategorized group table)
- pick a single trial experiment or a trial detail page
- if there are enough data from the trial/experiment, there should be a card for the resource allocation (API wise, sometimes, we're not getting all the necessary information to render the full visualization of the allocation modal)
- if the number of slots used is equal to the number of slots set in the config (
slots_per_trial
), it will render as<number_of_slots> Slot(s, depending if it is higher than 1)
, otherwise, it will render as<n>/<n> Slot(s, depending if it is higher than 1)
- you can click in the card, which will open the allocation modal
- if the task/experiment is still running, the
NodeElement
should be rendered with blue accents, it will render with regular text color otherwise - in the modal, it should render as many nodes as the experiment used, with the correspondent slots with the appropriate accents, showing how many slots were used in each node
- if the experiment/trial are still running, in case the number of slots used is lower than the actual number of active slots, the "extra" active slots should have a different opacity.
Commentary (optional)
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.
Ticket
Deploy Preview for determined-ui ready!
Name | Link |
---|---|
Latest commit | fd74f37cef5b7bec22dc25cf46c076d672ba45d5 |
Latest deploy log | https://app.netlify.com/sites/determined-ui/deploys/65e760112fac4400083d46a1 |
Deploy Preview | https://deploy-preview-8814--determined-ui.netlify.app/ |
Preview on mobile | Toggle 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 Report
Attention: Patch coverage is 26.15385%
with 288 lines
in your changes are missing coverage. Please review.
Project coverage is 42.36%. Comparing base (
fa856ab
) to head (fd74f37
). Report is 9 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8814 +/- ##
==========================================
- Coverage 47.22% 42.36% -4.86%
==========================================
Files 1162 844 -318
Lines 175910 136897 -39013
Branches 2235 2235
==========================================
- Hits 83066 58003 -25063
+ Misses 92686 78736 -13950
Partials 158 158
Flag | Coverage Δ | |
---|---|---|
harness | ? |
|
web | 42.49% <26.15%> (-0.05%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
webui/react/src/ioTypes.ts | 90.90% <100.00%> (+0.08%) |
:arrow_up: |
webui/react/src/services/apiConfig.ts | 72.99% <100.00%> (+0.14%) |
:arrow_up: |
webui/react/src/types.ts | 100.00% <100.00%> (ø) |
|
webui/react/src/pages/ResourcePool/Topology.tsx | 0.00% <0.00%> (ø) |
|
webui/react/src/services/decoder.ts | 23.05% <0.00%> (-0.11%) |
:arrow_down: |
webui/react/src/services/api.ts | 0.00% <0.00%> (ø) |
|
webui/react/src/pages/ResourcePool/NodeElement.tsx | 22.89% <22.89%> (ø) |
|
...i/react/src/components/ResourceAllocationModal.tsx | 28.78% <28.78%> (ø) |
|
...ebui/react/src/pages/TrialDetails/TrialInfoBox.tsx | 22.06% <12.03%> (-9.61%) |
:arrow_down: |
i dont see the slot card during queued status
could you please request review when everything is addressed? thanks
Queued won't show because there's no agent/node, slots and task allocation information being returned yet
Queued won't show because there's no agent/node, slots and task allocation information being returned yet
i used to see it in the prev commits, so it was a bug?
the node color isnt blue even though its in running state
this is not fixed. still aligned left https://github.com/determined-ai/determined/pull/8814#discussion_r1508139444
The nodes has to be left-aligned, as it shows in the design mockup 😅
qq: slot ids are empty. is it expected? tested on gcloud.