-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TensorFlow 1.13 support #56
Conversation
Looks like almost all tests passed. Though Travis CI's python 3.6 will crash when import tf-nightly. We could wait until tf 1.13rc is out to take another look. We also could decide which version or platform we plan to support. |
When installing the generated whl files, the .so encountered an issue of:
Need some further investigation. |
Think I found where Change setup.py to use tf-nightly will fix the issue. |
@@ -48,7 +49,7 @@ def test_sequence_file_dataset(self): | |||
|
|||
dataset = hadoop_dataset_ops.SequenceFileDataset(filenames).repeat( | |||
num_repeats) | |||
iterator = dataset.make_initializable_iterator() | |||
iterator = dataset_ops.make_initializable_iterator(dataset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it would be better to use tf.compat.v1.data.make_one_shot_iterator(dataset)
as it's mentioned in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/data/ops/dataset_ops.py#L1358. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dmitrievanthony. Updated and using tensorflow.compat.v1.data
now.
@@ -66,7 +67,7 @@ def _check_dataset(self, dataset): | |||
self.assertEqual(dtypes.string, dataset.output_types["val"]["NAME"]) | |||
self.assertEqual(dtypes.int64, dataset.output_types["val"]["VAL"]) | |||
|
|||
it = dataset.make_one_shot_iterator() | |||
it = dataset_ops.make_one_shot_iterator(dataset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to update README.md (in ignite module and in the root folder) as well. We can do it in the same PR (you can take this version as a reference) or I can do it in a separate PR.
@yongtang I figured out the issue with the ArrowDatasets and will put up the fix soon |
86e6d1f
to
23e59ee
Compare
a4a6d1f
to
1af5cdb
Compare
I think we are almost complete for 1.13 support. Unfortunately R may need to be updated, but this could be done later. Also this PR will not be merged until TensorFlow 1.13 is released (At the moment only |
Also cc @terrytangyuan @BryanCutler FYI. |
fe2e007
to
9ac274c
Compare
I am continuing to play with tf 1.12.0 vs. 1.13.0. Noticed that the C++ binaries build against 1.12.0 will not work with 1.13.0, as the following has changed:
That means we do have to release a binary against 1.13.0 even if we use tensorflow's public endpoint Python API. |
7e448d9
to
e9bb8bd
Compare
The class name has changed. We probably need to update this line: https://github.com/tensorflow/io/blob/master/R-package/R/dataset_utils.R#L10 Try change it to something like:
If this doesn't work, temporary solution is to have that
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one minor comment
self._output_types = output_types | ||
self._output_shapes = output_shapes or \ | ||
nest.map_structure( | ||
lambda _: tensorflow.TensorShape(None), self._output_types) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be wrong, but I don't think these need to be initialized here and could still be in the base class constructor, even though the call needs to be last?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BryanCutler I just updated the PR and removed unneeded initialization (other than one place which is needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
Thanks @terrytangyuan. I added the follwoing
and verified locally that the above check passes. However, the program still throw out I would guess that is because Since last tfdatasets was released several months ago, I think |
Thanks for looking into this @yongtang ! |
@yongtang I doubt that it's related to |
@terrytangyuan I tried locally with
Then it seems the tests are passing. Wondering if this helps. |
@yongtang I see. Then it might be using the is_dataset() from tfdatasets. I’ll double check on this. In the meantime, let’s just use your fix for now. Thanks for looking into this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only a comment regarding tensorflow
version in REQUIRED_PACKAGES
.
setup.py
Outdated
REQUIRED_PACKAGES = [ | ||
'tensorflow == 1.12.0', | ||
'tensorflow >= 1.13.0rc0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it makes sense to add upper bound as well?
BTW, @yongtang are you planning to port these changes into I see that last changes I made to recover |
@dmitrievanthony My understanding is that tensorflow 1.13 will likely be the last release before 2.0. And starting from tensorflow 2.0, the contrib directory will be deprecated and removed from tensorflow repo. In that case, an ad-hoc fix on /cc @martinwicke @ewilderj to comment on the timeline of 1.13 and 2.0. |
Sadly, it's very likely we'll have at least one more 1.x release before 2.0 actually lands (outside of pre-releases). |
740733c
to
6883ab0
Compare
Both TF 1.13.0rc2 and TF 2.0 (tf-nightly-2.0-preview) build with tensorflow-io succeed now. Think we are ready for 1.13 and 2.0. Note:
I think the plan will be to rebuild another version of tensorflow-io when 2.0 is released. |
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Use GitHub version of tfdataset in R Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Will merge this PR in for now. We want to start testing tf 1.13 now (as tf 1.13 release is imminent). I will create a follow up PR to change the pip requirement to |
TensorFlow 1.13 support
This PR tries to add TensorFlow 1.13 support. As 1.13 has not been released yet, this PR is a working in progress until the release of 1.13.
Since 1.13 have breaking changes for Dataset API, this PR can only be merged with 1.13 released.
This PR fixes #54.