Vines Python 训练项目 SDK (供内部使用)
Project description
Vines Python 训练项目 SDK (供内部使用)
这个项目希望解决的问题,将开发一个新的训练项目中的很多重复性工作进行统一封装:
- 每次开一个新训练项目都需要起 HTTP Server
- 里面有可能会用到很多通用能力,比如上传、下载文件、以及一些基础方法等,这些都应该封装好。
- 错误日志推送逻辑
- 运行时日志逻辑
- api 入参、出参统一格式封装
- 统一的日志格式、日志收集
安装
使用示例
作为 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 文件中的内容。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vines_infer_sdk-0.0.1.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vines_infer_sdk-0.0.1.tar.gz.
File metadata
- Download URL: vines_infer_sdk-0.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6912e2e41d29e41568ad1ffa0c63a225c24fa9634b0175fc2da76f452e06fee3
|
|
| MD5 |
ebc254e61d504b9217b0678ccdfa8798
|
|
| BLAKE2b-256 |
166ed97654646881abfe6769cb1e4efa6e0b704c01f08f53136af42123172841
|
File details
Details for the file vines_infer_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: vines_infer_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b05fb6450754b34055d4720fe96d58cf813c8bcee4b79e08b3a0c574a573a1d
|
|
| MD5 |
7b7d5c216d2d033bb2d255796303c756
|
|
| BLAKE2b-256 |
c94cebb30717f5db041ea9be586afe02d589e1ab4b27cb5698db22b7d2616ad7
|