Skip to content

Tensorflow 2.3.0 Support #267

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

Merged
merged 12 commits into from
Nov 6, 2020
Merged

Tensorflow 2.3.0 Support #267

merged 12 commits into from
Nov 6, 2020

Conversation

jcmartin
Copy link
Contributor

@jcmartin jcmartin commented Nov 5, 2020

I have verified that this patch builds through Docker on an Ubuntu machine. The list of changes is as follows:

  • Support for Tensorflow 2.3.0
  • Support for ByteString as an argument. Needed for functions such as einsum.
  • Support for additional types for Adam optimizer.

I have verified all of these new features and have been using internally for about a month.

@google-cla
Copy link

google-cla bot commented Nov 5, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Nov 5, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

Copy link
Contributor

@blackgnezdo blackgnezdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! Minor nits below.

I'll check what's up with the build and report back.

@blackgnezdo
Copy link
Contributor

Build errors:

tensorflow-proto           > Installing library in /tfhs/.stack-work/install/x86_64-linux/a9c8c207ad3f6fbee05cf5280a4ba381dab715c23f35841cd40ab2d92a2ed93e/8.8.4/lib/x86_64-linux-ghc-8.8.4/tensorflow-proto-0.2.0.1-CW9xNdT4HVhw5p4FGDmg5
tensorflow-proto           > Registering library for tensorflow-proto-0.2.0.1..
tensorflow                 > configure (lib + test)
tensorflow                 > Configuring tensorflow-0.2.0.1...
tensorflow-opgen           > configure (lib)
tensorflow                 > build (lib + test)
tensorflow                 > Preprocessing library for tensorflow-0.2.0.1..
tensorflow                 > /tfhs/tensorflow/In file included from .stack-work/dist/x86_64-linux/Cabal-3.0.1.0/build/TensorFlow/Internal/Raw.chs.h:2:0:
tensorflow                 > /tfhs/third_party/tensorflow/tensorflow/c/c_api.h:23:10: fatal error: tensorflow/c/tf_datatype.h: No such file or directory
tensorflow                 >  #include "tensorflow/c/tf_datatype.h"
tensorflow                 >           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow                 > compilation terminated.
tensorflow                 > c2hs: Error during preprocessing custom header file
tensorflow-opgen           > Configuring tensorflow-opgen-0.2.0.1...
tensorflow-opgen           > build (lib)
tensorflow-opgen           > Preprocessing library for tensorflow-opgen-0.2.0.1..
tensorflow-opgen           > Building library for tensorflow-opgen-0.2.0.1..
tensorflow-opgen           > [1 of 2] Compiling TensorFlow.OpGen.ParsedOp
tensorflow-opgen           > [2 of 2] Compiling TensorFlow.OpGen
tensorflow-opgen           > copy/register
tensorflow-opgen           > Installing library in /tfhs/.stack-work/install/x86_64-linux/a9c8c207ad3f6fbee05cf5280a4ba381dab715c23f35841cd40ab2d92a2ed93e/8.8.4/lib/x86_64-linux-ghc-8.8.4/tensorflow-opgen-0.2.0.1-ABE0vjcjW1e9iXzVsnDDe8
tensorflow-opgen           > Registering library for tensorflow-opgen-0.2.0.1..

--  While building package tensorflow-0.2.0.1 using:
      /root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux/Cabal-3.0.1.0 build lib:tensorflow test:FFITest test:VarIntTest --ghc-options ""
    Process exited with code: ExitFailure 1

@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 5, 2020

The nitpicks are easy to take care of. I'll look into why it is not building.

@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 5, 2020

I did a fresh build on my computer and was unable to recreate the build error.

git clone git@github.com:jcmartin/haskell.git
cd haskell
git submodule init
git submodule update
cd docker
docker build -t test .
cd ..
stack --docker --docker-image=test:latest test

Perhaps the submodule are not getting updated?

@google-cla
Copy link

google-cla bot commented Nov 5, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Nov 5, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 5, 2020

I believe I have identified the build issue. It is due to ci_build/Dockerfile not being updated. I have addressed this with the latest commit. Everything should hopefully build correctly now.

@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 5, 2020

@googlebot I signed it!

@jcmartin jcmartin requested a review from blackgnezdo November 5, 2020 18:36
Copy link
Contributor

@blackgnezdo blackgnezdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for wrapping the stringly-typed parameters!

Another small batch of nits while the build is running...

Copy link
Contributor

@blackgnezdo blackgnezdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks a lot for the long overdue upgrade and for bearing with my nitpicks.

I'll merge this as soon as I get a green build.

@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 6, 2020

@blackgnezdo Do you mind running kokoro again? I discovered that the build was failing due to a deprecated import line that has since been fixed. Running ci_build/outer_launch_tests.sh passes on my end.

@blackgnezdo
Copy link
Contributor

CI failed due to

curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

I'll restart it.

@blackgnezdo
Copy link
Contributor

Cool!
tensorflow-ops > testEinsum: [OK]

@blackgnezdo blackgnezdo merged commit c66c912 into tensorflow:master Nov 6, 2020
@jcmartin
Copy link
Contributor Author

jcmartin commented Nov 7, 2020

@blackgnezdo Thanks for handling this so expediently! I'd recommend bumping the package version numbers and updating the related documentation to use a later version of stack. The stack version currently recommended will issue warnings about it not supporting GHC 8.8.

It would also be nice if this could somehow make it onto hackage and stackage.

In addition, there is some minor cruft related to old pull requests and issues related to 2.3.0 that should probably be garbage collected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants