[meta-tensorflow,8/25] tensorflow-estimator: 1.13 -> 2.4

Submitted by Hongxu Jia on Dec. 16, 2020, 1:08 p.m. | Patch ID: 178913

Details

Message ID 20201216130822.28476-9-hongxu.jia@windriver.com
State New
Headers show

Commit Message

Hongxu Jia Dec. 16, 2020, 1:08 p.m.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0001-customize-for-yocto.patch            | 28 +++++++++++++++++++
 .../tensorflow/tensorflow-estimator_1.13.bb   | 12 ++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch

Patch hide | download patch | download mbox

diff --git a/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch b/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch
new file mode 100644
index 0000000..e9b66d5
--- /dev/null
+++ b/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch
@@ -0,0 +1,28 @@ 
+From a1bcf09a43fc44ad5e04c441ee45cc23d16cf7d2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 9 Dec 2020 17:59:01 +0800
+Subject: [PATCH] customize for yocto
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tensorflow_estimator/tools/pip_package/build_pip_package.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tensorflow_estimator/tools/pip_package/build_pip_package.sh b/tensorflow_estimator/tools/pip_package/build_pip_package.sh
+index d4953a6..e08cd8a 100755
+--- a/tensorflow_estimator/tools/pip_package/build_pip_package.sh
++++ b/tensorflow_estimator/tools/pip_package/build_pip_package.sh
+@@ -38,7 +38,7 @@ function prepare_src() {
+ 
+   # Verifies all expected files are in pip.
+   # Creates init files in all directory in pip.
+-  python tensorflow_estimator/tools/pip_package/create_pip_helper.py --pip-root "${TMPDIR}/tensorflow_estimator/" --bazel-root "./tensorflow_estimator"
++  nativepython3 tensorflow_estimator/tools/pip_package/create_pip_helper.py --pip-root "${TMPDIR}/tensorflow_estimator/" --bazel-root "./tensorflow_estimator"
+ }
+ 
+ function build_wheel() {
+-- 
+2.18.2
+
diff --git a/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
index f3a5098..5b2fe5d 100644
--- a/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
+++ b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
@@ -3,9 +3,10 @@  learning programming."
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=01e86893010a1b87e69a213faa753ebd"
 
-SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r1.13 \
+SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r2.4 \
+           file://0001-customize-for-yocto.patch \
           "
-SRCREV = "340703eed78ba4854862f749ed94f91598826e79"
+SRCREV = "c3e7f2b5bbcc35185ef71797955a28cadce28f60"
 S = "${WORKDIR}/git"
 
 inherit python3native bazel
@@ -19,12 +20,18 @@  DEPENDS += " \
     python3-astor-native \
     python3-gast-native \
     python3-termcolor-native \
+    python3-wrapt-native \
+    python3-opt-einsum-native \
+    python3-astunparse-native \
+    flatbuffers-native \
     tensorflow-native \
 "
 
 do_compile () {
     unset CC
     export TMPDIR="${WORKDIR}"
+    export PYTHON_BIN_PATH="${PYTHON}"
+
     ${BAZEL} build \
         --subcommands --explain=${T}/explain.log \
         --verbose_explanations --verbose_failures \
@@ -32,7 +39,6 @@  do_compile () {
         --python_path="${PYTHON}" \
         //tensorflow_estimator/tools/pip_package:build_pip_package
 
-    PYTHON_BIN_PATH="${PYTHON}" \
     ${S}/bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package \
         ${WORKDIR}/estimator_pip
 }

Comments

Randy MacLeod Jan. 7, 2021, 8:47 p.m.
On 2021-01-07 1:47 p.m., Belisko Marek wrote:
>> Marek,
>> Does this happen if you use the master branch?
> Yes this comes from master branch.

Hi Marek,

Is it:
A) Comes from master and is a problem on dunfell or
B) it is reproducible on the master branch?

Given that you said:
 > I'm getting issue when building tensorflow-estimator (I add small
 > changes to be able to build this patches on top of dunfell) ...

I suspect it's A only. Right?

What are your small changes.

Hongxu may take a quick look but we generally can't afford to
investigate all combinations of recipe/branchs as I'm sure you
can appreciate.

If you can reproduce the error on master without or even with your
changes then that's a different story.

Good luck and Happy New Year!
Belisko Marek Jan. 25, 2021, 6:57 p.m.
Hi Randy,

On Thu, Jan 7, 2021 at 9:47 PM Randy MacLeod
<randy.macleod@windriver.com> wrote:
>
> On 2021-01-07 1:47 p.m., Belisko Marek wrote:
> >> Marek,
> >> Does this happen if you use the master branch?
> > Yes this comes from master branch.
>
> Hi Marek,
>
> Is it:
> A) Comes from master and is a problem on dunfell or
> B) it is reproducible on the master branch?
>
> Given that you said:
>  > I'm getting issue when building tensorflow-estimator (I add small
>  > changes to be able to build this patches on top of dunfell) ...
>
> I suspect it's A only. Right?
>
> What are your small changes.
>
> Hongxu may take a quick look but we generally can't afford to
> investigate all combinations of recipe/branchs as I'm sure you
> can appreciate.
I have done some small changes and now have tensorflow from master
working on top of dunfell. Would you be interested in sharing changes
back and integrate to repo?
>
> If you can reproduce the error on master without or even with your
> changes then that's a different story.
>
> Good luck and Happy New Year!
>
> --
> # Randy MacLeod
> # Wind River Linux

Thanks and BR,

marek
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52087): https://lists.yoctoproject.org/g/yocto/message/52087
Mute This Topic: https://lists.yoctoproject.org/mt/78999764/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Randy MacLeod Jan. 25, 2021, 8:46 p.m.
On 2021-01-25 1:57 p.m., Belisko Marek wrote:
> Hi Randy,
> 
> On Thu, Jan 7, 2021 at 9:47 PM Randy MacLeod
> <randy.macleod@windriver.com> wrote:
>>
>> On 2021-01-07 1:47 p.m., Belisko Marek wrote:
>>>> Marek,
>>>> Does this happen if you use the master branch?
>>> Yes this comes from master branch.
>>
>> Hi Marek,
>>
>> Is it:
>> A) Comes from master and is a problem on dunfell or
>> B) it is reproducible on the master branch?
>>
>> Given that you said:
>>   > I'm getting issue when building tensorflow-estimator (I add small
>>   > changes to be able to build this patches on top of dunfell) ...
>>
>> I suspect it's A only. Right?
>>
>> What are your small changes.
>>
>> Hongxu may take a quick look but we generally can't afford to
>> investigate all combinations of recipe/branchs as I'm sure you
>> can appreciate.
> I have done some small changes and now have tensorflow from master
> working on top of dunfell.

Hi Marek,

That's good to hear!

> Would you be interested in sharing changes
> back and integrate to repo?

I suspect it's not much work to merge the fixes
and maintain the branch, but I'll leave it up to Hongxu.

../Randy


>>
>> If you can reproduce the error on master without or even with your
>> changes then that's a different story.
>>
>> Good luck and Happy New Year!
>>
>> --
>> # Randy MacLeod
>> # Wind River Linux
> 
> Thanks and BR,
> 
> marek
>