Skip to main content

一个常用的工具代码包集合

Project description

kevin_toolbox

一个通用的工具代码包集合

环境要求

numpy>=1.19
pytorch>=1.2

安装方法:

pip install kevin-toolbox  --no-dependencies

项目地址 Repo

使用指南 User_Guide

免责声明 Disclaimer

版本更新记录

  • v 1.1.2(2023-06-27)【bug fix】

    • computer_science.algorithm.for_nested_dict_list
      • 改进 get_value_by_name()
        • 新增了参数 b_pop 用于支持取值的同时将该值从 var 中移除
        • 新增了参数 default 用于设置取值失败时是报错还是返回默认值
    • computer_science.algorithm.registration
      • Registry
        • 【bug fix】修复了问题:当已有实例的 uid 为正整数 n,同时 cls.__counter 为 n 时,不指定 uid 再创建实例将错误地返回 uid=n 的已有实例而不是新建一个。
        • 将 self.pop() 函数的功能合并到 self.get(... ,b_pop=...) 中
    • computer_science.algorithm.scheduler
      • 改进 Trigger
        • 使用 Registry 来管理触发目标
        • 新增 self.unbind() 函数来解除绑定
        • 在 update_by_state() 中新增了 target_names 参数来决定调用哪些目标
        • 新增 Trigger 的状态管理相关函数
          • self.clear_state_dict(): 清除 Trigger 中保存的状态
          • self.load_state_dict(): 加载
          • self.state_dict(): 获取
          • load_state_dict 和 state_dict 的接口名称是为了和 pytorch 中模型、优化器的状态加载、获取保持一致。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kevin-toolbox-1.1.2.tar.gz (119.3 kB view details)

Uploaded Source

Built Distribution

kevin_toolbox-1.1.2-py3-none-any.whl (211.3 kB view details)

Uploaded Python 3

File details

Details for the file kevin-toolbox-1.1.2.tar.gz.

File metadata

  • Download URL: kevin-toolbox-1.1.2.tar.gz
  • Upload date:
  • Size: 119.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.11

File hashes

Hashes for kevin-toolbox-1.1.2.tar.gz
Algorithm Hash digest
SHA256 5d88ea1105d67430a549a588e205a2c8cb05285cb93a974621c8aa55b2127b16
MD5 6b0b0b324f89867b053c0b3d09c49a5b
BLAKE2b-256 23e45549c474dbe56b0a4d0de44ef6ab9d24706111c72d5a5c4e9ee8aaecff2e

See more details on using hashes here.

File details

Details for the file kevin_toolbox-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kevin_toolbox-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4283e339653fc502bb6edaf60a38004434410752ec1b038506ec437084f8f9
MD5 02b75d548578a86e25d53f2cabbd070b
BLAKE2b-256 49c857cba9184c4d2dd4c509c7b7910e08794297e1bfbee05509ba182967aeba

See more details on using hashes here.

Supported by

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