kevin_toolbox
一个通用的工具代码包集合
环境要求
numpy>=1.19
pytorch>=1.2
安装方法:
pip install kevin-toolbox --no-dependencies
- v 1.4.14 (2026-01-19)【bug fix】【new feature】【incompatible change】
- env_info.variable_
- 【new feature】add Vars_Parser,解释以ndl命名格式指定位置下的变量。
- refactor Env_Vars_Parser with Vars_Parser,将 Env_Vars_Parser 改为依赖 Vars_Parser 实现的形式。
- 出于兼容以往版本的考虑,我们在该版本中仍保留 Env_Vars_Parser,但我们强烈建议你改为使用 Vars_Parser 以获得更灵活高效的体验。
- patches
- for_matplotlib
- common_charts
- 【new feature】add plot_heatmap(), 绘制矩阵热力图(Heatmap)。
- common_charts.utils
- modify save_record() 修改以支持 label_formatter 参数为函数对象或
"<eval>..."形式包裹的函数的情况。
- modify save_record() 修改以支持 label_formatter 参数为函数对象或
- common_charts
- for_optuna
- 【new feature】add determine_whether_to_add_trial(),判断 hyper_paras 对应的 trial 是否应该添加到给定 study 中。
- 【new feature】add enqueue_trials_without_duplicates(),将 hyper_paras_ls 对应的一系列 trials 添加到 study 中。
- 添加了对应的测试用例。
- for_test
- modify check_consistency,新增参数 b_raise_error 用于控制检查到不一致时,是否引发报错。当设置为 False 时,将以
(<boolean>, <msg>)的形式返回检查结果。
- modify check_consistency,新增参数 b_raise_error 用于控制检查到不一致时,是否引发报错。当设置为 False 时,将以
- for_matplotlib
- computer_science.algorithm
- statistician
- 【new feature】add Latest_Accumulator,用于保留最近一次add的值的累积器。
- scheduler
- 【bug fix】fix bug in Strategy_Manager
- 将原来 line 218 中:先对 action_s 进行深拷贝再取出 p_value_func;改为先从 action_s 中取出 p_value_func 等待 p_value_func 进行可能的运算结束之后,再对 p_value_func 返回的结果深拷贝;前者在 p_value_func 为 callable 类实例且内部存在记忆变量时往往会因为对该实例本身进行深拷贝而产生意外结果,而后者对实例产生的结果再进行深拷贝就没有这个问题了。
- 增加 b_deepcopy_p_value 参数用于控制是否对 p_value_func 产生的结果进行深拷贝。
- 【bug fix】fix bug in Strategy_Manager
- cache_manager.cache
- 【new feature】add Array_Cache,基于内存array的缓存结构。
- 相较于基于dict的Memo_Cache,该类对于存储 Key 为非负整数(如索引 ID)的结构化数据更为友好。
- 【new feature】add Array_Cache,基于内存array的缓存结构。
- redirector
- 【new feature】add Passive_Redirectable_Sequence_Fetcher,辅助用户通过跳转来处理获取失败的情况。
- 相较于 Redirectable_Sequence_Fetcher 主动去管理给定的 seq,并负责获取元素,判断获取是否成功,本类仅起到记忆和建议的功能,并不管理任何 seq,需要用户主动告知获取是否成功。这给与用户更大的灵活性。
- refactor Redirectable_Sequence_Fetcher,改为依赖 Passive_Redirectable_Sequence_Fetcher 来实现功能。
- 【new feature】add Passive_Redirectable_Sequence_Fetcher,辅助用户通过跳转来处理获取失败的情况。
- sampler
- 【new feature】add Moving_Reservoir_Sampler,滑动水库采样,对最近历史窗口内数据进行均匀采样。
- 【incompatible change】modify Reservoir_Sampler,将原来 capacity 等参数更名为 target_nums 等。
- 【new feature】add Vanilla_Sampler,一般的序列采样采样。
- statistician
- env_info.variable_
Metadata
Release files for kevin-toolbox-dev 1.4.14
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 | Actions |
|---|---|---|---|---|
| kevin_toolbox_dev-1.4.14.tar.gz | 233.8 kB | Without provenance | Details for kevin_toolbox_dev-1.4.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kevin_toolbox_dev-1.4.14-py3-none-any.whl | Python 3 | none | any | Details for kevin_toolbox_dev-1.4.14-py3-none-any.whl |
Total release size: 662.8 kB
Release files / kevin_toolbox_dev-1.4.14.tar.gz
| Download URL | kevin_toolbox_dev-1.4.14.tar.gz |
|---|---|
| Size | 233.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4174510a0a6f3c60be14979a149fe27c67598159c22e64e8c1524691a2a0d2ec
|
|
BLAKE2b-256 checksum How to use checksums |
04c63e9a93f9a55e0d91b2eefeddb729951ad1cd9f1506d7be6946eeef47bf17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.11
|
Release files / kevin_toolbox_dev-1.4.14-py3-none-any.whl
| Download URL | kevin_toolbox_dev-1.4.14-py3-none-any.whl |
|---|---|
| Size | 429.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c51186630d3d6f15174d86bbecdcedc4a2ca51fb2db0becea0fbd6505d134b9
|
|
BLAKE2b-256 checksum How to use checksums |
ee7c25b21c120c909bcc49f111483246f13e430e14fa3085b0d88a05edf423b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.11
|
Security for kevin-toolbox-dev 1.4.14
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.