Commit 839ca071 authored by Yuxin Wu's avatar Yuxin Wu

add psutil for env info collection

parent 3321123f
...@@ -53,14 +53,13 @@ We do not answer machine learning questions and it is your responsibility to ...@@ -53,14 +53,13 @@ We do not answer machine learning questions and it is your responsibility to
figure out how to make your models more accurate. figure out how to make your models more accurate.
### 4. Your environment: ### 4. Your environment:
+ Python version: + Paste the output of this command: `python3 -c 'import tensorpack.tfutils as u; print(u.collect_env_info())'`
+ TF version: `python -c 'import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)'`. If this command failed, tell us your version of Python/TF/tensorpack.
+ Tensorpack version: `python -c 'import tensorpack; print(tensorpack.__version__);'`. + You can install Tensorpack master by `pip install -U git+https://github.com/ppwwyyxx/tensorpack.git`
You can install Tensorpack master by `pip install -U git+https://github.com/ppwwyyxx/tensorpack.git` and see if your issue is already solved.
and see if your issue is already solved.
+ If you're not using tensorpack under a normal command line shell (e.g., + If you're not using tensorpack under a normal command line shell (e.g.,
using an IDE or jupyter notebook), please retry under a normal command line shell. using an IDE or jupyter notebook), please retry under a normal command line shell.
+ Hardware information, e.g. number of GPUs used. + Include relevant hardware information, e.g. number of GPUs used for training, amount of RAM.
You may often want to provide extra information related to your issue, but You may often want to provide extra information related to your issue, but
at the minimum please try to provide the above information __accurately__ to save effort in the investigation. at the minimum please try to provide the above information __accurately__ to save effort in the investigation.
...@@ -51,6 +51,7 @@ setup( ...@@ -51,6 +51,7 @@ setup(
"msgpack>=0.5.2", "msgpack>=0.5.2",
"msgpack-numpy>=0.4.4.2", "msgpack-numpy>=0.4.4.2",
"pyzmq>=16", "pyzmq>=16",
"psutil>=5",
"subprocess32; python_version < '3.0'", "subprocess32; python_version < '3.0'",
"functools32; python_version < '3.0'", "functools32; python_version < '3.0'",
], ],
......
...@@ -6,7 +6,9 @@ from six.moves import map ...@@ -6,7 +6,9 @@ from six.moves import map
from tabulate import tabulate from tabulate import tabulate
import os import os
import sys import sys
import psutil
import tensorflow as tf import tensorflow as tf
import numpy as np
from ..compat import tfv1 from ..compat import tfv1
from ..utils.argtools import graph_memoized from ..utils.argtools import graph_memoized
...@@ -168,8 +170,11 @@ def collect_env_info(): ...@@ -168,8 +170,11 @@ def collect_env_info():
str - a table contains important information about the environment str - a table contains important information about the environment
""" """
data = [] data = []
data.append(("sys.platform", sys.platform))
data.append(("Python", sys.version.replace("\n", ""))) data.append(("Python", sys.version.replace("\n", "")))
data.append(("Tensorpack", __git_version__)) data.append(("Tensorpack", __git_version__))
data.append(("Numpy", np.__version__))
data.append(("TensorFlow", tfv1.VERSION + "/" + tfv1.GIT_VERSION)) data.append(("TensorFlow", tfv1.VERSION + "/" + tfv1.GIT_VERSION))
data.append(("TF Compiler Version", tfv1.COMPILER_VERSION)) data.append(("TF Compiler Version", tfv1.COMPILER_VERSION))
has_cuda = tf.test.is_built_with_cuda() has_cuda = tf.test.is_built_with_cuda()
...@@ -209,7 +214,11 @@ def collect_env_info(): ...@@ -209,7 +214,11 @@ def collect_env_info():
except Exception: except Exception:
data.append(("GPU", "Not found with NVML")) data.append(("GPU", "Not found with NVML"))
# Other important dependencies vram = psutil.virtual_memory()
data.append(("Free RAM", "{:.2f}/{:.2f} GB".format(vram.available / 1024**3, vram.total / 1024**3)))
data.append(("CPU Count", psutil.cpu_count()))
# Other important dependencies:
try: try:
import horovod import horovod
data.append(("horovod", horovod.__version__)) data.append(("horovod", horovod.__version__))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment