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

[WIP] Web UI dataset #617

Open
wants to merge 83 commits into
base: main
Choose a base branch
from
Open

[WIP] Web UI dataset #617

wants to merge 83 commits into from

Conversation

VukW
Copy link
Contributor

@VukW VukW commented Sep 16, 2024

depends on #606
Adds functionality for creating & managing datasets

Dataset submission

  • "add new dataset" button on datasets list
  • "choose benchmark" step
    • PoC (dropdown list)
    • p1 list benchmarks as cards with detailed info (as on "benchmarks list" page), + highlight chosen one
    • p3 allow to choose dataprep mlcube instead
  • "Fill text fields" step
    • DS name
    • description
      • p2 check length beforehand? DS submission would fail if description is > 20 characters ?
    • location
      • p2 check length beforehand?
    • p3 "Submit as prepared" flag
      • needs to be explained somewhere (like, in a tooltip)
      • Q: if checked, is dataset automatically created as operational?
    • p1 check how errors are displayed & handled
  • "Paths" step
    • Q: combine with previous step?
    • data path
    • labels path
    • p2 metadata path (what is it?) (is required if dataset is already prepared)
    • p2 redesign path picking panel
      • folders / files difference
      • one click - chosing folder, double click - go inside?
    • p2 "go back" button / navigation
  • "Verify entered data" step
  • dataset submission
  • p1 check how errors are displayed & handled

Submitted dataset displaying (dataset details page)

  • p2 display paths (data path, labels path)
  • p1 display dataset statistics

Dataset preparation

  • "Prepare" button on dataset detail page
  • Preparation run
  • p1 clean log messages from magic bytes
  • p1 distinguish messages to headers + usual lines in the medperf code
  • p1 display header messages properly
  • p1 display log messages without json
  • p2 log lines highlighting?
  • p1 spinner at text headers to underline process is running
  • p1 check how errors are displayed & handled
  • p1 button "back to the dataset" rename
  • link to the report / display report if it exists
  • p1 check how errors are displayed & handled (display exceptions in the log)

Prepared dataset displaying (dataset details page)

  • p2 if report exists, "Allowed automatic report submission" flag
  • p2 if report exists, link / path to the report
  • p1 if dataset is prepared, unlock next button "set operational" (locked if not prepared)

Set operational

  • p0 "Set operational" button on dataset detail page
  • p0 Set operational
  • p0 Disable button if already operational
  • p1 check how errors are displayed & handled

Associate

  • p1 "Associate with the benchmark" button on the dataset detail page (no choice of benchmarks)
  • p3 choice of benchmarks if dataset was created with dataprep mlcube
  • p1 associate
  • p1 check how errors are displayed & handled

Run benchmark

  • p1 "Run benchmark" button on the dataset detail page
  • p1 running benchmark page with logs
  • ??? runs history??
  • ??? displaying result???
  • p1 check how errors are displayed & handled
  • p2 "Run all" button
  • p2 add "Running" status in addition to "Pending"
  • p1 make all status (Run/Failed/Pending/Done) buttons as separate objects
  • p1 modify default (right-after-load) button to "Waiting for status.."
  • p2 adjust logs panel height if there is no logs

Submit result

  • p1 "Submit result" button on the dataset detail page
  • p1 Submit result
  • p1 check how errors are displayed & handled
  • p2 "Submit all" button

general dataset UI

  • p2 design buttons prepare-operational-... navigation to one line?
  • p1 hide buttons panel if you're not the dataset owner?
  • p3 redesign state displaying (we'd have dev/op floating blocks in the header + set-op button in the footer)

Technical refactoring

  • p1 split routes to different files: dataset/submission.py, dataset/preparation.py

# Conflicts:
#	cli/medperf/web_ui/yaml_fetch/routes.py
@VukW VukW requested a deployment to testing-external-code October 9, 2024 14:15 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 9, 2024 15:42 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 15, 2024 15:47 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 15, 2024 16:29 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 15, 2024 19:12 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 22, 2024 14:52 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 22, 2024 15:37 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code October 24, 2024 13:58 — with GitHub Actions Waiting
# Check if user is already authenticated
if token == security_token:
# User is already authenticated, redirect to original URL
return RedirectResponse(url=redirect_url, status_code=status.HTTP_302_FOUND)

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
redirect_url: str = Form("/"),
):
if token == security_token:
response = RedirectResponse(url=redirect_url, status_code=status.HTTP_302_FOUND)

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
):
if token == security_token:
response = RedirectResponse(url=redirect_url, status_code=status.HTTP_302_FOUND)
response.set_cookie(key=AUTH_COOKIE_NAME, value=token)

Check warning

Code scanning / CodeQL

Failure to use secure cookies Medium

Cookie is added without the Secure and HttpOnly attributes properly set.
):
if token == security_token:
response = RedirectResponse(url=redirect_url, status_code=status.HTTP_302_FOUND)
response.set_cookie(key=AUTH_COOKIE_NAME, value=token)

Check warning

Code scanning / CodeQL

Construction of a cookie using user-supplied input Medium

Cookie is constructed from a
user-supplied input
.
@VukW VukW requested a deployment to testing-external-code October 24, 2024 15:05 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants