From 86cb0aa38d49b8b8435515561f3f834f24163841 Mon Sep 17 00:00:00 2001 From: Taylor Robie Date: Tue, 27 Mar 2018 10:11:44 -0700 Subject: [PATCH] Add requirements.txt to official. (#3760) * add requirements.txt now that there are dependencies beyond tensorflow * direct pip info to README --- official/README.md | 2 ++ official/requirements.txt | 2 ++ official/utils/logging/logger.py | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 official/requirements.txt diff --git a/official/README.md b/official/README.md index 822ff3418..d59b385ab 100644 --- a/official/README.md +++ b/official/README.md @@ -28,4 +28,6 @@ If you would like to make any fixes or improvements to the models, please [submi The *Official Models* are made available as a Python module. To run the models and associated scripts, add the top-level ***/models*** folder to the Python path with the command: `export PYTHONPATH="$PYTHONPATH:/path/to/models"` +To install dependencies pass `-r official/requirements.txt` to pip. (i.e. `pip3 install --user -r official/requirements.txt`) + To make Official Models easier to use, we are planning to create a pip installable Official Models package. This is being tracked in [#917](https://github.com/tensorflow/models/issues/917). diff --git a/official/requirements.txt b/official/requirements.txt new file mode 100644 index 000000000..cda445018 --- /dev/null +++ b/official/requirements.txt @@ -0,0 +1,2 @@ +psutil>=5.4.3 +py-cpuinfo>=3.3.0 \ No newline at end of file diff --git a/official/utils/logging/logger.py b/official/utils/logging/logger.py index 5fbc93493..1b9c6f5d4 100644 --- a/official/utils/logging/logger.py +++ b/official/utils/logging/logger.py @@ -16,9 +16,7 @@ """Logging utilities for benchmark. For collecting local environment metrics like CPU and memory, certain python -packages need be installed. Run the following commands for dependency packages: - > pip install --upgrade py-cpuinfo - > pip install --upgrade psutil +packages need be installed. See README for details. """ from __future__ import absolute_import from __future__ import division -- GitLab