Yanked
This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.4.3 instead.
Kaiwu SDK
- 企业发布版本,需要到开发者平台注册账号获取授权后使用
SDK使用教程
目录结构
- 源码位于kaiwu
发版流程,SDK和文档版本独立管理
- SDK版本号形如v1.0.0,并打v1.0.0的tag以作记录
- 每次新版内容都需要更新 CHANGELOG.md
- 文档版本号形如:1.0.0-doc, 如果仅更新文档,基于tag进行更新,更新后重新生成一个相同tag用于文档发布
环境依赖
- Python 3.10 https://www.python.org/downloads/release/python-31011/ 。
- pip3 install -i https://mirrors.aliyun.com/pypi/simple -r requirements/devel.txt
构建whl
- 生成的发布文件位于
dist目录下,可直接用于 PyPI 上传或pip安装 python setup.py sdist bdist_wheel
二进制编译
- 对代码进行二进制编译达到加密的效果
python build.py build_ext --inplace
安装说明
- 使用上面构建的 whl 文件进行安装,例如:
pip install dist/kaiwu-1.4.2-py3-none-any.whl - 直接将 kaiwu 目录拷贝到项目根路径下
日志使用说明
- SDK默认日志输出级别为warning,如果需要更多日志内容可以自行调整日志输出级别
import numpy as np
import kaiwu as kw
if __name__ == '__main__':
# 调整日志级别, 默认INFO
kw.common.set_log_level("DEBUG")
matrix = -np.array(
[[0., 1., 0., 1., 1.],
[1., 0., 0., 1., 1.],
[0., 0., 0., 1., 1.],
[1., 1., 1., 0., 1.],
[1., 1., 1., 1., 0.]])
worker = kw.classical.SimulatedAnnealingOptimizer(initial_temperature=100,
alpha=0.99,
cutoff_temperature=0.001,
iterations_per_t=10,
size_limit=10)
worker.solve(matrix)
SDK文档部署说明
文档地址
-
kaiwu pre文档:
-
kaiwu prod文档:
-
kaiwu 海外版文档:
生成文档
新版本迭代步骤:
- 建立新分支,分支名形如:v1.1.2
- 修改
common/config.py与setup.py中的版本号,使其与待发布版本保持一致 - 修改预发布环境版本配置文件:http://10.3.147.155:90/_static/switcher_en.json 和 http://10.3.147.155:90/_static/switcher_en.json
- 修改生产环境版本配置文件:https://kaiwu-sdk-docs.qboson.com/_static/switcher_en.json 和 https://kaiwu-sdk-docs.qboson.com/_static/switcher_en.json
- 如果修复某个版本文档的bug,比如修复v1.1.2版本的文档,需要在v1.1.2分支上进行修复,要不要合并到main分支,由文档维护者决定
本地生成文档命令
# SDK使用sphinx构建文档,执行命令如下
cd docs
make html
国际化
cd docs
# 将可翻译的消息提取到pot文件中
make gettext
# 生成po文件,并翻译
sphinx-intl update -p _build/gettext -l zh -l en
SDK版本清单
- kaiwu_dev main分支
- kaiwu_dev 交付客户版本见tag
- Kaiwu SDK 企业发布版,带license
Metadata
Release files for kaiwu 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| kaiwu-1.4.2-cp310-none-manylinux1_x86_64.whl | CPython 3.10 | none | Linux glibc 2.5+ x86-64 | Details |
| kaiwu-1.4.2-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| kaiwu-1.4.2-cp310-cp310-macosx_12_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 12.0+ ARM64 | Details |
| kaiwu-1.4.2-cp310-cp310-macosx_10_15_x86_64.whl | CPython 3.10 | CPython 3.10 | macOS 10.15+ x86-64 | Details |
Total release size: 2.9 MB
Release files / kaiwu-1.4.2-cp310-none-manylinux1_x86_64.whl
| Download URL | kaiwu-1.4.2-cp310-none-manylinux1_x86_64.whl |
|---|---|
| Size | 844.7 kB |
| Tags | CPython 3.10 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
8e011aeab7382bb575dd3b4eed7e224400be9c370a1a98397be0d7c5a8c80c43
|
|
BLAKE2b-256 checksum How to use checksums |
2796670e92befbdf20c43a94884cd921412c3f4bf8a79425acdc5a9c80b567b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / kaiwu-1.4.2-cp310-cp310-win_amd64.whl
| Download URL | kaiwu-1.4.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 647.5 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b49aa59f7d83dc6b4ec7430138e1262c6f393a7198b81aec7467fe90909c6c0e
|
|
BLAKE2b-256 checksum How to use checksums |
a63f67aad84253bb4ff552146630fd65b72c645b4a664e296e430dd5c5c6b342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / kaiwu-1.4.2-cp310-cp310-macosx_12_0_arm64.whl
| Download URL | kaiwu-1.4.2-cp310-cp310-macosx_12_0_arm64.whl |
|---|---|
| Size | 695.5 kB |
| Tags | CPython 3.10 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
46f711205166b5cb28caf2bc09981a7f4410d2dd761097e1e209f23ace92bf54
|
|
BLAKE2b-256 checksum How to use checksums |
962e5332b6644be8605d301eb349caec72f15cfd34ec1d49a7642e899555c6a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / kaiwu-1.4.2-cp310-cp310-macosx_10_15_x86_64.whl
| Download URL | kaiwu-1.4.2-cp310-cp310-macosx_10_15_x86_64.whl |
|---|---|
| Size | 696.2 kB |
| Tags | CPython 3.10 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
1baae69ebe03694db120b958545254706f0aefdb09ccaf7c3a6ab31215783d28
|
|
BLAKE2b-256 checksum How to use checksums |
e794b0162f05239cdd4b29b7f986c202c5f02516e133f2f9344cc96a482f8e96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|