From ab440d126c9a69f6b09f1f7e5660b1d14971ad83 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 22:56:19 +0900 Subject: [PATCH 01/21] Update tensorflow-probability --- recipe/meta.yaml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 76fb376..69837b1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "tensorflow-probability" %} -{% set version = "0.24.0" %} +{% set version = "0.25.0" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/tensorflow/probability/archive/v{{ version }}.tar.gz - sha256: 3d75418cef09ea357ee879347133ab784fe4637a5ba251a8e06ef930dd970a3e + sha256: 73cf3e52d3b5ee48fc919631e7fa3621849b8ce8d453017016a5148815856bc2 patches: - 0001-always-build-release.patch @@ -16,32 +16,38 @@ build: number: 0 script: - bazel build :pip_pkg - - mkdir tmp-pkg + - mkdir -p tmp-pkg - ./bazel-bin/pip_pkg tmp-pkg - "{{ PYTHON }} -m pip install --upgrade --no-deps -vv tmp-pkg/*.whl" requirements: build: - {{ compiler('c') }} + - {{ stdlib("c") }} - {{ compiler('cxx') }} - - bazel + - bazel 6.* host: - - python >=3.9 + - python {{ python_min }} - pip + - setuptools - absl-py run: - - python >=3.9 - - tensorflow-base >=2.16.0, <2.17.0 - - tf-keras >=2.16 # required as TFP only supports Keras2, see https://github.com/tensorflow/probability/blob/v0.24.0/setup.py#L51 - - jax >=0.4.25, <0.5.0 - - numpy >=1.13.3 + - python >={{ python_min }} - absl-py - six >=1.10.0 + - numpy >=1.13.3 - decorator - cloudpickle >=1.3 - gast >=0.3.2 - dm-tree + run_constrained: + - tensorflow >=2.16.0 + - tf-keras >=2.16 # Required as TFP only supports Keras 2 + - tensorflow-datasets >= 2.2.0 + - jax >=0.4.35 test: + requires: + - python {{ python_min }} imports: - tensorflow_probability - tensorflow_probability.substrates.jax @@ -72,3 +78,4 @@ extra: - oblute - rluria14 - jonas-eschle + - ehfd From d10addbc10b795683b0418f3ab1dfaeda77d1244 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:59:24 +0000 Subject: [PATCH 02/21] MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.04.19.34.29 --- .azure-pipelines/azure-pipelines-linux.yml | 2 +- .ci_support/linux_64_.yaml | 16 +++++++++--- .github/CODEOWNERS | 2 +- .gitignore | 3 +++ .scripts/build_steps.sh | 18 ++++++++++---- README.md | 1 + azure-pipelines.yml | 29 ++++++++++++++++++++-- build-locally.py | 16 +++++++++--- 8 files changed, 71 insertions(+), 16 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 875d996..1741648 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -11,7 +11,7 @@ jobs: linux_64_: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index d3f3f33..2b1361a 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,9 +1,13 @@ c_compiler: - gcc c_compiler_version: -- '12' +- '13' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: -- cos6 +- conda channel_sources: - conda-forge channel_targets: @@ -11,9 +15,13 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '13' docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 +python_min: +- '3.9' +tensorflow: +- '2.16' zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3c13bda..1cd756d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @adbedada @jonas-eschle @mxr-conda @oblute @rluria14 @sodre \ No newline at end of file +* @adbedada @ehfd @jonas-eschle @mxr-conda @oblute @rluria14 @sodre \ No newline at end of file diff --git a/.gitignore b/.gitignore index 179afe5..bb38536 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ /build_artifacts *.pyc + +# Rattler-build's artifacts are in `output` when not specifying anything. +/output diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 2f3df6c..f8051ab 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,18 +31,20 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -69,6 +71,12 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/README.md b/README.md index a9f4dbb..b249c8f 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ Feedstock Maintainers ===================== * [@adbedada](https://github.com/adbedada/) +* [@ehfd](https://github.com/ehfd/) * [@jonas-eschle](https://github.com/jonas-eschle/) * [@mxr-conda](https://github.com/mxr-conda/) * [@oblute](https://github.com/oblute/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad85a2c..d309e84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,5 +2,30 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index e0d408d..c4a56c6 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,16 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): @@ -23,6 +26,13 @@ def setup_environment(ns): os.path.dirname(__file__), "miniforge3" ) + # The default cache location might not be writable using docker on macOS. + if ns.config.startswith("linux") and platform.system() == "Darwin": + os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = ( + os.environ.get("CONDA_FORGE_DOCKER_RUN_ARGS", "") + + " -e RATTLER_CACHE_DIR=/tmp/rattler_cache" + ) + def run_docker_build(ns): script = ".scripts/run_docker_build.sh" From 4aabd7366af26406f74fbed91166fc6b967c5ed8 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:16:43 +0900 Subject: [PATCH 03/21] Avoid Bazel when possible --- recipe/0001-always-build-release.patch | 14 -------------- recipe/meta.yaml | 25 +++++++++---------------- 2 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 recipe/0001-always-build-release.patch diff --git a/recipe/0001-always-build-release.patch b/recipe/0001-always-build-release.patch deleted file mode 100644 index 9ec466f..0000000 --- a/recipe/0001-always-build-release.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/setup.py b/setup.py ---- a/setup.py -+++ b/setup.py -@@ -39,9 +39,8 @@ REQUIRED_PACKAGES = [ - 'numpy >= 1.13.3', - ] - --if '--release' in sys.argv: -+if True: - release = True -- sys.argv.remove('--release') - else: - # Build a nightly package by default. - release = False diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 69837b1..5481668 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,30 +6,19 @@ package: version: {{ version }} source: - url: https://github.com/tensorflow/probability/archive/v{{ version }}.tar.gz - sha256: 73cf3e52d3b5ee48fc919631e7fa3621849b8ce8d453017016a5148815856bc2 - patches: - - 0001-always-build-release.patch + url: https://pypi.org/packages/py2.py3/t/tensorflow-probability/tensorflow_probability-{{ version }}-py2.py3-none-any.whl + sha256: f3f4d6431656c0122906888afe1b67b4400e82bd7f254b45b92e6c5b84ea8e3e build: noarch: python number: 0 - script: - - bazel build :pip_pkg - - mkdir -p tmp-pkg - - ./bazel-bin/pip_pkg tmp-pkg - - "{{ PYTHON }} -m pip install --upgrade --no-deps -vv tmp-pkg/*.whl" + script: {{ PYTHON }} -m pip install -vv --no-deps --no-build-isolation tensorflow_probability-{{ version }}-py2.py3-none-any.whl + requirements: - build: - - {{ compiler('c') }} - - {{ stdlib("c") }} - - {{ compiler('cxx') }} - - bazel 6.* host: - python {{ python_min }} - pip - setuptools - - absl-py run: - python >={{ python_min }} - absl-py @@ -42,12 +31,16 @@ requirements: run_constrained: - tensorflow >=2.16.0 - tf-keras >=2.16 # Required as TFP only supports Keras 2 - - tensorflow-datasets >= 2.2.0 + - tensorflow-datasets >=2.2.0 - jax >=0.4.35 test: requires: - python {{ python_min }} + - tensorflow >=2.16.0 + - tf-keras >=2.16 + - tensorflow-datasets >=2.2.0 + - jax >=0.4.35 imports: - tensorflow_probability - tensorflow_probability.substrates.jax From f1b8c65d367c87a563e7f41ed718d7e03147c943 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:19:17 +0000 Subject: [PATCH 04/21] MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.04.19.34.29 --- .ci_support/linux_64_.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 2b1361a..04ef0e1 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,27 +1,12 @@ -c_compiler: -- gcc -c_compiler_version: -- '13' -c_stdlib: -- sysroot -c_stdlib_version: -- '2.17' cdt_name: - conda channel_sources: - conda-forge channel_targets: - conda-forge main -cxx_compiler: -- gxx -cxx_compiler_version: -- '13' docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 python_min: - '3.9' tensorflow: - '2.16' -zip_keys: -- - c_compiler_version - - cxx_compiler_version From abc47c7593ce8cdbc1f2a5dd38e136a938e4eaec Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:24:09 +0900 Subject: [PATCH 05/21] JAX does not have a specific version range --- recipe/meta.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5481668..0322909 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -32,7 +32,8 @@ requirements: - tensorflow >=2.16.0 - tf-keras >=2.16 # Required as TFP only supports Keras 2 - tensorflow-datasets >=2.2.0 - - jax >=0.4.35 + - jax + - jaxlib test: requires: @@ -40,7 +41,8 @@ test: - tensorflow >=2.16.0 - tf-keras >=2.16 - tensorflow-datasets >=2.2.0 - - jax >=0.4.35 + - jax + - jaxlib imports: - tensorflow_probability - tensorflow_probability.substrates.jax From 0f9dec813ee88f8b1c4435189611bb64d213fafe Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:26:08 +0900 Subject: [PATCH 06/21] Change recipe --- recipe/meta.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0322909..8b70d66 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -32,8 +32,6 @@ requirements: - tensorflow >=2.16.0 - tf-keras >=2.16 # Required as TFP only supports Keras 2 - tensorflow-datasets >=2.2.0 - - jax - - jaxlib test: requires: From 01d88c1c3778c83b4e094d18c5e91749491c6b49 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:33:27 +0900 Subject: [PATCH 07/21] Create LICENSE --- recipe/LICENSE | 419 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 419 insertions(+) create mode 100644 recipe/LICENSE diff --git a/recipe/LICENSE b/recipe/LICENSE new file mode 100644 index 0000000..2565f1c --- /dev/null +++ b/recipe/LICENSE @@ -0,0 +1,419 @@ +Copyright 2018 The TensorFlow Probability Authors. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018, The TensorFlow Probability Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +------------------------------------------------------------------------ + +A file in TensorFlow Probability is also covered by the following license and +copyright. + +Files: + - tensorflow_probability/python/distributions/pixel_cnn.py + +Copyright 2019 OpenAI (http://openai.com) + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 OpenAI (http://openai.com) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + From 6d33d28194c5bd78726b355ce6b82607f6129555 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:41:42 +0900 Subject: [PATCH 08/21] Add checking mechanism --- recipe/meta.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8b70d66..0b2a7a2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,6 +34,12 @@ requirements: - tensorflow-datasets >=2.2.0 test: + command: + - pip check + imports: + - tensorflow_probability + - tensorflow_probability.substrates.jax + - tensorflow_probability.substrates.numpy requires: - python {{ python_min }} - tensorflow >=2.16.0 @@ -41,10 +47,6 @@ test: - tensorflow-datasets >=2.2.0 - jax - jaxlib - imports: - - tensorflow_probability - - tensorflow_probability.substrates.jax - - tensorflow_probability.substrates.numpy about: home: https://www.tensorflow.org/probability/ From 1a502d92931dd5af4f0e870c80aaf6801948c044 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:45:39 +0900 Subject: [PATCH 09/21] Fix typo --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0b2a7a2..7e7394d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,7 +34,7 @@ requirements: - tensorflow-datasets >=2.2.0 test: - command: + commands: - pip check imports: - tensorflow_probability From ff67b18ac31c8edf5d60d055d00f7756d5659542 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 5 Feb 2025 23:54:19 +0900 Subject: [PATCH 10/21] Fix test --- recipe/meta.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7e7394d..4160f64 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,19 +34,20 @@ requirements: - tensorflow-datasets >=2.2.0 test: - commands: - - pip check - imports: - - tensorflow_probability - - tensorflow_probability.substrates.jax - - tensorflow_probability.substrates.numpy requires: - python {{ python_min }} + - pip - tensorflow >=2.16.0 - tf-keras >=2.16 - tensorflow-datasets >=2.2.0 - jax - jaxlib + commands: + - pip check + imports: + - tensorflow_probability + - tensorflow_probability.substrates.jax + - tensorflow_probability.substrates.numpy about: home: https://www.tensorflow.org/probability/ From 23c68ca0189f59569bd86ff4e0aae7b9e50c98ed Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 01:14:42 +0900 Subject: [PATCH 11/21] Include tf-keras in mandatory dependencies --- recipe/meta.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4160f64..db27c9b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,17 +28,16 @@ requirements: - cloudpickle >=1.3 - gast >=0.3.2 - dm-tree - run_constrained: - tensorflow >=2.16.0 - - tf-keras >=2.16 # Required as TFP only supports Keras 2 + # Required as TFP only supports Keras 2 + - tf-keras >=2.16 + run_constrained: - tensorflow-datasets >=2.2.0 test: requires: - python {{ python_min }} - pip - - tensorflow >=2.16.0 - - tf-keras >=2.16 - tensorflow-datasets >=2.2.0 - jax - jaxlib From bae03d23eb4b70fae312fe4e906a07abfee77616 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 01:26:07 +0900 Subject: [PATCH 12/21] Modify URL --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index db27c9b..714b741 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -49,7 +49,7 @@ test: - tensorflow_probability.substrates.numpy about: - home: https://www.tensorflow.org/probability/ + home: https://pypi.org/project/tensorflow-probability/ license: Apache-2.0 license_family: Apache license_file: LICENSE From 366557ab8148d5f1fbbf71a0e027e6fef40cff85 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 16:32:22 +0000 Subject: [PATCH 13/21] MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.04.19.34.29 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b249c8f..8cf2322 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ About tensorflow-probability-feedstock Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/tensorflow-probability-feedstock/blob/main/LICENSE.txt) -Home: https://www.tensorflow.org/probability/ +Home: https://pypi.org/project/tensorflow-probability/ Package license: Apache-2.0 From 89a76d683d36a6f9bbb944c0f3785cd49cba738a Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:29:31 +0900 Subject: [PATCH 14/21] Edit as per suggestions --- recipe/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 714b741..90cad39 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,10 +28,11 @@ requirements: - cloudpickle >=1.3 - gast >=0.3.2 - dm-tree + run_constrained: + # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib (without version constraints) - tensorflow >=2.16.0 - # Required as TFP only supports Keras 2 + # Required with TensorFlow as this package only supports Keras 2 - tf-keras >=2.16 - run_constrained: - tensorflow-datasets >=2.2.0 test: From 06654c6ca6299c1d2f02033dc0519a338c2bd47d Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Sat, 8 Feb 2025 01:47:58 +0900 Subject: [PATCH 15/21] Dependency to tensorflow-base Co-authored-by: Jonas Eschle --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 90cad39..70320ef 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -30,7 +30,7 @@ requirements: - dm-tree run_constrained: # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib (without version constraints) - - tensorflow >=2.16.0 + - tensorflow-base >=2.16.0 # Required with TensorFlow as this package only supports Keras 2 - tf-keras >=2.16 - tensorflow-datasets >=2.2.0 From 9d0c5e37f3b88f7b1185eb043f673281a9507b3d Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Sat, 15 Feb 2025 05:04:26 +0900 Subject: [PATCH 16/21] Tighten version --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 70320ef..9055448 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -30,9 +30,9 @@ requirements: - dm-tree run_constrained: # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib (without version constraints) - - tensorflow-base >=2.16.0 - # Required with TensorFlow as this package only supports Keras 2 - - tf-keras >=2.16 + # tf-keras is required with TensorFlow as this package only supports Keras 2 + - tensorflow-base >=2.18.0,<2.19.0 + - tf-keras >=2.18 - tensorflow-datasets >=2.2.0 test: From e769a74b9a39a2ffe34728e0b752d2154b579b62 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Sat, 15 Feb 2025 05:11:56 +0900 Subject: [PATCH 17/21] Add JAX constraint --- recipe/meta.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9055448..da013d9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -29,17 +29,20 @@ requirements: - gast >=0.3.2 - dm-tree run_constrained: - # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib (without version constraints) - # tf-keras is required with TensorFlow as this package only supports Keras 2 + # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib + # TensorFlow backend requires tf-keras as this package only supports Keras 2 - tensorflow-base >=2.18.0,<2.19.0 - tf-keras >=2.18 - tensorflow-datasets >=2.2.0 + - jax >=0.4.35,<0.5.0 test: requires: - python {{ python_min }} - pip - - tensorflow-datasets >=2.2.0 + - tensorflow-base + - tf-keras + - tensorflow-datasets - jax - jaxlib commands: From 1d75b2bdeeb39ffd53f3d0ac4b7e3ffb4c4295bb Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 03:26:06 -0800 Subject: [PATCH 18/21] Relieve version constraints --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index da013d9..9a0b0ec 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -31,10 +31,10 @@ requirements: run_constrained: # Optional dependencies: tensorflow and tf-keras / tensorflow-datasets / jax and jaxlib # TensorFlow backend requires tf-keras as this package only supports Keras 2 - - tensorflow-base >=2.18.0,<2.19.0 - - tf-keras >=2.18 + - tensorflow-base >=2.18.0 + - tf-keras >=2.18.0 - tensorflow-datasets >=2.2.0 - - jax >=0.4.35,<0.5.0 + - jax >=0.4.35 test: requires: From 676ae00962687924e2b56219ea2198ee96937e60 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 03:56:31 -0800 Subject: [PATCH 19/21] Revert constraints for JAX --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9a0b0ec..8add06e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,7 +34,7 @@ requirements: - tensorflow-base >=2.18.0 - tf-keras >=2.18.0 - tensorflow-datasets >=2.2.0 - - jax >=0.4.35 + - jax >=0.4.35,<0.5.0 test: requires: From fae601521d940b1a084a288b271288b2d0b1e75a Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 04:57:45 -0800 Subject: [PATCH 20/21] Ease upward constraints again --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8add06e..9a0b0ec 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -34,7 +34,7 @@ requirements: - tensorflow-base >=2.18.0 - tf-keras >=2.18.0 - tensorflow-datasets >=2.2.0 - - jax >=0.4.35,<0.5.0 + - jax >=0.4.35 test: requires: From 781e2dba25a92c61e9e11fcf8472aa5acc172188 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 05:16:02 -0800 Subject: [PATCH 21/21] Fix JAX tests --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9a0b0ec..e84b803 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -38,13 +38,13 @@ requirements: test: requires: - - python {{ python_min }} + # JAX is only available with Python >=3.10, but Python 3.9 should work with other backends + - python 3.10 - pip - tensorflow-base - tf-keras - tensorflow-datasets - jax - - jaxlib commands: - pip check imports: