Vines Python 训练项目 SDK (供内部使用)
这个项目希望解决的问题,将开发一个新的训练项目中的很多重复性工作进行统一封装:
- 每次开一个新训练项目都需要起 HTTP Server
- 里面有可能会用到很多通用能力,比如上传、下载文件、以及一些基础方法等,这些都应该封装好。
- 错误日志推送逻辑
- 运行时日志逻辑
- api 入参、出参统一格式封装
- 统一的日志格式、日志收集
安装
pip install vines-infer-sdk
使用示例
作为 conductor 客户端
详情见 exampels/example_conductor.py 文件中的内容。
使用 flask http server
从 lib.server 引入 create_server 方法,初始化 flask app,参数:
- sentry_dsn: sentry dsn, 如果配置,会自动收集异常推送到 sentry
- log_redis_queue_url: 如果配置,在调用 request.logger 方法的时候,会自动推送到消息队列,从而给前端展示。
打印日志的方法:直接使用 request.logger 实例的方法。
详情见 exampels/example_server.py 文件中的内容。
Metadata
Release files for vines-infer-sdk 0.0.2
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 | |
|---|---|---|---|---|
| vines_infer_sdk-0.0.2.tar.gz | 8.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vines_infer_sdk-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / vines_infer_sdk-0.0.2.tar.gz
| Download URL | vines_infer_sdk-0.0.2.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56326c772d85a202d7bd58e80e7f89c18f274f470e67626495af0c4843d2f748
|
|
BLAKE2b-256 checksum How to use checksums |
8b1572488d635935b58fc61fd8d7ada42fa3a1774d374e887a0093cf0a0cb99b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / vines_infer_sdk-0.0.2-py3-none-any.whl
| Download URL | vines_infer_sdk-0.0.2-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
950ee2de7e7b4c70fdd6186348c05570eb4ab163435d0f8ccb76c89de696f035
|
|
BLAKE2b-256 checksum How to use checksums |
6361b5c2211db5c7483302dbc3de7984dd079c242eeb9e8baa1c24838b143773
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for vines-infer-sdk 0.0.2
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.