Manhdam
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Introduction A pipeline in Ds365ai is essentially a series of workflow steps that are executed in a specific order based on dependencies. These dependencies are formed by establishing a relationship where the output of one step acts as the input for another step within the pipeline. This sequential structure ensures that the steps are executed in a coordinated manner, allowing each step to use the output of the preceding step as its input. To be noted: - A `Pipeline` execution is called as a`workbench` - A `Workflowstep` execution is called as a`job` Thanks to the dependency concept, it can have 2 or more jobs running in parallel when they are not depending in each other. A pipeline must have at least 1 job specified in the config. # Workbench execution diagram in a nutshell ![Screenshot 2024-06-13 at 15.30.02](https://hackmd.io/_uploads/Sk6ECQOBR.png) The above diagram explains how Workbench and its Stages (Jobs) will be executed and the behavior of dependencies in the execution tree: 1. `Job A1` and `Job B1` are executed at the beginning in parallel because they are not depending each other. 2. `Job A2` depends on the output of `job A1`, hence it runs after the `Job A1` completes 3. `Job C1` depends on the output of `Job A2` and `Job C1`, hence it runs after the `Job A2` and `Job B1` complete 4. Both `Job D1` and `Job D2` depend on the output of `Job C1`, hence they run after the `Job C1` completes 5. The output of the workbench gathers 1 or more outputs from `Job A2`, `Job D1`, `Job D2` and `Job B1` # Pipeline Directory Structure To compile a Pipeline, initiate a Resource Request through the Ds365ai Web Application. This process involves fetching code from your specified git target folder source path, validating the config json and saving it to the Tenant's S3 under the `system/` path. Users can visualize this item under `Resources / Pipelines` on the platform's user interface. Ds365ai expects each pipeline to reside in a directory with a specific structure, which looks like this: ``` // from root directory of git repo dockerimages/ workflowsteps/ pipelines/ └── MyPipeline/ ├── pipeline.json └── README.md ``` # Pipeline Confiruation ## Example Config ```json { "name": "my_pipeline", "title": "My Pipeline", "description": "Lorem ipsum", "tags": ["demo", "good data"], "stages": [ { "id": "prepare_data_set", "name": "Prepare Data Set", "workflowstepId": "2208b7fc4ffe4daea938f02618921384" }, { "id": "train_x", "name": "Train X" "workflowstepId": "313133f390824b30ad620ef440b58664", "input": { "training_data": { "fromStage": "prepare_data_set", "outputField": "training_ready_data_set" } } }, { "id": "evaluation_train_model_source", "name": "Evaluate Train Model Source", "workflowstepId": "fe5a7854c42040bfa127ad3b1435e50e", "input": { "model_s3_uri": { "fromStage": "train_x", "outputField": "model_s3_source" } } } ], "output": [ { "name": "trained_model_path", "source": { "fromStage": "train_x", "outputField": "model_s3_source" } }, { "name": "evaluation_result", "source": { "fromStage": "evaluation_train_model_source", "outputField": "result" } } ], "properties": { "Liscense": "MIT", "Repo": "https://git@git.example.com/abc", "DeepLearningFramework": "pytorch==2.0", "CustomKey": "CustomValue" } } ``` ## `.name` (str, required) > NOTE: Matches `^[a-zA-Z][a-zA-Z0-9_]{0,99}$` A string value which tells the pipeline name. Similar to Workflowstep Name, the name of the pipeline should not include spaces and other special characters. ## `.title` (str, required) Different from `.name`, the title is displayed as a default workbench name by default when you click into RUN button on the UI. ## `.description` (str, required) A string value which describe more details of the pipeline ## .tags (array[dict], optional) default to [] Meta tags for workflow step. ## `.input` (arr[dict], optional) An array of json object which each has the same definition as workflowstep `.inputSpec[i]`. The objects in the array are pipeline-level inputs. If presents, the pipeline will become a `Locked Pipeline` where all inputs will need to be properly mapped down into the pipeline's workflowsteps. `Locked pipeline` is used as a technique to hide the complexity of the pipeline usage from the UI users (e.g. Citizen data scientists, other UI users, ...). It hides all input forms of all workflowsteps. The UI user now only experiences a single input form of the pipeline itself and all of those input parameters will be delivered to the workflowsteps accordingly following the configuration within `.stages` ## `.stages` (arr[obj], required) A stage refers to an execution unit of the pipeline. In this case, it is the object having inforamation that targets to a workflowstep. The `.stages[]` tell the instructions of job execution along with their input dependency mapping. Each Stage has the similar format: - `.id` (str, required) Stage id. This field is only used within the configuration in order to support for mapping input parameters between stages. Matching `[a-zA-Z0-9_]+` - `.name` (str, optional) The name of the Job when it is displayed within the Monitor Page OR Workflow Step List Page on the UI. By default, it is the value of the field `.title` in the workflowstep configuration - `.workflowstepId` (str, required) The workflowstep ID for the stage - `.input` (dict, required) Input mapping specification when the running this stage's workflowstep. Each key in the mapping refers to the input variable name of the workflowstep that you can find at `.inputSpec[i].name`. The value for each key follows one of the 2 ways: **SCENARIO:** Map the input from the `Locked Pipeline` to the stage - `.fromPipelineInput`: (str, required) From `.input[i].name` in this configuration **SCENARIO:** Map the output field of the `stage A` to the `stage B`'s input - `.fromStage`: (str, required) From `.stages[i].id` in this configuration - `.outputField`: (str, required) From `.inputSpec[i].name` in the workflowstep configuration of the `stage A` ## `.output` (arr[dict], optional) The output mapping for the pipeline. In DS365AI, `Workflowstep` and `Pipeline` are considered as the same level entity which is called `Executable`. An Executable is an object that is runnable, receiving input(s) and returning output(s) as a single unit function/algorithm. > To be noted, input and output for Workflowstep / Pipeline can be an empty list ([]) if you dont have one. Because the pipeline is only considered as an instruction of running a series of workflowsteps in a particular order, the only way to make the pipeline to have its own output is looking at the stages it has. In light of that, the output of the pipeline comes from the stages outputs. Each item in the output list of the Pipeline has the below structure: - `.name`: (str, required) The name of the output parameter. This also makes sense in coding language, we cannot name a variable to have spaces and special characters. It should follow the conventional variable naming pattern. Matches `[a-zA-Z0-9_]` - `.source`: (dict, required) Source of the Pipeline Output. This is where we define the mapping of output value - `fromStage`: (str, required) From .stages[i].id in this configuration - `outputField`: (str, required) From .inputSpec[i].name in the workflowstep configuration of the stage A ## .properties (dict, optional) This field is usually used for extra meta information for the Pipeline e.g. ```json // workflowstep.json { ..., "properties": { "whatsNews": "abc...", "liscense": "MIT", "modinVersion": "0.23.1", "rayVersion": "0.24.1" } } ``` ## example of `Locked Pipeline` The `Locked Pipeline` when being displayed on the UI will hide all input forms of the workflowsteps. It only displays the input form of the Pipeline level itself. > Note: The configuration in this case will be strictly validated and requires all stages to have enough required inputs before the Pipeline can be created into DS365AI. Otherwise, detailed error message will be displayed before the Resource Request can be submitted ```json { "name": "my_pipeline", "title": "My Pipeline", "description": "Lorem ipsum", "input": [ { "name": "preprocessing_data_set", "label": "Training Data Set", "class": "s3any", "required": true, "help": "Lorem ipsum", }, { "name": "preprocessing_data_set", "label": "Preprocessing Data set", "class": "s3any", "required": true, "help": "Lorem ipsum" }, { "name": "is_parallel", "class": "boolean", "required": false, "default": false, "help": "Whether data_set is loaded and processed in parallel or not" } ], "stages": [ { "id": "prepare_data_set", "name": "Prepare Data Set", "workflowstepId": "2208b7fc4ffe4daea938f02618921384" "input": { "data_set": { "fromPipelineInput": "preprocessing_data_set" }, "parallel_hanlding": { "fromPipelineInput": "is_parallel" } } }, { "id": "train_x", "name": "Train X" "workflowstepId": "313133f390824b30ad620ef440b58664", "input": { "training_data": { "fromStage": "prepare_data_set", "outputField": "training_ready_data_set" } } }, { "id": "evaluation_train_model_source", "name": "Evaluate Train Model Source", "workflowstepId": "fe5a7854c42040bfa127ad3b1435e50e", "input": { "model_s3_uri": { "fromStage": "train_x", "outputField": "model_s3_source" } } } ], "output": [ { "name": "trained_model_path", "source": { "fromStage": "train_x", "outputField": "model_s3_source" } }, { "name": "evaluation_result", "source": { "fromStage": "evaluation_train_model_source", "outputField": "result" } } ], } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully