ml2026-base — ML 量化策略训练框架层
功能基类 + 统一实现,不含任何实例(业务)内容。
分发名 ml2026-base,导入名 base。
安装
pip install ml2026-base
python -c "import base; print(base.__version__, base.__file__)"
本仓开发(editable):
pip install -e .
从旧包名
base迁移时须先pip uninstall base,否则旧 editable 安装的.pth查找器会遮蔽新包。 不要用 Gitee Release 直链安装:该站 WAF 会拦截 pip 的 User-Agent,恒返 403。
内容
step.py:Step 统一规范(name + run(ctx))context.py:Ctx 上下文键契约(TypedDict 文档化,仅静态提示)data.py:DataStep 基类(load_quote / load_base_info)feature.py:FeatureStep 基类(build + inspect_sample 抽查)、Samples(实例内部样本集容器)、SampleSet(跨项目数组字典形态)、SampleStore(npz 版本化样本仓库)model.py:ModelStep 基类(train_mode: retrain/continue/skip)、ModelStore(模型版本管理)backtest.py:BacktestStep 统一回测(加载模型参数 → make_predictor 预测 → 净盈亏 → 绩效)
测试
python -m pytest tests/ -v
发布(维护者)
python release.py # 校验 + 构建 + 产物自检 + 安装回归 + SHA256SUMS
python release.py --pypi # 另:上传 PyPI(需 PYPI_TOKEN)
python release.py --gitee # 另:创建 Gitee Release 归档(需 GITEE_TOKEN)
版本规则与完整发布流程见 AGENTS.md,变更记录见 CHANGELOG.md。
Metadata
Release files for ml2026-base 0.2.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 | |
|---|---|---|---|---|
| ml2026_base-0.2.1.tar.gz | 17.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ml2026_base-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.7 kB
Release files / ml2026_base-0.2.1.tar.gz
| Download URL | ml2026_base-0.2.1.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4afbcd9603c99cc2b88674235536e7a7edbb0893958b97f7aedbce980538906a
|
|
BLAKE2b-256 checksum How to use checksums |
9e837f4fee577bb098e98265a547d60811809ab712d6f7de83fc6d418c7c6ae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.9
|
Release files / ml2026_base-0.2.1-py3-none-any.whl
| Download URL | ml2026_base-0.2.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
427fce7268658c1779e978a57ada3a103e60b969f21f3328de5a1ee5327d5927
|
|
BLAKE2b-256 checksum How to use checksums |
ddbd3d058a7623d2bd6fffef4b62895789e178c03e9a3915a88efa34b8100ff5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.9
|
Security for ml2026-base 0.2.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.