Liquid-算法应用流程管理工具
介绍
- liquid是一个pipeline工具,主要功能提供算法应用快捷组织功能,主要技术使用基于pluggy的hook技术。
安装
liquid采用Python开发,得益于Python良好的社区环境,安装支持Pythonic风格的各种管理器。
$ pip install liquid-0.1-xxxxxxxxxxxx.whl
快速指南
python-sdk使用
- liquid提供python-sdk的使用方式,以下是liquid主程脚本示例:
from liquid.node import Node
from liquid.pipeline import Pipeline
from liquid.io import DataCatalog
from liquid.hook import HookManager
from liquid.runner import SequentialRunner
### 开始liquid测试
### 设置函数节点对象
def first_func(a,b):
c = a + b
return c
def second_func(c,d):
e = c * d
return e
def third_func(e):
f = e + 1
return f
first_node = Node(func=first_func,inputs=['a','b'],outputs='c',name='firstfunc')
second_node = Node(func=second_func,inputs=['c','d'],outputs='e',name='secondfunc')
third_node = Node(func=third_func,inputs=['e'],outputs=['f'],name='thirdfunc')
### 创建一个pipeline
test_pipeline = Pipeline(nodes=[first_node,second_node,third_node])
### catalog加载初始参数
test_cache_data = DataCatalog()
test_cache_data.save(data_name='a',data_obj=5)
test_cache_data.save(data_name='b',data_obj=6)
test_cache_data.save(data_name='d',data_obj=7)
### hook_manager加载已挂载的前后处理功能函数
hook_manager = HookManager()
sequential_runner = SequentialRunner(pipeline=test_pipeline,catalog=test_cache_data,hook_manager=hook_manager)
# print(sequential_runner.pipeline,sequential_runner.catalog,sequential_runner.hook_manager)
print('--------------------------------------------------------------------------------------------------------------')
sequential_runner.execute(is_release=False)
print(test_cache_data.load(data_name='f'))
print(test_cache_data.cache_data)
### 测试过程(5+6)*7+1=78
设计
- 基于pluggy的hook技术实现灵活扩展性
- 设计关键概念,Node,Pipeline,Runner
- 函数节点化-Node
- 开放挂载点-Pipeline
- 扩展运行方式(顺序运行和并行运行)-Runner
技术列表
- property动态属性
- 基于pluggy的hook
- call
- add
- cache_dict
设计UML图
以下是设计的UML图:
Metadata
Release files for shihua-liquid 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shihua-liquid-0.1.tar.gz | 10.1 kB | Without provenance | Details for shihua-liquid-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shihua_liquid-0.1-py3-none-any.whl | Python 3 | none | any | Details for shihua_liquid-0.1-py3-none-any.whl |
Total release size: 22.9 kB
Release files / shihua-liquid-0.1.tar.gz
| Download URL | shihua-liquid-0.1.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ec5f50ca01b4c1f93adff183f2a20cbe3e12d35e4fe0028dc1cf6edbe2b84f
|
|
BLAKE2b-256 checksum How to use checksums |
0e227e8eef11022cb0a5fcae36204d9a89ee042f09e8b2304a8c9e7866575aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / shihua_liquid-0.1-py3-none-any.whl
| Download URL | shihua_liquid-0.1-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e067cd2f7e7755e31edb0fefd5f0d1a04e1f80732e431829a2a50a156b2bf2c
|
|
BLAKE2b-256 checksum How to use checksums |
e63e7300ab99a2278d8c8dc15764c66726d3f230b0c64a8ee792c167531f5b5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for shihua-liquid 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.