GoogleCloudPlatform / GoogleCloudPlatform/training-data-analyst

Courses Deepdive Sequence Poetry have T2T version conflicts

Open
#500 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
8.6k
Forks
6.1k
Avg merge
4h 44m
Merged PRs (30d)
2

Description

The problem is related to `courses/machine_learning/deepdive/09_sequence/courses/machine_learning/deepdive/09_sequence`, which is used at Coursera's Sequence Models for Time Series and Natural Language Processing, part of Advanced Machine Learning with TensorFlow on Google Cloud Platform. When one reaches the `Train model locally on subset of data` part the below commad:
```bash
%%bash
DATA_DIR=gs://${BUCKET}/poetry/subset
OUTDIR=./trained_model
rm -rf $OUTDIR
t2t-trainer \
--data_dir=gs://${BUCKET}/poetry/subset \
--t2t_usr_dir=./poetry/trainer \
--problem=$PROBLEM \
--model=transformer \
--hparams_set=transformer_poetry \
--output_dir=$OUTDIR --job-dir=$OUTDIR --train_steps=10
```
throws an error:
```bash
/usr/local/envs/py2env/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "/usr/local/envs/py2env/bin/t2t-trainer", line 23, in
from tensor2tensor.bin import t2t_trainer
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensor2tensor/bin/t2t_trainer.py", line 25, in
from tensor2tensor import models # pylint: disable=unused-import
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensor2tensor/models/__init__.py", line 25, in
from tensor2tensor.layers import modalities # pylint: disable=g-import-not-at-top
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensor2tensor/layers/modalities.py", line 28, in
from tensor2tensor.layers import common_attention
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensor2tensor/layers/common_attention.py", line 31, in
from tensor2tensor.layers import common_layers
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensor2tensor/layers/common_layers.py", line 30, in
import tensorflow_probability as tfp
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensorflow_probability/__init__.py", line 68, in
_ensure_tf_install()
File "/usr/local/envs/py2env/lib/python2.7/site-packages/tensorflow_probability/__init__.py", line 65, in _ensure_tf_install
present=tf.__version__))
ImportError: This version of TensorFlow Probability requires TensorFlow version >= 1.14; Detected an installation of version 1.13.1. Please upgrade TensorFlow to proceed.
```
On the other hand, trying to update tensorflow in the top setup cells as explained in the exception, another issue arises:
```
tensorflow 1.14.0 has requirement numpy<2.0,>=1.14.5, but you'll have numpy 1.14.0 which is incompatible.
```
Also, as you on it, it'd be good IMO to bump the notebook's version of python up to 3, currently it's 2.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.