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-dev-1.1.2.tar.gz (119.6 kB view details)

Uploaded Source

Built Distribution

kevin_toolbox_dev-1.1.2-py3-none-any.whl (211.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kevin-toolbox-dev-1.1.2.tar.gz
Algorithm Hash digest
SHA256 3e2e3105cf1e60f15d48c364628fd371285932dd481c2232af87fbc72c117092
MD5 f7bc74f699d508ec00c5163086401a53
BLAKE2b-256 9c907aed1e64156c38c0510fddbb6213fbf134e3efe70324c64761692e1a280e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kevin_toolbox_dev-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e84544efa76f11c22a51c58ce8ae07e6b59b684e1339c93c55e3eae6ef3bcc88
MD5 fd394317b8ca8894033cc80e6906351e
BLAKE2b-256 3bcdef654642a52a875c7837a29b1e8f63a2ef1e9761689f1fc6292c607bbbbd

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