Python-Intel开源增强学习框架Coach


该框架利用多核CPU处理能力,用于训练和评估增强学习Agent。Coach包含一些领先的增强学习算法的多线程实现,适用于各种游戏和机器人环境。它能够在台式计算机上高效地训练强化学习Agent,而无需任何额外的硬件。
资源截图
代码片段和文件信息
#
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License Version 2.0 (the “License“);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing software
# distributed under the License is distributed on an “AS IS“ BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import sys

from codecs import open
from os import path

from setuptools import setup find_packages
import subprocess

# Creating the pip package involves the following steps:
# - Define the pip package related files - setup.py (this file) and MANIFEST.in by:
# 1. Make sure all the requirements in install_requires are defined correctly and that their version is the correct one
# 2. Add all the non .py files to the package_data and to the MANIFEST.in file
# 3. Make sure that all the python directories have an __init__.py file

# - Check that everything works fine by:
# 1. Create a new virtual environment using ‘virtualenv coach_env -p python3‘
# 2. Run ‘pip install -e .‘
# 3. Run ‘coach -p CartPole_DQN‘ and make sure it works
# 4. Run ‘dashboard‘ and make sure it works

# - If everything works fine build and upload the package to PyPi:
# 1. Update the version of Coach in the call to setup()
# 2. Remove the directories build dist and rl_coach.egg-info if they exist
# 3. Run ‘python setup.py sdist‘
# 4. Run ‘twine upload dist/*‘

slim_package = False  # if true build aws package with partial dependencies otherwise build full package

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here ‘README.md‘) encoding=‘utf-8‘) as f:
    long_description = f.read()

install_requires = list()
extras = dict()
excluded_packages = [‘kubernetes‘ ‘tensorflow‘] if slim_package else []

with open(path.join(here ‘requirements.txt‘) ‘r‘) as f:
    for line in f:
        package = line.strip()
        if any(p in package for p in excluded_packages):
            continue
        install_requires.append(package)

# check if system has CUDA enabled GPU
p = subprocess.Popen([‘command -v nvidia-smi‘] stdout=subprocess.PIPE shell=True)
out = p.communicate()[0].decode(‘UTF-8‘)
using_GPU = out != ‘‘

if not using_GPU:
    if not slim_package:
        # For linux wth no GPU we install the Intel optimized version of TensorFlow
        if sys.platform == “linux“ or sys.platform == “linux2“:
            install_requires.append(‘intel-tensorflow>=1.9.0‘)
        else:
            install_requires.append(‘tensorflow>=1.9.0‘)
    extras[‘mxnet‘] = [‘mxnet-mkl>=1.3.0‘]
else:
    if not slim_package:
        install_requires.append(‘tensorflow-gpu>=1.9.0‘)
    extras[‘mxnet‘] = [‘mxnet-cu90mkl>=1.3.0‘]

all_deps = []
for group_name 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142.circleci
     文件       36431  2019-07-24 13:10  NervanaSystems-coach-2697142.circleciconfig.yml
     文件         314  2019-07-24 13:10  NervanaSystems-coach-2697142.gitignore
     文件           0  2019-07-24 13:10  NervanaSystems-coach-2697142.nojekyll
     文件        6047  2019-07-24 13:10  NervanaSystems-coach-2697142CONTRIBUTING.md
     文件       11356  2019-07-24 13:10  NervanaSystems-coach-2697142LICENSE
     文件         308  2019-07-24 13:10  NervanaSystems-coach-2697142MANIFEST.in
     文件       15753  2019-07-24 13:10  NervanaSystems-coach-2697142README.md
     文件           0  2019-07-24 13:10  NervanaSystems-coach-2697142\__init__.py
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarks
     文件        3372  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksREADME.md
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3c
     文件        1400  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3cREADME.md
     文件       87771  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3cant_a3c_16_workers.png
     文件       67813  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3chalf_cheetah_a3c_16_workers.png
     文件      118324  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3chopper_a3c_16_workers.png
     文件      182003  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3cinverted_pendulum_a3c.png
     文件       62816  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3cspace_invaders_a3c_16_workers.png
     文件      120974  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksa3cwalker2d_a3c_16_workers.png
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksacer
     文件         725  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksacerREADME.md
     文件       66513  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksacerreakout_acer_16_workers.png
     文件       61713  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksacerpong_acer_16_workers.png
     文件       61938  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksacerspace_invaders_acer_16_workers.png
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksootstrapped_dqn
     文件         784  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksootstrapped_dqnREADME.md
     文件       93194  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksootstrapped_dqnreakout_bootstrapped_dqn.png
     文件       55882  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksootstrapped_dqnpong_bootstrapped_dqn.png
     文件       60284  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksootstrapped_dqnspace_invaders_bootstrapped_dqn.png
     目录           0  2019-07-24 13:10  NervanaSystems-coach-2697142enchmarksclipped_ppo
............此处省略1016个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)