Skip to main content

Trainify-proto

Project description

Trainify-proto

本工具是CAV2022中Trainify: A CEGAR-Driven Training and Verification Framework for Safe Deep Reinforcement Learning的原型工具,Trainify-proto在论文代码的基础上进行了重构改进,增强了易用性、可拓展性和通用性,实现了自定义抽象训练流程和自选形式化验证等功能。

安装

  1. pypi (完整功能)

    pip install Trainify-proto

    如果想体验最新功能,可以安装测试版本

    pip install -i https://test.pypi.org/simple/ Trainify-proto

  2. git clone(完整功能)

    通过git clone项目到本地,集成进自己的项目中使用

  3. web在线使用(部分功能)

核心模块

abstract 存放抽象相关工具

agents 存放自带agent/policy

core 核心组件

data 训练数据保存

env 存放自带env

evaluate 评估模块

test 测试代码

utils 工具函数

查看训练/验证结果

# 先安装tensorboard
pip install tensorboard
# log_dir替换为需要查看的实验目录
tensorboard --logdir=log_dir

开发内容

  1. 环境与状态抽象 需要输入的环境信息:

    Dim:2
    State_var: x1, x2
    Range: [0,1] [0,4]
    dqn or ddpg
    Env class obj
    dynamics:  x1' = x1 + t *x2^2
                        x2' = x2+ t* x1
    
  2. 训练Policy与Agent

  3. 验证规则

    1. AG(safe) AF(taget)
    2. 返回['safe']的函数
  4. 统一输出

    1. 命令行中的统一格式规范的输出
    2. tensorboard 作为图表形式

发布

切换到publish分支:git checkout publish

打包:python setup.py sdist bdist_wheel

测试版本:python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

正式版本:python -m twine upload dist/*

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

Trainify-proto-0.0.5.tar.gz (53.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Trainify_proto-0.0.5-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

Details for the file Trainify-proto-0.0.5.tar.gz.

File metadata

  • Download URL: Trainify-proto-0.0.5.tar.gz
  • Upload date:
  • Size: 53.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for Trainify-proto-0.0.5.tar.gz
Algorithm Hash digest
SHA256 60325cb4428d3fca63754c6433f0d8dce3f2a7b2b73bba775330e5e68ecce989
MD5 19230d53e2c5346380d1a261caeb1d69
BLAKE2b-256 a49c765b06bf219d4cf66b91e088410f9b27767aeccc4552f26e97c01e8d49b4

See more details on using hashes here.

File details

Details for the file Trainify_proto-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: Trainify_proto-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 78.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for Trainify_proto-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 30b03929726144981fb66395fb0bcad169e6d7485551305a1b6819147b130075
MD5 1868454c04611b9e24cbc65bb8d3a8b0
BLAKE2b-256 16b3af23673ae1f4cfe3188db3352bbe6893dfc7b81d2b2d0903ed59d77fe7dd

See more details on using hashes here.

Supported by

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