kevin-toolbox-dev 1.4.9__py3-none-any.whl → 1.4.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. kevin_toolbox/__init__.py +2 -2
  2. kevin_toolbox/computer_science/algorithm/cache_manager/__init__.py +1 -0
  3. kevin_toolbox/computer_science/algorithm/cache_manager/cache/cache_base.py +10 -0
  4. kevin_toolbox/computer_science/algorithm/cache_manager/cache/memo_cache.py +17 -0
  5. kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager.py +24 -74
  6. kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager_wto_strategy.py +157 -0
  7. kevin_toolbox/computer_science/algorithm/for_seq/__init__.py +1 -0
  8. kevin_toolbox/computer_science/algorithm/for_seq/sample_subset_most_evenly.py +50 -0
  9. kevin_toolbox/computer_science/algorithm/redirector/__init__.py +1 -0
  10. kevin_toolbox/computer_science/algorithm/redirector/redirectable_sequence_fetcher.py +258 -0
  11. kevin_toolbox/computer_science/algorithm/sampler/__init__.py +1 -0
  12. kevin_toolbox/computer_science/algorithm/sampler/reservoir_sampler.py +116 -0
  13. kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py +1 -1
  14. kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py +18 -7
  15. kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py +8 -1
  16. kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_0.py +2 -1
  17. kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py +1 -4
  18. kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation_debug.py +16 -4
  19. kevin_toolbox/data_flow/file/markdown/table/get_format.py +3 -0
  20. kevin_toolbox/patches/for_logging/build_logger.py +3 -1
  21. kevin_toolbox_dev-1.4.10.dist-info/METADATA +106 -0
  22. {kevin_toolbox_dev-1.4.9.dist-info → kevin_toolbox_dev-1.4.10.dist-info}/RECORD +24 -18
  23. kevin_toolbox_dev-1.4.9.dist-info/METADATA +0 -75
  24. {kevin_toolbox_dev-1.4.9.dist-info → kevin_toolbox_dev-1.4.10.dist-info}/WHEEL +0 -0
  25. {kevin_toolbox_dev-1.4.9.dist-info → kevin_toolbox_dev-1.4.10.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.1
2
+ Name: kevin-toolbox-dev
3
+ Version: 1.4.10
4
+ Summary: 一个常用的工具代码包集合
5
+ Home-page: https://github.com/cantbeblank96/kevin_toolbox
6
+ Download-URL: https://github.com/username/your-package/archive/refs/tags/v1.0.0.tar.gz
7
+ Author: kevin hsu
8
+ Author-email: xukaiming1996@163.com
9
+ License: MIT
10
+ Keywords: mathematics,pytorch,numpy,machine-learning,algorithm
11
+ Platform: UNKNOWN
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: torch (>=1.2.0)
18
+ Requires-Dist: numpy (>=1.19.0)
19
+ Provides-Extra: plot
20
+ Requires-Dist: matplotlib (>=3.0) ; extra == 'plot'
21
+ Provides-Extra: rest
22
+ Requires-Dist: pytest (>=6.2.5) ; extra == 'rest'
23
+ Requires-Dist: line-profiler (>=3.5) ; extra == 'rest'
24
+
25
+ # kevin_toolbox
26
+
27
+ 一个通用的工具代码包集合
28
+
29
+
30
+
31
+ 环境要求
32
+
33
+ ```shell
34
+ numpy>=1.19
35
+ pytorch>=1.2
36
+ ```
37
+
38
+ 安装方法:
39
+
40
+ ```shell
41
+ pip install kevin-toolbox --no-dependencies
42
+ ```
43
+
44
+
45
+
46
+ [项目地址 Repo](https://github.com/cantbeblank96/kevin_toolbox)
47
+
48
+ [使用指南 User_Guide](./notes/User_Guide.md)
49
+
50
+ [免责声明 Disclaimer](./notes/Disclaimer.md)
51
+
52
+ [版本更新记录](./notes/Release_Record.md):
53
+
54
+ - v 1.4.10 (2025-04-11)【new feature】【bug fix】
55
+
56
+ - patches.for_logging
57
+ - modify build_logger() to allow parameter level to accept str input,允许参数 level 接受str输入,比如“DEBUG”或者“INFO”。
58
+
59
+ - computer_science.algorithm
60
+ - cache_manager
61
+ - 【new feature】add load_state_dict(), state_dict() to Cache_Base, Memo_Cache, Cache_Manager ,增加加载和保存状态的相关接口。
62
+ - add Cache_Manager_wto_Strategy,新增一个不绑定任何策略的缓存管理器,可以视为容量无上限的特殊情况
63
+ - refactor Cache_Manager,基于 Cache_Manager_wto_Strategy 对 Cache_Manager 代码进行简化和重构。
64
+ - 【new feature】redirector
65
+ - 该新增模块包含重定向功能的函数和类。所谓重定向,其本质是:**原目标失效或不合适时,自动转向一个新的目标,以保证流程不中断或获得正确结果**。
66
+ - add Redirectable_Sequence_Fetcher,用于从给定 seq 中获取元素,可以通过自动跳转来处理获取失败的情况。
67
+ - 功能描述:
68
+ 1. 对于给定的索引 idx,若能通过 seq(idx) 成功获取,则直接返回获取的结果。
69
+ 2. 若不能成功获取,则会根据给定的规则修改索引(如idx-1)重新尝试获取,递归调用直至获取成功或者递归调用次数达到上限。
70
+ 1. 若不能成功获取,则会根据给定的规则修改索引(如idx-1)重新尝试获取,递归调用直至获取成功或者递归调用次数达到上限。
71
+ 2. 当失败次数达到上限后,则不再进行尝试并直接返回重新向后的新的 idx 的结果。
72
+ 3. 若在此过程中原来失败的 idx 又能再次获取成功,则将失败次数减1,直至归零并删除该记录。
73
+ 3. 若递归次数达到上限,则进行报错或者返回给定的默认值。
74
+ 1. 若开启了跳转记忆功能,在重试过程中,一旦某次调用成功,记录原始索引与最终有效索引之间的映射关系。
75
+ - 添加了对应的测试用例。
76
+ - for_seq
77
+ - 【new feature】add sample_subset_most_evenly(),对列表按给定比例or数量进行采样,并返回一个新的列表,同时保证列表中每个元素在新列表中的占比尽量相近。
78
+ - redirector
79
+ - 【new feature】modify Redirectable_Sequence_Fetcher,增加了 seed 参数并在 state_dict 中增加 rng_state 项,以便控制(保存和重现)随机行为。
80
+ - 【new feature】sampler
81
+ - 该新增模块包含采样相关的函数和类。
82
+ - add Reservoir_Sampler,水库采样器。
83
+
84
+ - data_flow.file.kevin_notation
85
+
86
+ - 【bug fix】fix bug in Kevin_Notation_Reader and Kevin_Notation_Writer
87
+
88
+ - bug 原因:由于之前的版本默认启用"//"作为注释符号,因此导致无法正确读取带有"//"的值
89
+
90
+ - 解决:在 Kevin_Notation_Reader 和 Kevin_Notation_Writer 取消默认使用注释,并限定只有在 metadata 中显式指定注释标志符才会启用
91
+
92
+ - 注意:该修改可能导致原本带有注释的旧版本 .kvt 文件无法被正确读取,遇到该情况时,可以尝试将`# --metadata--`部分修改为:
93
+
94
+ ```text
95
+ # --metadata--
96
+ # sep
97
+
98
+ # comment_flag
99
+ //
100
+ ...
101
+ ```
102
+
103
+ - 添加了对应的测试用例。
104
+
105
+
106
+
@@ -1,12 +1,13 @@
1
- kevin_toolbox/__init__.py,sha256=Zz_PMwRXXXicnPLZzuj-A3qHU3jPIQ9XsqfQexBaPGg,410
1
+ kevin_toolbox/__init__.py,sha256=F2sq6sGyi7Ica2QHv67hQcuUXw3f0gLDHErp5V2Ht1k,411
2
2
  kevin_toolbox/computer_science/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  kevin_toolbox/computer_science/algorithm/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
- kevin_toolbox/computer_science/algorithm/cache_manager/__init__.py,sha256=p2hddkZ1HfYF9-m2Hx-o9IotwQHd4QwDCePy2ADpTDA,41
5
- kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager.py,sha256=yQ6bqOSPcTrq4FLyuxDERz7Yv9ZWsenjb48q6KRStj4,9771
4
+ kevin_toolbox/computer_science/algorithm/cache_manager/__init__.py,sha256=xKWoGhpgrgWbU1newrK7PKIoVsSSOyvcAHUP3cbAd3I,108
5
+ kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager.py,sha256=kW9a7i-N6BbRKIhKxInyg-MHm1sV3BXzS6gNfrWY4GA,7809
6
+ kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager_wto_strategy.py,sha256=VJ4tAusKqDqBmZ-UOGO4v-NNKnQVuhJH6ALM2qLihq0,5503
6
7
  kevin_toolbox/computer_science/algorithm/cache_manager/variable.py,sha256=j6yLezcZxf7gNdxwUxP0PPy2zauVpTr6KFMCg66m9lo,835
7
8
  kevin_toolbox/computer_science/algorithm/cache_manager/cache/__init__.py,sha256=Tt8XgrZsHP3J3f6UucGNhGAN8L7HiVjLLO1JzICR2Mc,70
8
- kevin_toolbox/computer_science/algorithm/cache_manager/cache/cache_base.py,sha256=Jln4Ey0sUGrzUqpkHaMP0S_z6NUw43iLnwMbmm-8msg,2229
9
- kevin_toolbox/computer_science/algorithm/cache_manager/cache/memo_cache.py,sha256=tG_5NZlGmLfom0B82GyPejhfuK64qZylBaHkKCoKw6k,963
9
+ kevin_toolbox/computer_science/algorithm/cache_manager/cache/cache_base.py,sha256=rVXCRmLcRJA_mNvn2qJz6yChZcEYhFy6BCdrIKNEaK8,2519
10
+ kevin_toolbox/computer_science/algorithm/cache_manager/cache/memo_cache.py,sha256=IglJqe73CrKVc_xzYDX7XMmxPL0eBmwh_IX_7mwNVCg,1451
10
11
  kevin_toolbox/computer_science/algorithm/cache_manager/strategy/__init__.py,sha256=JG7671omAwwRIDSEIrfWoLXEGe1ycE8e1Y5b0DjpNxY,199
11
12
  kevin_toolbox/computer_science/algorithm/cache_manager/strategy/fifo_strategy.py,sha256=8r6o9gd47ECbXLpDIFNVNCZ8psa872oeA55hYT0BylY,770
12
13
  kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lfu_strategy.py,sha256=beL1hX96q_7f0Vv9wtTqjrMGsmYgu7pW0PMxOVlLmrw,2557
@@ -32,10 +33,11 @@ kevin_toolbox/computer_science/algorithm/execution_graph/random_node.py,sha256=4
32
33
  kevin_toolbox/computer_science/algorithm/execution_graph/simple_node.py,sha256=Bz1ABA3O9pFbu4RxLbRN_18_2T3czZ_XgqR_f8QVTYM,3268
33
34
  kevin_toolbox/computer_science/algorithm/for_dict/__init__.py,sha256=YFxhbWIsOMGf7ay3fh0sosvXzpuqQQC1bkXK75LAqO4,37
34
35
  kevin_toolbox/computer_science/algorithm/for_dict/deep_update.py,sha256=_1GL8-zY1t48rp3N_SiirjYPzLwQSN_cpmzLKymOnQI,666
35
- kevin_toolbox/computer_science/algorithm/for_seq/__init__.py,sha256=-ch23vULEmsEPb6roGKWCrW1xt6g7RUTevdZGNsReIw,121
36
+ kevin_toolbox/computer_science/algorithm/for_seq/__init__.py,sha256=FAEKFljPU72cJlEPo0DytLlawLowcIfxiawuUFzt7WQ,186
36
37
  kevin_toolbox/computer_science/algorithm/for_seq/chunk_generator.py,sha256=xlg-ykyheKmZ-Xo6ETGhm5cj5N8s0VRuUaE1XqrI3Nk,2544
37
38
  kevin_toolbox/computer_science/algorithm/for_seq/flatten_list.py,sha256=XnDq-_nQln55vwpAnBslyOKI_KYq11C7PmfLChhSe0k,1046
38
39
  kevin_toolbox/computer_science/algorithm/for_seq/get_subsets.py,sha256=uVc2pf9cBjX9sWd9VJ3w6nbsRPaeFT1fXRFfGl1zk6Q,309
40
+ kevin_toolbox/computer_science/algorithm/for_seq/sample_subset_most_evenly.py,sha256=KcCg5mLTBthvWV_Hglp0J_mNSqzwVQBqNPz_c44cCMY,2473
39
41
  kevin_toolbox/computer_science/algorithm/locks/__init__.py,sha256=ZjZjqGsQB-z9MoYfOPYlI0H7nfZI1hNgxtmJaDdrynI,35
40
42
  kevin_toolbox/computer_science/algorithm/locks/mutex_lock.py,sha256=81cCw3oTXCZxFNhUzFTB5cPKmvbcLM_Gg-5DlT2nuRQ,2492
41
43
  kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/__init__.py,sha256=bIyMaB3v6JFjkrY7-sg_-yAnFH8I53E2qxIhGprcLzo,112
@@ -48,16 +50,20 @@ kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/utils/wrapper_w
48
50
  kevin_toolbox/computer_science/algorithm/pareto_front/__init__.py,sha256=F1uD0ZT2Ukb708_Eay96SEhaDfCq9YEheJRust33P6w,111
49
51
  kevin_toolbox/computer_science/algorithm/pareto_front/get_pareto_points_idx.py,sha256=WR-_9BruqAWH0QECa40b1Iz1_k6uesBrUYrn2s9ALBM,3008
50
52
  kevin_toolbox/computer_science/algorithm/pareto_front/optimum_picker.py,sha256=wnYN2s9r2g1z5wF0FvFLawRYITUJbMXbBs4TPsdvhlE,9923
53
+ kevin_toolbox/computer_science/algorithm/redirector/__init__.py,sha256=eeHQnV6qY5_2O3Xhn7Dl4YHaSI5HnAi9Nuyq65qgoow,73
54
+ kevin_toolbox/computer_science/algorithm/redirector/redirectable_sequence_fetcher.py,sha256=-edUnGw4GNqKOCQUnOSi-p8ZxoQgahmel1LwFV8QEgk,12435
51
55
  kevin_toolbox/computer_science/algorithm/registration/__init__.py,sha256=w9CHaFB1rIfIAiKrSXePwdhjN8kaRrxxdBwjJ7S2aWk,152
52
56
  kevin_toolbox/computer_science/algorithm/registration/registry.py,sha256=X1I04ZO2lTE36TjvJ1tcepl7xXD0OJWCA82RDsoENvA,17734
53
57
  kevin_toolbox/computer_science/algorithm/registration/serializer_for_registry_execution.py,sha256=a-bsb1JCc0rfHhz1mCua-5NWYu-lx4kPY9Ubp5MKUVU,3156
58
+ kevin_toolbox/computer_science/algorithm/sampler/__init__.py,sha256=ijjz_4VX5r_-9ZCJR98CNOKZRhQJ_dSX7QwGUPER1FI,49
59
+ kevin_toolbox/computer_science/algorithm/sampler/reservoir_sampler.py,sha256=mshAQuOiT79gEQYajbyC_zjDRnCZijnR5fVAPjTsMjY,3364
54
60
  kevin_toolbox/computer_science/algorithm/scheduler/__init__.py,sha256=ENzZsNaMu6ISilTxeE3_EP_L0dNi8SI7IYdTdxic2nw,76
55
61
  kevin_toolbox/computer_science/algorithm/scheduler/strategy_manager.py,sha256=yLh2GBEsedJhqvB90zEmAOdZ8IF7nn1r9lSE95BbnEQ,12194
56
62
  kevin_toolbox/computer_science/algorithm/scheduler/trigger.py,sha256=YlqTX2TE44BwcQI0jfvcBCJhouhdAYuhwu2QJhuBWP0,4470
57
63
  kevin_toolbox/computer_science/algorithm/search/__init__.py,sha256=zja7FXLTNd2dSVzzGp1TbBp4i3TDY8S9tcJ9pqc684A,41
58
64
  kevin_toolbox/computer_science/algorithm/search/binary_search.py,sha256=FcOdgxfuNews_AhPF_CoQDr2vBPqpUpifF7Fmgml1p4,1013
59
65
  kevin_toolbox/computer_science/algorithm/statistician/__init__.py,sha256=sYp7CrchsIdv89bBbiFHr3sIj6TGPBTQGHshSSk-9Z8,220
60
- kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py,sha256=iv-Mdw74u_iRceLX80_CSoEd4N3uAavU54Yw5Gw9t1o,6113
66
+ kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py,sha256=ePUmJlt7bPCC8o4BAuUEReIe9MuQM3aS-oDzUzZ_fdU,6113
61
67
  kevin_toolbox/computer_science/algorithm/statistician/accumulator_for_ndl.py,sha256=BBPuJHhMI7m6-qP3EDB1Z2dlCg4a_Fev7WQ5zFMPuuE,2275
62
68
  kevin_toolbox/computer_science/algorithm/statistician/average_accumulator.py,sha256=Dfd6zYALU-plkm8doc3xNyiR4sFqlib86IVH8FI8ciI,2896
63
69
  kevin_toolbox/computer_science/algorithm/statistician/exponential_moving_average.py,sha256=fc4l85FH-KbZSIQY15lJ6SDnXiU-F5XjbQimKCnIju8,5076
@@ -95,15 +101,15 @@ kevin_toolbox/data_flow/file/json_/converter/unescape_non_str_dict_key.py,sha256
95
101
  kevin_toolbox/data_flow/file/json_/converter/unescape_tuple_and_set.py,sha256=3vCFr6CtNZxiVR1nRVDcuodIzHRfrmDsvBPCWtnWtBs,814
96
102
  kevin_toolbox/data_flow/file/kevin_notation/__init__.py,sha256=g9UUF9nJrOMc0ndCwVROQLsux4Or2yVMJMdhK5P9nRc,259
97
103
  kevin_toolbox/data_flow/file/kevin_notation/converter.py,sha256=5k_Yxw-fBKEkxFG0bnl1fRsz06MlUS-4f3gZ--bmDs8,3621
98
- kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py,sha256=iN6nV8mMbifTbECNmjc-G2pzpxivhks5kCXGVdvS9fQ,8297
99
- kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py,sha256=ceZty_XPPEVgagQs1ddx9X23JDja22sr3gl7wrBIHfE,16546
104
+ kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py,sha256=7VmTilPSki0pCJhIct_SRDGRRJoZA6EXnIz96QUi4wg,8762
105
+ kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py,sha256=LtbvWVekDPGqSPtCYJu11ySfGD3vpDVKjARJYML6uCw,17091
100
106
  kevin_toolbox/data_flow/file/kevin_notation/read.py,sha256=w0RE0WwTmWycEozJVshAiE0gMBxproBRwBEMLS6tB6c,544
101
107
  kevin_toolbox/data_flow/file/kevin_notation/write.py,sha256=X6k9ccpGEoMr6ccvjUj8zVJ6aPxjvdsY2fZqYu3Etww,657
102
108
  kevin_toolbox/data_flow/file/kevin_notation/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
- kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py,sha256=ab402r5LGyNz4XW2SnjvicNtQqBAAHZTaGfYMNdMExI,7345
104
- kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation_debug.py,sha256=_s9KPa3OjX6hTMq3TNrvtHy2D-Wlp65qgr7LxH-nn8o,999
109
+ kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py,sha256=HHc5S3d3rZAvBb3C7DaSlJYoT41UtppPxvJFdNecc2g,7327
110
+ kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation_debug.py,sha256=0ceDl4bJTOB2IdjfBrzXKqYd8kqAALDXWUoTZsikNoQ,1683
105
111
  kevin_toolbox/data_flow/file/kevin_notation/test/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_0.py,sha256=CKRb86O3JV9lkGrMtyJzEH041o0xABfT32Zo4GQ5Qis,324
112
+ kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_0.py,sha256=nz_fdsrLq4oZ1YxUnqnVB8Yuk8NIG-z3sCC8v2DOYE0,358
107
113
  kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_1.py,sha256=Xs8oFJqwi0uPOJewulij7DY0iMEp6dWBMiiDIwPlm4s,176
108
114
  kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_all.py,sha256=cvwrNzMVqB2YF1Ya3pw4NSOOzQBcGCFVCB2lN-sKmfw,438
109
115
  kevin_toolbox/data_flow/file/markdown/__init__.py,sha256=LJQBXClkuLylO2ufconMfpxckc-lqD4yLuDwNYWXfF8,173
@@ -115,7 +121,7 @@ kevin_toolbox/data_flow/file/markdown/table/__init__.py,sha256=kLWziykXpOKwebDZa
115
121
  kevin_toolbox/data_flow/file/markdown/table/convert_format.py,sha256=JT7AZsQi3h5XZsz6PAvAQKbWIkpLsjIyAFv6Iiwt5H8,2652
116
122
  kevin_toolbox/data_flow/file/markdown/table/find_tables.py,sha256=LC--ECb_A4XVsDGfYE8tj-hO2JDWbptpyHri7m_DBpY,3614
117
123
  kevin_toolbox/data_flow/file/markdown/table/generate_table.py,sha256=jFd1OT5Er65Mg5x6KTEQ4FD1HnlcurpZNYNaAg_E-NQ,5879
118
- kevin_toolbox/data_flow/file/markdown/table/get_format.py,sha256=jEVxFwzP2n-YMrm9q5Yc6PPB7bEuSydWvw70werAhzo,632
124
+ kevin_toolbox/data_flow/file/markdown/table/get_format.py,sha256=MZIrWLxLDRpQRHKWUzzzagIYvyFMRpTqn8p32BBLaM8,749
119
125
  kevin_toolbox/data_flow/file/markdown/table/padding_misaligned_values.py,sha256=kbme0KXCPwjIoJVd9wIs7l0q_kicu3PzZjtcwWecH9E,712
120
126
  kevin_toolbox/data_flow/file/markdown/table/variable.py,sha256=JXtht8HvzcZEc-To7XYtwwUtc-4d0bRYYUBI7tCBUEI,1805
121
127
  kevin_toolbox/data_flow/file/markdown/table/convert/__init__.py,sha256=9jpD4Siq3bok35PNaPf9C9oicGRHPBIOSYjag72-gQg,102
@@ -286,7 +292,7 @@ kevin_toolbox/network/get_response.py,sha256=pNOi4IgAiXEH7QzNdyVEVo6lfIkOrurgnV1
286
292
  kevin_toolbox/network/variable.py,sha256=R-gKgG1PRV1MnL1ApsQXKBqDt6YbM87xNGkCf_gUUCM,237
287
293
  kevin_toolbox/patches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
288
294
  kevin_toolbox/patches/for_logging/__init__.py,sha256=xymF6mjwY4Cin7CoEwanFY5ZVk8oY0pDLqjZAGa7_Rg,39
289
- kevin_toolbox/patches/for_logging/build_logger.py,sha256=TpIjkz6Qr6gSLAz-xg_9LqNO0O_rfufBfy4pswDxpkg,3082
295
+ kevin_toolbox/patches/for_logging/build_logger.py,sha256=eauSF5E46Vd8LcQ3SIkN9etB3TwviANfQtd83Vjxl5o,3178
290
296
  kevin_toolbox/patches/for_matplotlib/__init__.py,sha256=Pr9jXGomD3wBvtKE8p9V7rKDY4YBLAP5ayWEuBbDdk4,182
291
297
  kevin_toolbox/patches/for_matplotlib/add_trajectory_2d.py,sha256=mKXRUNJiEZBcff3pAkwL_gcKGn55CLRhYCTSd3fj1Go,1837
292
298
  kevin_toolbox/patches/for_matplotlib/add_trajectory_3d.py,sha256=VGlZfVY0xhUBOUzWJVPxZZNHHRvWLR0HZzhADA_cbsU,1696
@@ -372,7 +378,7 @@ kevin_toolbox/patches/for_torch/nn/__init__.py,sha256=aJs3RMqRzQmd8KKDmQW9FxwCqS
372
378
  kevin_toolbox/patches/for_torch/nn/lambda_layer.py,sha256=KUuLiX_Dr4bvRmpAaCW5QTDWDcnMPRnw0jg4NNXTFhM,223
373
379
  kevin_toolbox/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
380
  kevin_toolbox/utils/variable.py,sha256=PxUmp9w4CKKcKHjgdVNF_Iaw5gwPPOd4aY_Oe5F9U1M,133
375
- kevin_toolbox_dev-1.4.9.dist-info/METADATA,sha256=Q66eIgYcla2f_LJor80E5ApSiVUBVqT7Wld_vYesMW8,3277
376
- kevin_toolbox_dev-1.4.9.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
377
- kevin_toolbox_dev-1.4.9.dist-info/top_level.txt,sha256=S5TeRGF-PwlhsaUEPTI-f2vWrpLmh3axpyI6v-Fi75o,14
378
- kevin_toolbox_dev-1.4.9.dist-info/RECORD,,
381
+ kevin_toolbox_dev-1.4.10.dist-info/METADATA,sha256=bjCQmlBluzA-kTrLH7Vxu3njxWMk-9HRyRgTbA_MmCI,4748
382
+ kevin_toolbox_dev-1.4.10.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
383
+ kevin_toolbox_dev-1.4.10.dist-info/top_level.txt,sha256=S5TeRGF-PwlhsaUEPTI-f2vWrpLmh3axpyI6v-Fi75o,14
384
+ kevin_toolbox_dev-1.4.10.dist-info/RECORD,,
@@ -1,75 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: kevin-toolbox-dev
3
- Version: 1.4.9
4
- Summary: 一个常用的工具代码包集合
5
- Home-page: https://github.com/cantbeblank96/kevin_toolbox
6
- Download-URL: https://github.com/username/your-package/archive/refs/tags/v1.0.0.tar.gz
7
- Author: kevin hsu
8
- Author-email: xukaiming1996@163.com
9
- License: MIT
10
- Keywords: mathematics,pytorch,numpy,machine-learning,algorithm
11
- Platform: UNKNOWN
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3
15
- Requires-Python: >=3.6
16
- Description-Content-Type: text/markdown
17
- Requires-Dist: torch (>=1.2.0)
18
- Requires-Dist: numpy (>=1.19.0)
19
- Provides-Extra: plot
20
- Requires-Dist: matplotlib (>=3.0) ; extra == 'plot'
21
- Provides-Extra: rest
22
- Requires-Dist: pytest (>=6.2.5) ; extra == 'rest'
23
- Requires-Dist: line-profiler (>=3.5) ; extra == 'rest'
24
-
25
- # kevin_toolbox
26
-
27
- 一个通用的工具代码包集合
28
-
29
-
30
-
31
- 环境要求
32
-
33
- ```shell
34
- numpy>=1.19
35
- pytorch>=1.2
36
- ```
37
-
38
- 安装方法:
39
-
40
- ```shell
41
- pip install kevin-toolbox --no-dependencies
42
- ```
43
-
44
-
45
-
46
- [项目地址 Repo](https://github.com/cantbeblank96/kevin_toolbox)
47
-
48
- [使用指南 User_Guide](./notes/User_Guide.md)
49
-
50
- [免责声明 Disclaimer](./notes/Disclaimer.md)
51
-
52
- [版本更新记录](./notes/Release_Record.md):
53
-
54
- - v 1.4.9 (2025-03-27)【new feature】【bug fix】
55
-
56
- - patches.for_numpy.linalg
57
- - 【bug fix】fix bug in softmax(),修改 33 行,从减去全局最大值改为减去各个分组内部的最大值,避免全局最大值过大导致某些分组全体数值过小导致计算溢出。
58
- - patches.for_matplotlib.common_charts.utils
59
- - modify save_plot(),在最后增加 plt.close() 用于及时销毁已使用完的画布,避免不必要的内存占用。
60
- - nested_dict_list
61
- - 【new feature】modify traverse(),增加以下参数以更加精确地控制遍历时的行为:
62
- - b_skip_repeated_non_leaf_node: 是否跳过重复的非叶节点。
63
- - 何为重复?在内存中的id相同。
64
- - 默认为 None,此时将根据 action_mode 的来决定:
65
- - 对于会对节点进行修改的模式,比如 "remove" 和 "replace",将设为 True,以避免预期外的重复转换和替换。
66
- - 对于不会修改节点内容的模式,比如 "skip",将设为 False。
67
- - cond_for_repeated_leaf_to_skip:函数列表。在叶节点位置上,遇到满足其中某个条件的重复的元素时需要跳过。
68
- - 同步修改内部使用了 traverse() 的 get_nodes() 和 copy_() 等函数。
69
- - 新增了对应的测试用例。
70
- - data_flow.file.json_
71
- - 【bug fix】fix bug in write()。
72
- - bug 归因:在 json_.write() 中通过使用 ndl.traverse() 来找出待转换的元素并进行转换,但是在 v1.4.8 前,该函数默认不会跳过重复(在内存中的id相同)出现的内容。由于该内容的不同引用实际上指向的是同一个,因此对这些引用的分别多次操作实际上就是对该内容进行了多次操作。
73
- - bug 解决:在后续 v1.4.9 中为 ndl.traverse() 新增了 b_skip_repeated_non_leaf_node 用于控制是否需要跳过重复的引用。我们只需要在使用该函数时,令参数 b_skip_repeated_non_leaf_node=True即可。
74
-
75
-