GithubHelp home page GithubHelp logo

conda-forge / tensorflow-probability-feedstock Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 15.0 97 KB

A conda-smithy repository for tensorflow-probability.

License: BSD 3-Clause "New" or "Revised" License

tensorflow-probability-feedstock's Introduction

About tensorflow-probability-feedstock

Feedstock license: BSD-3-Clause

Home: https://www.tensorflow.org/probability/

Package license: Apache-2.0

Summary: TensorFlow Probability is a library for probabilistic reasoning and statistical analysis in TensorFlow

Development: https://github.com/tensorflow/probability

Documentation: https://www.tensorflow.org/probability/overview

TensorFlow Probability is a library for probabilistic reasoning and statistical analysis in TensorFlow. As part of the TensorFlow ecosystem, TensorFlow Probability provides integration of probabilistic methods with deep networks, gradient-based inference via automatic differentiation, and scalability to large datasets and models via hardware acceleration (e.g., GPUs) and distributed computation.

Current build status

All platforms:

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing tensorflow-probability

Installing tensorflow-probability from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, tensorflow-probability can be installed with conda:

conda install tensorflow-probability

or with mamba:

mamba install tensorflow-probability

It is possible to list all of the versions of tensorflow-probability available on your platform with conda:

conda search tensorflow-probability --channel conda-forge

or with mamba:

mamba search tensorflow-probability --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search tensorflow-probability --channel conda-forge

# List packages depending on `tensorflow-probability`:
mamba repoquery whoneeds tensorflow-probability --channel conda-forge

# List dependencies of `tensorflow-probability`:
mamba repoquery depends tensorflow-probability --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating tensorflow-probability-feedstock

If you would like to improve the tensorflow-probability recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/tensorflow-probability-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

tensorflow-probability-feedstock's People

Contributors

adbedada avatar beckermr avatar chrisburr avatar conda-forge-admin avatar conda-forge-curator[bot] avatar djsutherland avatar flferretti avatar jakubsimanek avatar jjhelmus avatar jonas-eschle avatar mariusvniekerk avatar mxr-conda avatar oblute avatar regro-cf-autotick-bot avatar rluria14 avatar sodre avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorflow-probability-feedstock's Issues

Getting recent versions of TFP merged

Issue:
I am trying to build a package that uses tensorflow-probability and depends on conda-forge. I need a more recent version (>0.8) for this work and currently I'm stuck because the PRs opened for more recent versions of TFP have not been merged. I'm not sure if this is the right place for this request, but I was hoping that those PRs could have another look and get merged.


Environment (conda list):
$ conda list


Details about conda and system ( conda info ):
$ conda info

Circular import error when used with `distrax`

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

I'm trying to add distrax to conda-forge (conda-forge/staged-recipes#23973) and the actions fail using tensorflow-probability==0.21.0. In fact, when I try to import distrax I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/distrax/__init__.py", line 18, in <module>
    from distrax._src.bijectors.bijector import Bijector
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/distrax/_src/bijectors/bijector.py", line 27, in <module>
    tfb = tfp.bijectors
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 53, in __getattr__
    module = self._load()
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/tensorflow_probability/python/internal/lazy_loader.py", line 40, in _load
    module = importlib.import_module(self.__name__)
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/tensorflow_probability/substrates/jax/__init__.py", line 41, in <module>
    from tensorflow_probability.substrates.jax import bijectors
ImportError: cannot import name 'bijectors' from partially initialized module 'tensorflow_probability.substrates.jax' (most likely due to a circular import) (/home/flferretti/mambaforge/envs/distrax/lib/python3.10/site-packages/tensorflow_probability/substrates/jax/__init__.py)

After some investigation I found out that it was due to the lack of some files inside substrates/ for the conda-forge version of tfp:

diff -rwx "*.pyc" tensorflow_probability_conda tensorflow_probability_pip | grep -v "test"
Diff Output
Only in tensorflow_probability_conda/python/distributions: discrete_rejection_sampling.py
Only in tensorflow_probability_conda/python/distributions/internal: correlation_matrix_volumes_lib.py
Only in tensorflow_probability_conda/python/distributions/internal: correlation_matrix_volumes.py
Only in tensorflow_probability_conda/python/distributions: vector_exponential_linear_operator.py
Only in tensorflow_probability_conda/python/experimental/mcmc: internal
Only in tensorflow_probability_conda/python/experimental/mcmc: run.py
Only in tensorflow_probability_pip/python/internal/backend: jax
Only in tensorflow_probability_conda/python/mcmc: eight_schools_hmc.py
diff --color -rwx '*.pyc' tensorflow_probability_conda/python/version.py tensorflow_probability_pip/python/version.py
36a37
> if __version__.endswith('dev'): __version__ += '20230804'
Only in tensorflow_probability_pip/substrates/jax: bijectors
Only in tensorflow_probability_pip/substrates/jax: distributions
Only in tensorflow_probability_pip/substrates/jax: experimental
Only in tensorflow_probability_pip/substrates/jax: glm
Only in tensorflow_probability_pip/substrates/jax: internal
Only in tensorflow_probability_pip/substrates/jax: math
Only in tensorflow_probability_pip/substrates/jax: mcmc
Only in tensorflow_probability_pip/substrates/jax: monte_carlo
Only in tensorflow_probability_pip/substrates/jax: optimizer
Only in tensorflow_probability_pip/substrates/jax: random
Only in tensorflow_probability_pip/substrates/jax: stats
Only in tensorflow_probability_pip/substrates/jax: sts
Only in tensorflow_probability_pip/substrates/jax: util
Only in tensorflow_probability_pip/substrates/jax: vi
Only in tensorflow_probability_pip/substrates/numpy: bijectors
Only in tensorflow_probability_pip/substrates/numpy: distributions
Only in tensorflow_probability_pip/substrates/numpy: experimental
Only in tensorflow_probability_pip/substrates/numpy: glm
Only in tensorflow_probability_pip/substrates/numpy: internal
Only in tensorflow_probability_pip/substrates/numpy: math
Only in tensorflow_probability_pip/substrates/numpy: mcmc
Only in tensorflow_probability_pip/substrates/numpy: monte_carlo
Only in tensorflow_probability_pip/substrates/numpy: optimizer
Only in tensorflow_probability_pip/substrates/numpy: random
Only in tensorflow_probability_pip/substrates/numpy: stats
Only in tensorflow_probability_pip/substrates/numpy: sts
Only in tensorflow_probability_pip/substrates/numpy: util
Only in tensorflow_probability_pip/substrates/numpy: vi

The problem is the installation method inside the recipe. In fact, following the instruction from TF for installing from source which I report below for convenience, allows to use distrax without any problem.

python -m pip install --upgrade --user tf-nightly
git clone https://github.com/tensorflow/probability.git
cd probability
bazel build --copt=-O3 --copt=-march=native :pip_pkg
PKGDIR=$(mktemp -d)
./bazel-bin/pip_pkg $PKGDIR
python -m pip install --upgrade --user $PKGDIR/*.whl

Installed packages

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
absl-py                   2.0.0              pyhd8ed1ab_0    conda-forge
aiohttp                   3.8.6           py310h2372a71_1    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.3              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
blinker                   1.6.3              pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310hc6cd4ac_1    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.20.1               hd590300_1    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachetools                5.3.1              pyhd8ed1ab_0    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310h2fee648_0    conda-forge
charset-normalizer        3.3.1              pyhd8ed1ab_0    conda-forge
chex                      0.1.82                   pypi_0    pypi
click                     8.1.7           unix_pyh707e725_0    conda-forge
cloudpickle               3.0.0              pyhd8ed1ab_0    conda-forge
cryptography              41.0.4          py310h75e40e8_0    conda-forge
cuda-version              11.8                 h70ddcb2_2    conda-forge
cudatoolkit               11.8.0              h4ba93d1_12    conda-forge
cudnn                     8.8.0.121            h838ba91_3    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
distrax                   0.1.4                    pypi_0    pypi
dm-tree                   0.1.8           py310hb875b13_0    conda-forge
flatbuffers               23.5.26              h59595ed_1    conda-forge
frozenlist                1.4.0           py310h2372a71_1    conda-forge
gast                      0.5.4              pyhd8ed1ab_0    conda-forge
giflib                    5.2.1                h0b41bf4_3    conda-forge
google-auth               2.23.3             pyhca7485f_0    conda-forge
google-auth-oauthlib      1.0.0              pyhd8ed1ab_1    conda-forge
google-pasta              0.2.0              pyh8c360ce_0    conda-forge
grpcio                    1.54.3          py310heca2aa9_0    conda-forge
h5py                      3.10.0          nompi_py310ha2ad45a_100    conda-forge
hdf5                      1.14.2          nompi_h4f84152_100    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_metadata        6.8.0                hd8ed1ab_0    conda-forge
jax                       0.4.17             pyhd8ed1ab_0    conda-forge
jaxlib                    0.4.14          cpu_py310h67d73b5_1    conda-forge
keras                     2.13.1             pyhd8ed1ab_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libabseil                 20230125.3      cxx17_h59595ed_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libblas                   3.9.0           19_linux64_openblas    conda-forge
libcblas                  3.9.0           19_linux64_openblas    conda-forge
libcurl                   8.4.0                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_2    conda-forge
libgfortran-ng            13.2.0               h69a702a_2    conda-forge
libgfortran5              13.2.0               ha4646dd_2    conda-forge
libgomp                   13.2.0               h807b86a_2    conda-forge
libgrpc                   1.54.3               hb20ce57_0    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           19_linux64_openblas    conda-forge
libnghttp2                1.52.0               h61bc06f_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.24          pthreads_h413a1c8_0    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libprotobuf               3.21.12              hfc55251_2    conda-forge
libsqlite                 3.43.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_2    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
markdown                  3.5                pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py310h2372a71_1    conda-forge
ml_dtypes                 0.3.1           py310hcc13569_2    conda-forge
multidict                 6.0.4           py310h2372a71_1    conda-forge
nccl                      2.19.3.1             h6103f9b_0    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
numpy                     1.26.0          py310hb13e2d6_0    conda-forge
oauthlib                  3.2.2              pyhd8ed1ab_0    conda-forge
openssl                   3.1.3                hd590300_0    conda-forge
opt-einsum                3.3.0                hd8ed1ab_2    conda-forge
opt_einsum                3.3.0              pyhc1e730c_2    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pip                       23.3.1             pyhd8ed1ab_0    conda-forge
protobuf                  4.21.12         py310heca2aa9_0    conda-forge
pyasn1                    0.5.0              pyhd8ed1ab_0    conda-forge
pyasn1-modules            0.3.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_0    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.12         hd12c33a_0_cpython    conda-forge
python-flatbuffers        23.5.26            pyhd8ed1ab_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge
pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
re2                       2023.03.02           h8c504da_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
requests-oauthlib         1.3.1              pyhd8ed1ab_0    conda-forge
rsa                       4.9                pyhd8ed1ab_0    conda-forge
scipy                     1.11.3          py310hb13e2d6_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               h9fff704_0    conda-forge
tensorboard               2.13.0             pyhd8ed1ab_0    conda-forge
tensorboard-data-server   0.7.0           py310h75e40e8_1    conda-forge
tensorflow-base           2.13.1          cuda118py310h0627607_1    conda-forge
tensorflow-probability    0.21.0             pyhd8ed1ab_0    conda-forge
termcolor                 2.3.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h2797004_0    conda-forge
typing-extensions         4.5.0                hd8ed1ab_0    conda-forge
typing_extensions         4.5.0              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.7              pyhd8ed1ab_0    conda-forge
werkzeug                  3.0.0              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
wrapt                     1.15.0          py310h2372a71_1    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yarl                      1.9.2           py310h2372a71_1    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Environment info

active environment : distrax
    active env location : /home/flferretti/mambaforge/envs/distrax
            shell level : 1
       user config file : /home/flferretti/.condarc
 populated config files : /home/flferretti/mambaforge/.condarc
                          /home/flferretti/.condarc
          conda version : 23.7.3
    conda-build version : not installed
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=12.2=0
                          __glibc=2.35=0
                          __linux=6.2.0=0
                          __unix=0=0
       base environment : /home/flferretti/mambaforge  (writable)
      conda av data dir : /home/flferretti/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/flferretti/mambaforge/pkgs
                          /home/flferretti/.conda/pkgs
       envs directories : /home/flferretti/mambaforge/envs
                          /home/flferretti/.conda/envs
               platform : linux-64
             user-agent : conda/23.7.3 requests/2.28.2 CPython/3.10.10 Linux/6.2.0-34-generic ubuntu/22.04.3 glibc/2.35 solver/libmamba conda-libmamba-solver/23.7.0 libmambapy/1.4.9
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Use TFP pip package instead of `pip install .`?

Hi, I'm an engineer on the TFP team. We're collectively not super privy to conda, but appreciate your effort to make TFP available.

I'm concerned the current impl takes an unsupported approach to installing the code (modifying setup.py and running pip install .). It looks like the TensorFlow feedstock just installs the pip package from PyPI. Would you mind changing this one to do the same? As currently implemented, there's a greater risk of confusion about the user's system configuration when, e.g., folks file TFP bugs.

Thanks for your consideration.

Patch metadata on older builds

The loose constraints on tensorflow-base in all builds prior to v0.16.0 lead to environment solves with incompatible versions of tensorflow and tensorflow-probability (see a recent example on StackOverflow). The metadata on these packages should be updated to correct this. That is, declared compatibilities in the Release Notes should be consulted and a patch should be issued via conda-forge-repodata-patches (see docs).

For a concrete example, tensorflow-probability=0.15.0 currently allows tensorflow-base>=2,<3, but should have tensorflow-base=2.7. Some of the early builds (e.g., 0.6.0) don't even include a tensorflow-base dependency.

Can conda-forge include 0.7.0?

Hi,

Can conda-forge include version 0.7.0?

I was told conda-forge's tensorflow is faster than pip's . Is the same speed improvement applied to the tensorflow probability package?

Cheers,

Chen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.