-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(frontend) Support Input/Output from MLMD for V2-compatible. Fix #5670 #5859
Conversation
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.
Leaving some nit comments after a detailed review~
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.
/lgtm
I think looks great! I looked forward to seeing proper input/outputs tab for v2 compatible mode for a while! It'll be a great productivity improvement too.
frontend/src/lib/MlmdUtils.ts
Outdated
const artifactMap = artifactsRes.getArtifactsList().reduce((map, artifact) => { | ||
map[artifact.getId()] = artifact; | ||
return map; | ||
}, {}); |
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.
nit for discussion: I personally prefer avoiding reduce, because it's not very intuitive, also it doesn't really improve readability much (compared to loops).
Other styles like using Object.entries()
and Object.fromEntries()
might make the code easier to read too.
But anyway, you can decide on this. Just saying some opinions.
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 think both approaches have similar effect/scalability, and I will gladly change to Object.entries() approach for readability.
FYI, built test image is gcr.io/ml-pipeline-test/2c5ad35de81b5f94bfc67cff0e3951de7f831d64/frontend:latest. |
This is very detailed and clear comment about the UX discussion! Thank you @Bobgy for writing it!
I agree with hiding the I/O param/artifact section when there is none. And showing a banner if nothing exists also makes sense. Note that loading artifacts has network delay because UI needs to query events and artifacts in async call, so
I think separator is useful because input/output is closely located on UI, which is hard to distinguish them. But I agree that we should discuss more before introducing a new UX style. I am going to keep the current UI consistent with before, and we can come up with ideas on how to better render dense information on a side panel. See screenshot:
Totally agree with this comment, I will make the titles consistent with before. |
I think you raised a good point. It would feel weird to find sth like a loading indicator and then it disappears after getting the response. The best loading experience demo I have seen for loading multiple things at the same time is react suspense for data (it was demoed years ago, but still not released as stable. You might find the demo interesting https://youtu.be/nLF0n9SACd4 https://reactjs.org/docs/concurrent-mode-suspense.html Because MLMD requests are usually fast, the easiest fix now is to wait for all requests to finish, before showing anything. And one corner case is looking at running workflow, ideally when the running node refreshes automatically, we can show stale data while fetching new data. You can decide on the tradeoff, I suggest starting with sth simple with reasonable UX.
I felt that with the fix in comment 3, I will be able to easily distinguish them. One easy way to improve on the separator design is to follow a pattern of an existing usage of separator (height, color, margin). It will be a lighter grey color and do not stand out so much. |
/lgtm /hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Bobgy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Discussed offline, we need to wait for
I prefer to use separator which is different from table row separator, otherwise I am introducing separators with similar styles but different meanings. To avoid further confusion, I will not add separator at the moment. We can discuss more if users hope to see Input/Output differently. |
/unhold Thank you Yuan for your detailed review! |
Description of your changes:
Fix #5670
Features:
input:key
,output:key
Sample screenshots:
Checklist: