浏览代码

Add pympler

/develop/memorydump
Ervin Teng 4 年前
当前提交
4b3f5f77
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5
      ml-agents/mlagents/trainers/trainer_controller.py
  2. 1
      ml-agents/setup.py

5
ml-agents/mlagents/trainers/trainer_controller.py


from mlagents.trainers.agent_processor import AgentManager
from mlagents.tf_utils.globals import get_rank
from mlagents import torch_utils
from pympler import muppy, summary
class TrainerController:

n_steps = self.advance(env_manager)
for _ in range(n_steps):
self.reset_env_if_ready(env_manager)
all_objects = muppy.get_objects()
sum1 = summary.summarize(all_objects)
# Prints out a summary of the large objects
summary.print_(sum1)
# Stop advancing trainers
self.join_threads()
except (

1
ml-agents/setup.py


# We don't actually need six, but tensorflow does, and pip seems
# to get confused and install the wrong version.
"six>=1.12.0",
"pympler>=0.8",
],
python_requires=">=3.6.1",
entry_points={

正在加载...
取消
保存