Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Save to My Template from pai jobs feature #212

Open
4 tasks done
debuggy opened this issue Feb 3, 2021 · 0 comments
Open
4 tasks done

Save to My Template from pai jobs feature #212

debuggy opened this issue Feb 3, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@debuggy
Copy link
Contributor

debuggy commented Feb 3, 2021

Introduction

Implement a feature to enable user that could save a template directly from pai jobs (from submit page or job detail page). And user could use this template later from marketplace or directly select from submit page.

Issues / Motivations

Basic

  1. Provide a way for user to save pai jobs directly to marketplace
  2. Provide a view for user to check and edit the saved templates
  3. Provide a easy access for user to use the saved templates directly

More details

  • what is the difference from job config file and saved job template?
  • what if the saved job template has bugs?
  • what info should user add when saving template?
  • how to edit saved template?

Proposals / Solutions

Data Schema

  • Marketplace Item will have a reserved tag of saved from pai, which differs from creating directly.
    Add a new property source of marketplace item.

API

  • Marketplace
    Post /items: add tag saved from pai add source: saved from pai.
    Get /items: list items filtered by author and tag sourcesaved from pai

UI View

  • PAI submit page

    • Add save to my templates button
      Will pop up a simple text field for user to fill name(required), summary(optional) and description(optional)
      Will send Post /items request, with author and tag saved from pai
    • Add selection dropdown
      Will send Get /items request, filtered by author and tag saved from pai, list the results
      When selected, the item protocol will replace the current content of the page
  • Marketplace List page

    • Add a My templates - saved from OpenPAI filter in market list. When clicking, send Get /items request, filtered by author and tag saved from pai, and list the results.
    • Provide funtion button to delete, use and edit items.
    • View protocol from detail

Deployment

  • Add a switch config in service-configuration.yml, default is enabled
  • Will only open in int bed for test in this release

Work Plan

  1. Add save to my templates button in submit page
  2. Add selection dropdown in submit page
  3. Add a My templates - saved from OpenPAI filter in market list.

Demo

Test cases

  • Deployment without save_template feature:
    1. Stop marketplace-db, marketplace-restserver, marketplace-webportal, webportal, pylon service in paictl.
    2. Set cluster.common.marketplace: "false" and update config (push to cluster)
    3. Start marketplace-db, marketplace-restserver, marketplace-webportal, webportal, pylon service in paictl.
    4. In OpenPAI submission page, the template selection drop down will be hidden.
    5. In OpenPAI submission page, the save to template button will be hidden.

  • Deployment with save_template feature:
    1. Stop marketplace-db, marketplace-restserver, marketplace-webportal, webportal, pylon service in paictl.
    2. Set cluster.common.marketplace: "true" and webportal.save_template: true
    3. update config (push to cluster)
    4. Start marketplace-db, marketplace-restserver, marketplace-webportal, webportal, pylon service in paictl.
    5. In OpenPAI submission page, the template selection drop down will show.
    6. In OpenPAI submission page, the save to template button will show.

  • Test save template button:
    In submission page, fill a correct protocol and click save to template. Then check marketplace get /items api to see if the template is successfully saved.

  • Test template selection button:
    In submission page, select a template from dropdown to see if this template could be successfully submitted.

@debuggy debuggy added the enhancement New feature or request label Feb 3, 2021
@debuggy debuggy mentioned this issue Feb 3, 2021
40 tasks
@qfyin qfyin added this to the 2021Feb milestone Feb 9, 2021
@debuggy debuggy self-assigned this Mar 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants