Skip to content

Commit d14275a

Browse files
author
Stephen Hoover
authored
BUG Ignore irrelevant warning from tensorflow v1.4 (civisanalytics#52)
This warning happens at import time. It doesn't indicate a problem and should be ignored.
1 parent f00f3b7 commit d14275a

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Version number changes (major.minor.micro) in this package denote the following:
3636

3737
### Fixed
3838
- Enabled widgetsnbextension so that ipywidgets works.
39+
- Suppress irrelevant warning from tensorflow v1.4
3940

4041
## [3.3.0] - 2017-11-17
4142
### Package Updates

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ RUN jupyter nbextension enable --py widgetsnbextension
105105
# https://github.com/joblib/joblib/blob/0.11/joblib/parallel.py#L328L342
106106
ENV JOBLIB_TEMP_FOLDER=/tmp
107107

108+
# Filter out irrelevant warnings.
109+
# This section should be removed when it's no longer needed.
110+
# As of container version 4.0.0, it filters a tensorflow warning
111+
# which should go away with tensorflow v1.5.
112+
RUN mkdir -p /root/.local/lib/python3.6/site-packages
113+
COPY warningsfilter.py /root/.local/lib/python3.6/site-packages/usercustomize.py
114+
108115
ENV VERSION=4.0.0 \
109116
VERSION_MAJOR=4 \
110117
VERSION_MINOR=0 \

warningsfilter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import warnings
2+
3+
# This warning is raised from tensorflow v1.4 at import time.
4+
# It's irrelevant and should be ignored.
5+
warnings.filterwarnings('ignore', "compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6", category=RuntimeWarning)

0 commit comments

Comments
 (0)