比较提交

...
此合并请求有变更与目标分支冲突。
/.gitignore
/ml-agents/mlagents/trainers/learn.py

6 次代码提交

共有 4 个文件被更改,包括 124 次插入0 次删除
  1. 1
      .gitignore
  2. 30
      ml-agents/mlagents/trainers/learn.py
  3. 49
      directoryinstall.spec
  4. 44
      execinstall.spec

1
.gitignore


*.exe
*.x86_64
*.x86
*/dist/*
# Tensorflow Sharp Files
/UnitySDK/Assets/ML-Agents/Plugins/Android*

30
ml-agents/mlagents/trainers/learn.py


import logging
import multiprocessing
import sys
import importlib
from tensorboard import default
from tensorboard import program
from mlagents.trainers.trainer_controller import TrainerController
from mlagents.trainers.exception import TrainerError

# Signal that environment has been launched.
process_queue.put(True)
# Launch TensorBoard
launch_tensorboard("./summaries/")
def get_tensorboard_file_provider():
root_dir = os.path.dirname(importlib.import_module("tensorboard").__file__)
filename = os.path.join(root_dir, "webfiles.zip")
return open(filename, "rb")
def launch_tensorboard(summary_path):
log = logging.getLogger("werkzeug") # Disable webserver logs
log.setLevel(logging.ERROR)
log = logging.getLogger("tensorboard") # Disable tensorboard logs
log.setLevel(logging.ERROR)
tb = program.TensorBoard(default.get_plugins(), get_tensorboard_file_provider)
tb.configure(argv=[None, "--logdir", "./summaries/"])
url = tb.launch()
print("---------------------------------\n")
print("View your training progress by opening a browser at: %s \n" % url)
print("---------------------------------\n")
def create_sampler_manager(sampler_file_path, env_reset_params, run_seed=None):

# For python debugger to directly run this script
if __name__ == "__main__":
# Enable multiprocessing's freeze support
multiprocessing.freeze_support()
# Run code
main()

49
directoryinstall.spec


# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
from PyInstaller.utils.hooks import collect_submodules
import os, importlib
package_imports = [['tensorboard', ['webfiles.zip']]]
added_files = [( 'config', 'config' ),( 'demos', 'demos' )]
for package, files in package_imports:
proot = os.path.dirname(importlib.import_module(package).__file__)
added_files.extend((os.path.join(proot, f), package) for f in files)
hidden_imports = collect_submodules('tensorflow.contrib')
a = Analysis(['ml-agents/mlagents/trainers/learn.py'],
pathex=['/Users/ervin/Development/ml-agents-develop'],
binaries=[],
datas=added_files,
hiddenimports=hidden_imports,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='mlagents-learn',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='mlagents-dir')

44
execinstall.spec


# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
from PyInstaller.utils.hooks import collect_submodules
import os, importlib
hidden_imports = collect_submodules('tensorflow.contrib')
package_imports = [['tensorboard', ['webfiles.zip']]]
added_files = []
for package, files in package_imports:
proot = os.path.dirname(importlib.import_module(package).__file__)
added_files.extend((os.path.join(proot, f), package) for f in files)
a = Analysis(['ml-agents/mlagents/trainers/learn.py'],
pathex=['./'],
binaries=[],
datas=added_files,
hiddenimports=hidden_imports,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='mlagents-learn',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
正在加载...
取消
保存