Skip to main content

Kaiwu SDK for CIM or QUBO.

Project description

Kaiwu SDK

  • 企业发布版本,需要到开发者平台注册账号获取授权后使用

SDK使用教程

目录结构

发版流程,SDK和文档版本独立管理

  • SDK版本号形如v1.0.0,并打v1.0.0的tag以作记录
  • 每次新版内容都需要更新 CHANGELOG.md
  • 文档版本号形如:1.0.0-doc, 如果仅更新文档,基于tag进行更新,更新后重新生成一个相同tag用于文档发布

环境依赖

构建whl

  • 生成的发布文件位于 dist 目录下,可直接用于 PyPI 上传或 pip 安装
  • python setup.py sdist bdist_wheel

二进制编译

  • 对代码进行二进制编译达到加密的效果
  • python build.py build_ext --inplace

安装说明

  • 使用上面构建的 whl 文件进行安装,例如:pip install dist/kaiwu-1.4.0-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文档部署说明

文档地址

生成文档

新版本迭代步骤:

  1. 建立新分支,分支名形如:v1.1.2
  2. 修改 common/config.pysetup.py 中的版本号,使其与待发布版本保持一致
  3. 修改预发布环境版本配置文件:http://10.3.147.155:90/_static/switcher_en.jsonhttp://10.3.147.155:90/_static/switcher_en.json
  4. 修改生产环境版本配置文件:https://kaiwu-sdk-docs.qboson.com/_static/switcher_en.jsonhttps://kaiwu-sdk-docs.qboson.com/_static/switcher_en.json
  5. 如果修复某个版本文档的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

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kaiwu-1.4.0-cp310-none-win_amd64.whl (645.0 kB view details)

Uploaded CPython 3.10Windows x86-64

kaiwu-1.4.0-cp310-none-manylinux1_x86_64.whl (891.8 kB view details)

Uploaded CPython 3.10

kaiwu-1.4.0-cp310-none-macosx_11_0_arm64.whl (674.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

kaiwu-1.4.0-cp310-none-macosx_10_9_x86_64.whl (692.5 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file kaiwu-1.4.0-cp310-none-win_amd64.whl.

File metadata

  • Download URL: kaiwu-1.4.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 645.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for kaiwu-1.4.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 4c84a9ff2afe2951f52d1e49f31db6ade0b4d28d619cdc3c53d4d060a23a07fa
MD5 47526c966c77008f206667e2dad27066
BLAKE2b-256 5cd1f8a094c1be733dedacd139d5ee4acad6113aab04d88d735561d62743b13e

See more details on using hashes here.

File details

Details for the file kaiwu-1.4.0-cp310-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for kaiwu-1.4.0-cp310-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c72c17bed5dfe17a8dc43318fa460167851d3c6cbe4234f6fc5c53592f764c8f
MD5 11ceea6b6f142cc0445a7050950daf60
BLAKE2b-256 f1d30bb2b24cd9c832b1deb0080e587dca47a21d1827fab3d03dec3de1f4a1a3

See more details on using hashes here.

File details

Details for the file kaiwu-1.4.0-cp310-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kaiwu-1.4.0-cp310-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f2f936ccd8a464a540e9b829019506e0260230f1d88d3ab659ebdd483ed3c8c
MD5 11b816e9b2825ca44eeacf1688cb99af
BLAKE2b-256 dea6a8cb09b3f9d2c7c4a60678933ae24452870051bf5cd259bf84011ed7edb5

See more details on using hashes here.

File details

Details for the file kaiwu-1.4.0-cp310-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for kaiwu-1.4.0-cp310-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1659d49a77b7652f87b31e03f628851bf397e9695c0c8a3143a50049dc782084
MD5 7b3cf62b4d81666c6054c7c261a4bcdf
BLAKE2b-256 1c01e8fe234d6ab7aa8693a412ed105959d91ab1ffaa3b6c7f30c3c48291570c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page