Developer Tools
The main developer tool for pipelogic is called ppl
. ppl
is a command-line tool for creating pipelogic application and deploying them on streaming platform. These applications are built as containerized building blocks, ensuring consistency and portability throughout the development and deployment processes.
PPL
tool only requires basic bash knowledge. It is a powerful tool that enables users to develop and manage solutions with few command lines.
Contents
- Installation
- Check PPL Version
- Upgrade PPL
- Login
- List Workspaces
- Switch Workspaces
- Initialize Component
- Fetch Component
- Compile Component
- Test Components
- Release Component
- Generate Type Definitions
- Upload Files
- Upload Models
- Rename Files
- Add Readme
- Set Default Parameters for Model
- Inspect Existing Types
- Create New Types
Installation
export PPL_TOKEN="..."
curl "https://app.pipelogic.ai/api/v1/cli/$(uname -s | tr '[:upper:]' '[:lower:]')_$(arch)/$PPL_TOKEN" -o /home/$USER/bin/ppl
chmod +x /home/$USER/bin/ppl
Check PPL Version
Check Tool version
ppl version
Prompt
ppl v2.1.3
Upgrade PPL
ppl upgrade
Login
ppl login
E-Mail: orangecat@catperson.com
Password:
List Workspaces
List available workspaces
ppl workspace list
"*" Demonstrates the current workspace.
Prompt
┌───┬──────────────────────────────────────┬─────────────────────┬──────────────────────────────────────┬──────────────────────────────────────┐
│ │ ID │ NAME │ CREATED AT │ UPDATED AT │
├───┼──────────────────────────────────────┼─────────────────────┼──────────────────────────────────────┼──────────────────────────────────────┤
│ * │ s4da6e27-49f4-99ed-9b31-0242k91l1019 │ User workspace │ 2024-10-12 06:11:30.696971 +0000 UTC │ 2024-10-12 16:11:30.696971 +0000 UTC │
│ │ 113ab75d-6ekk-11ee-a0b8-0132kc143006 │ Company workspace │ 2024-10-19 20:08:52.935997 +0000 UTC │ 2024-10-19 10:08:52.935997 +0000 UTC │
└───┴──────────────────────────────────────┴─────────────────────┴──────────────────────────────────────┴──────────────────────────────────────┘
Switch Workspaces
ppl workspace switch
Prompt
Please choose the index of the workspace you want to use.
1. User workspace
2. Company workspace
Select workspace [1-2]:
Initialize Component
Component initialization will create required folder structure and files.
ppl code init -t
You will be prompted to create a new component and initialize it with boilerplate project
No component provided, use --component flag to indicate an existing component.
Do you want to create and initialize a new component? (Y/n): y
Initialized successfully a new git repository.
Please select an identifier for the component.
Identifier: Testing
Display Name [Testing]:
No ReadMe provided. An editor will be opened to create the ReadMe. Please provide a description of the component in Markdown syntax. Press enter to confirm.
Successfully created component!
┌───┬───────────────────┬────────┬──────────┬────────────────────────────────┐
│ # │ NAME │ SIZE │ LANGUAGE │ TAGS │
├───┼───────────────────┼────────┼──────────┼────────────────────────────────┤
│ 1 │ Crop Image Python │ 1.2 kB │ py │ one-to-one, image-manipulation │
│ 2 │ Dot Product │ 3.6 kB │ py │ many-to-many │
│ 3 │ Crop Image │ 6.7 kB │ cpp │ one-to-one, image-manipulation │
│ 4 │ Double Value │ 585 B │ py │ default, one-to-one │
│ 5 │ Dot Product │ 5.5 kB │ cpp │ many-to-many │
│ 6 │ Double Value │ 1.8 kB │ cpp │ default, one-to-one │
└───┴───────────────────┴────────┴──────────┴────────────────────────────────┘
This operation will delete current configuration, tests or sources you might have right now.
Select a Component from list to finish your initialization
Select template [1-6]: 2
Component codebase has been initialized succesfully.
Fetch Component
The component is needed to be initalized and .pipecomponent
needs to be present.
ppl code fetch
Displays all available versions of the component in the server
┌───┬──────────────────────────────────────┬────────────────┬──────┬──────────────────────────────────────┐
│ # │ ID │ AUTHOR │ TAGS │ CREATED AT │
├───┼──────────────────────────────────────┼────────────────┼──────┼──────────────────────────────────────┤
│ 1 │ 54a136d3-bf91-401f-11ec-f3142436774d │ Orange Cat │ │ 2024-03-21 17:43:57.852828 +0000 UTC │
│ 2 │ 11a336d3-9991-111f-11ec-f3111436774d │ Orange Cat │ │ 2024-03-21 18:43:57.852828 +0000 UTC │
└───┴──────────────────────────────────────┴────────────────┴──────┴──────────────────────────────────────┘
This operation will delete current configuration, tests or sources you might have right now.
Select release [1-2]:
Compile Component
ppl code compile
Prompt
Build log: Successfully tagged registry.pipelogic.ai/pipelogic/dot_product:1714344292
Code has been compiled successfully.
Test Components
This works only if the component has tests defined in its folder.
Code Test
ppl code test
Prompt
Test log: Test 0: Success
Test log: Test 1: Success
Code test has run successfully.
Release Component
ppl code release
Prompt
There are uncommitted changes in the repository.
Do you wish to continue? (y/N): y
No version notes provided. An editor will be opened to create them. Please provide a description of the component version using Markdown syntax. Press enter to confirm.
Code has been released succesfully.
Generate Type Definitions
Each component with named types needs to have type definition file. This file is used for converting incoming type into programming variables.
Generate Type definitions automatically based on config.yml
ppl code gentypes
Detects types present and saves them as pipetypes
The currently used types are:
1. Image.RGBA
2. BoundingBox
3. Point
4. DetectedClass
5. Image
6. Image.BGR
7. Image.BGRA
8. Image.GRAY
9. Image.RGB
10. Rectangle
Do you want to use some other types? (y/N):
Upload files
There are two file categories currently accepted on the Pipelogic platform: video, model. These categories exists to enable their specific use case.
To upload files to pipelogic storage:
Uploading Files
ppl file upload_video video.mp4
Prompt
Name: example file
No ReadMe provided. An editor will be opened to create the ReadMe. Please provide a description of the file in Markdown syntax. Press enter to confirm.
File has been uploaded successfully.
Upload Models
Pipelogic depends on triton server for inference. In order to upload a model to the platform to be readily used in a component, it's necessary to configure it to onnx
format.
Refer export models and then make sure it fits into expected model file structure described in features.
Upload Model
ppl file upload_model example-model/
Prompt
Name: example-model
No ReadMe provided. An editor will be opened to create the ReadMe. Please provide a description of the file in Markdown syntax. Press enter to confirm.
File has been uploaded successfully.
Uploaded models should follow Triton Inference Server file structure.
Rename Files
Rename Files
ppl file update file_id --name new_name
Add Readme
Appends a readme to file, when the file is downloaded the appended readme file will be downloaded as well.
Append Readme
ppl file update file_id --readme readme.md
Set Default Parameters for Model
Selected configuration file will added to model. When a model is selected inside a component, it will fill up all the configuration fields if a component is added to it.
Add Configuration File
ppl file update file_id --config configuration_file.yml
It also makes sure the model and component has the matching configuration fields, if they don`t the model will be greyed out and cannot be selected.
Inspect Existing Types
Inspect Type Definition
ppl type get type_name
Inspect BoundingBox Type
ppl type get BoundingBox
Prompt
BoundingBox := {class:DetectedClass,rectangle:Rectangle<Double>}
Create New Types
Create a type definition and save it as a text file rboundingbox
RBoundingBox := {class:DetectedClass,rectangle:Rectangle<Double>, angle:Double}
Add it to Local Fork
ppl type add rboundingbox
Push it to Pipelogic Server
ppl type push rboundingbox