Manage and create Clarifai workflows with yaml files
Project description
yaml2workflow
Clarifai workflows are powerful tools. Building them via the API is a sure way to automate this process, especially if you have many nodes and brances.
Taking inspiration from Kubernetes Helm Charts and AWS Cloud Formation templates, yaml2workflow
is designed to make automating the creating and managing the definition of workflows easier and more transparent.
🙌 Define Workflows as YAML files
Much clearer and more human-readable definitions without distractors. Also, by storing the workflow definitions as a file, you can now use version control for your future automations! Winning.
workflow:
id: test-wf-1
nodes:
- id: detector
model:
model_id: face-detection
model_version_id: 45fb9a671625463fa646c3523a3087d5
🚀 Installation
Simply enter
pip install yaml2workflow
💪 Usage
- Create a YAML file to define your workflow. Gather the model IDs and model version IDs from Clarifai. See example.yml for a full, filled in template.
- Import the library and use it directly in your code as follows:
workflows = parser('example.yml')
post_workflows_response = stub.PostWorkflows(
service_pb2.PostWorkflowsRequest(
user_app_id=userDataObject,
workflows=workflows
),
metadata=metadata
)
See example.py for the full example.
🎉 Done! You've now unlocked more human-readble and more maintable workflows.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for yaml2workflow-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d50dc1730d47375920e75416d6b94f5b0e744ad3c791a887742c12f6a5c54a82 |
|
MD5 | 4b8f10f623d47804ab6961523f993ab5 |
|
BLAKE2b-256 | 13d7e7f8d6c8272339ca81cffb35d32708a21d0efda64388b59c08ed7b9b657f |