-
-
Notifications
You must be signed in to change notification settings - Fork 82
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 2.7.0 (+ other improvements) #176
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
The diff is pretty busted due to the shuffle with >git show ac888473b051c91db720ff2ba05ab344b1f8809e --patience
commit ac888473b051c91db720ff2ba05ab344b1f8809e
Author: H. Vetinari <[email protected]>
Date: Mon Nov 22 23:27:24 2021 +1100
remove output tensorflow-base; now obsolete since tf-estimator is built here
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index add4358..7ba8de1 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -97,12 +97,18 @@ requirements:
- keras >=2.7,<2.8
outputs:
- - name: tensorflow-base
+ # as of tensorflow 2.7.0, we don't need tensorflow-base anymore;
+ # we still build it as a compatibility output (see below), but the
+ # main package is being built in the "tensorflow" output directly.
+ - name: tensorflow
script: build_pkg.sh # [not win]
script: build_pkg.bat # [win]
build:
string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
+ # weigh down cpu implementation and give cuda preference
+ track_features:
+ - tensorflow-cpu # [cuda_compiler_version == "None"]
entry_points:
- toco_from_protos = tensorflow.lite.toco.python.toco_from_protos:main
- tflite_convert = tensorflow.lite.python.tflite_convert:main
@@ -223,55 +229,16 @@ outputs:
# all packages.
# https://github.com/conda-forge/conda-forge.github.io/issues/1528
- openssl
- - {{ pin_subpackage('tensorflow-base', exact=True) }}
+ - {{ pin_subpackage('tensorflow', exact=True) }}
run:
- python
- - {{ pin_subpackage('tensorflow-base', exact=True) }}
+ - {{ pin_subpackage('tensorflow', exact=True) }}
test:
requires:
- pip
commands:
- pip check
-
- - name: tensorflow
- build:
- string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
- string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
-
- # weigh down cpu implementation and give cuda preference
- track_features:
- - tensorflow-cpu # [cuda_compiler_version == "None"]
-
- requirements:
- build:
- # Keep the other compilers here so as to help solve for the
- # required version of libc
- - {{ compiler('c') }}
- - {{ compiler('cxx') }}
- # Keep the cuda compiler here since it helps package solvers
- # decide on the cuda variant
- # https://github.com/conda-forge/tensorflow-feedstock/issues/162
- - {{ compiler('cuda') }} # [cuda_compiler_version != "None"]
- host:
- - python
- # This ensures that a consistent version of openssl is chosen between
- # all packages.
- # https://github.com/conda-forge/conda-forge.github.io/issues/1528
- - openssl
- - {{ pin_subpackage('tensorflow-base', exact=True) }}
- run:
- - python
- - {{ pin_subpackage('tensorflow-estimator', exact=True) }}
- - {{ pin_subpackage('tensorflow-base', exact=True) }}
- test:
- requires:
- - pip
- imports:
- - tensorflow
- commands:
- - pip check
-
- name: libtensorflow
script: cp_libtensorflow.sh
build: |
a5df2bc
to
1b61331
Compare
@h-vetinari is anyone actively working on the tensorflow-io-gcs-filesystem pkg? It looked easy when I came across it, so I could try to help by giving it a go... or maybe you want to keep it within here? |
might as well give it a go. It doesn't appear like anybody has made a PR yet: |
Okay, will try to do so soon. Desirably, I should follow your build strategy here, right? So that it all follows the same logic... |
Not sure if there is a build strategy to follow. Try to get the CPU version up first. Then we can work on GPU migration. |
Sounds great @ngam! Just link it here once you have a PR and people who want to can provide feedback. |
conda-forge/staged-recipes#17069 I am new to all of this business and so if something looks weird, you're likely right --- keen to hear any and all feedback :) and of course if you think I am slowing things down, you can ignore my pr I am simply trying to follow their dev doc re building... and debugging against the tensorflow-feedstock... |
As part of this pr, can someone look into this? tensorflow-feedstock/recipe/build.sh Line 81 in 3decde5
I think it should be |
tensorflow-feedstock/recipe/build.sh Lines 25 to 46 in 1b61331
Here I think we need to add tensorflow-feedstock/recipe/meta.yaml Line 59 in 1b61331
|
@ngam it seems that |
Thanks for checking; this confirms it. Weirdly, the io repo doesn't seem to have anything like this and it's building the bazelrc in the build steps, it seems. However, to the point, when I tried to invoke Anyway, I underestimated how difficult it is going to be to build the io thingy --- it will likely make more sense to build it as a split here because it depends on tensorflow and the whole thing is confusing (also, in their build docs, they say centos7 defaults are no good and so must be updated??? (see here) maybe that's why I am having much better luck --- while still failing --- locally on an ubuntu 20.04). I will keep trying and see what where I get... stay tuned. |
@@ -79,33 +75,40 @@ requirements: | |||
- zlib | |||
# requirements specified by the package itself, see | |||
# github.com/tensorflow/tensorflow/blob/v{{ version }}/tensorflow/tools/pip_package/setup.py |
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.
Here we should add the new requirement libclang >= 9.0.1
However, I think conda-forge's libclang package is not the same thing as pypi's libclang package.
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.
Yeah, we shouldn't match this particular requirement, because the compilers/runtimes/libs are taken care of much better by conda than by pip anyway.
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.
Then we may add a patch to setup.py
, otherwise pip check
will fail.
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.
Done.
It's possible that we don't need |
That was stupid(ly naïve), but I added a clearer comment about the situation. |
recipe/meta.yaml
Outdated
@@ -304,7 +297,9 @@ outputs: | |||
- snappy | |||
- sqlite | |||
- zlib |
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.
opencl is missing here
I don't understand why this is blocked on tensorflow_io (and related depenency) They are pretty explicit that it isn't a hard requirement (yet) We should be able to move forward without this for now. |
- gast ==0.4.0 | ||
- python-flatbuffers >=1.12,<3 | ||
- six >=1.12 | ||
- tensorflow-io-gcs-filesystem >=0.21.0 |
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 really do not think this is a dependency.
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 for checking upstream, I did not see that this was conditional.
However, I'm almost tempted to open an issue upstream about the circularity with tensorflow-io (if they make it unconditional, as announced).
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.
you should definitely open an issue to raise your concerns.
The thing with For now, I think we should keep |
Maybe OT here, but why does conda have a problem with packages depending on each other? Would it be difficult to fix conda so that it allows packages that have run time dependencies on each other? |
@izahn the pacakges need to be installed at "build" time in the environment so that they are available for compilation. The way that tensorflow is doing it now, is that they:
The problem is, that you now need to build all tensorflow from version "0" to build new dependencies. In short, the runtime dependency doesn't matter so much, as the compile time dependnecy cycle. |
But I don't think |
hmm, let me see if i can remove the build time dependency on |
I'm happy to keep it if it's necessary, or even just if it makes our lives easier. I was only acting on the statement previously that it should be possible to remove now that tf-estimator is being built here. I'd be happy if that was the case (e.g. not a build dep), but it's not a crucial point for me. |
…nda-forge-pinning 2021.12.09.08.18.11
I hope that people aren't being stressed out by me opening this up right after #144 was merged; but given our iteration speed, I wanted to get a head start on this - we also have a new dependency that's not yet in conda-forge, so things are going to take a bit anyway.
Relative to the list in #175 (as of now), the only part that's not done yet is removing the bazel-workarounds from #144.
Shrunk down todo-list:
tensorflow-io-gcs-filesystem
: PyPI githubbazel-toolchain
(see Add cuda support bazel-toolchain-feedstock#5)Closes #162 (hopefully!)
Closes #151