From 1e8da97d9deac60bf8d442c899defdff32008d5a Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:35:32 +0900 Subject: [PATCH 01/26] Update tensorflow-datasets --- recipe/meta.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cc17fd6..e7a9824 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,7 +10,7 @@ source: sha256: 0eb74eec3a42af7f78c370796d1aae91fd54f12f0ba631bdf42a0252052fba5e build: - number: 0 + number: 1 noarch: python entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli @@ -19,28 +19,27 @@ build: requirements: host: - pip - - python >=3.7 + - python {{ python_min }} run: + - python >={{ python_min }} - absl-py >=1 - - dill + - click + - dm-tree - etils - - zipp - numpy - promise - protobuf >=3.12.2 + - psutil - requests >=2.19.0 - - wrapt - tensorflow-metadata - termcolor - toml - tqdm - - typing-extensions + - wrapt - importlib_resources + - dill + run_constrained: - tensorflow >=2 - - python >=3.7 - - click - - psutil - - dm-tree test: imports: @@ -50,6 +49,7 @@ test: - pip check requires: - pip + - python {{ python_min }} about: home: https://pypi.org/project/tensorflow-datasets/ @@ -62,3 +62,4 @@ extra: - JennaLipscomb - mxr-conda - ngam + - ehfd From 1d62cdf57c8d9d74b653b7cc5fbb222a1bb86fce Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 07:39:18 +0000 Subject: [PATCH 02/26] MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.03.17.02.20 --- .azure-pipelines/azure-pipelines-linux.yml | 11 ++++---- .ci_support/linux_64_.yaml | 8 ++++-- .gitattributes | 4 +-- .github/CODEOWNERS | 2 +- .gitignore | 26 ++++++++++++++++++- .scripts/build_steps.sh | 26 +++++++++++++------ .scripts/logging_utils.sh | 4 +-- .scripts/run_docker_build.sh | 9 +++++++ README.md | 3 ++- azure-pipelines.yml | 29 ++++++++++++++++++++-- build-locally.py | 21 ++++++++++++---- 11 files changed, 113 insertions(+), 30 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 974e878..1741648 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -11,15 +11,11 @@ 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: {} steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | @@ -30,6 +26,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 6c59082..04ef0e1 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,8 +1,12 @@ cdt_name: -- cos6 +- conda channel_sources: - conda-forge channel_targets: - conda-forge main 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' diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 249dadc..22065bd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @JennaLipscomb @mxr-conda @ngam \ No newline at end of file +* @JennaLipscomb @ehfd @mxr-conda @ngam \ No newline at end of file diff --git a/.gitignore b/.gitignore index c89ecb7..bb38536 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,27 @@ +# User content belongs under recipe/. +# Feedstock configuration goes in `conda-forge.yml` +# Everything else is managed by the conda-smithy rerender process. +# Please do not modify + +# Ignore all files and folders in root +* +!/conda-forge.yml + +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders +!/recipe/** +!/.ci_support/** + +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + *.pyc -build_artifacts +# 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 595f8b5..f8051ab 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,20 +28,23 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC - - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 +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 # 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}" @@ -64,9 +67,16 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --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/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -91,6 +97,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/README.md b/README.md index d0db2c6..1c7f5ac 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance @@ -144,6 +144,7 @@ Feedstock Maintainers ===================== * [@JennaLipscomb](https://github.com/JennaLipscomb/) +* [@ehfd](https://github.com/ehfd/) * [@mxr-conda](https://github.com/mxr-conda/) * [@ngam](https://github.com/ngam/) 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 3f4b7a7..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" @@ -64,8 +74,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) From 4b71d88743df07523828f13ffa6ffb3d6f4ee1e9 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:40:47 +0900 Subject: [PATCH 03/26] Take suggestions --- recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e7a9824..8f7063c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -18,8 +18,9 @@ build: requirements: host: - - pip - python {{ python_min }} + - pip + - setuptools run: - python >={{ python_min }} - absl-py >=1 From beaa59eac53624377dcd7618866fb39d743b80aa Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:47:34 +0900 Subject: [PATCH 04/26] Fix dependency --- recipe/LICENSE | 201 ----------------------------------------------- recipe/meta.yaml | 1 + 2 files changed, 1 insertion(+), 201 deletions(-) delete mode 100644 recipe/LICENSE diff --git a/recipe/LICENSE b/recipe/LICENSE deleted file mode 100644 index 989e2c5..0000000 --- a/recipe/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -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 [yyyy] [name of copyright owner] - - 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. \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8f7063c..83346a4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -27,6 +27,7 @@ requirements: - click - dm-tree - etils + - typing_extensions - numpy - promise - protobuf >=3.12.2 From 9c724ce9c1ab6b3717b8bc5b24c436b6738cec28 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:54:25 +0900 Subject: [PATCH 05/26] Fix tests --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 83346a4..6c48dbf 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -52,6 +52,7 @@ test: requires: - pip - python {{ python_min }} + - tensorflow about: home: https://pypi.org/project/tensorflow-datasets/ From 288a9769751f1c20aabf85bc9e6a0719236fc8ed Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:25:21 +0900 Subject: [PATCH 06/26] Clarify installation --- recipe/meta.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6c48dbf..2c4e185 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ build: noarch: python entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli - script: {{ PYTHON }} -m pip install . -vv + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation requirements: host: @@ -40,8 +40,7 @@ requirements: - wrapt - importlib_resources - dill - run_constrained: - - tensorflow >=2 + - tensorflow >=2.1 test: imports: @@ -52,7 +51,6 @@ test: requires: - pip - python {{ python_min }} - - tensorflow about: home: https://pypi.org/project/tensorflow-datasets/ From 48d1fcf30b60205389b8d229a295b1d550dc10c6 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:30:08 +0900 Subject: [PATCH 07/26] Remove tensorflow pinning --- .ci_support/linux_64_.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 04ef0e1..9964e05 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -8,5 +8,3 @@ docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 python_min: - '3.9' -tensorflow: -- '2.16' From 86a2ba2333e5602052de4e4ff44a3ad271f76147 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 10:33:12 +0000 Subject: [PATCH 08/26] MNT: Re-rendered with conda-build 25.1.1, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.03.17.02.20 --- .ci_support/linux_64_.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 9964e05..04ef0e1 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -8,3 +8,5 @@ docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 python_min: - '3.9' +tensorflow: +- '2.16' From 4b472f8f967ca509bbea76dda28bd78613b0f705 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 01:48:47 +0900 Subject: [PATCH 09/26] Fix dependencies --- recipe/meta.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2c4e185..ac1ae5c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -28,6 +28,9 @@ requirements: - dm-tree - etils - typing_extensions + - fsspec + - importlib_resources + - zipp - numpy - promise - protobuf >=3.12.2 @@ -38,8 +41,7 @@ requirements: - toml - tqdm - wrapt - - importlib_resources - - dill + run_constrained: - tensorflow >=2.1 test: @@ -49,14 +51,17 @@ test: commands: - pip check requires: - - pip - python {{ python_min }} + - pip about: home: https://pypi.org/project/tensorflow-datasets/ summary: tensorflow/datasets is a library of datasets ready to use with TensorFlow. license: Apache-2.0 + license_family: Apache license_file: LICENSE + dev_url: https://github.com/tensorflow/datasets + doc_url: https://www.tensorflow.org/datasets/overview extra: recipe-maintainers: From 8cf0b8abbb52a841a83826f6df98556f14871b07 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 02:33:02 +0900 Subject: [PATCH 10/26] Upgrade to v4.9.7 --- recipe/meta.yaml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ac1ae5c..cbe7186 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "tensorflow-datasets" %} -{% set version = "4.8.3" %} +{% set version = "4.9.7" %} package: name: {{ name|lower }} @@ -7,10 +7,10 @@ package: source: url: https://github.com/tensorflow/datasets/archive/refs/tags/v{{ version }}.tar.gz - sha256: 0eb74eec3a42af7f78c370796d1aae91fd54f12f0ba631bdf42a0252052fba5e + sha256: 918b74f142151a445f90bc72605e7d6837aed241b0759fe55e32ede11b6126ac build: - number: 1 + number: 0 noarch: python entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli @@ -24,18 +24,22 @@ requirements: run: - python >={{ python_min }} - absl-py >=1 + # - array_record >=0.5.0 # [linux] - click - dm-tree - - etils + - etils >=1.9.1 - typing_extensions - fsspec - importlib_resources - zipp + - immutabledict - numpy - promise - - protobuf >=3.12.2 + - protobuf >=3.20 - psutil + - pyarrow - requests >=2.19.0 + - simple-parsing - tensorflow-metadata - termcolor - toml @@ -53,10 +57,22 @@ test: requires: - python {{ python_min }} - pip + - dill + - jax ==0.4.28 + - jupyter + - pytest + - pytest-shard + - pytest-xdist + - apache-beam + - conllu + - mlcroissant >=1.0.9 + - pandas + - pydub + - pyyaml about: home: https://pypi.org/project/tensorflow-datasets/ - summary: tensorflow/datasets is a library of datasets ready to use with TensorFlow. + summary: TensorFlow Datasets is a collection of datasets ready to use, with TensorFlow or other Python ML frameworks, such as Jax. license: Apache-2.0 license_family: Apache license_file: LICENSE From 4fdf6d05ccaa1c6a38d0af4966a6c0f8a92bfba2 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 17:35:53 +0000 Subject: [PATCH 11/26] 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c7f5ac..9a65b4c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,11 @@ Home: https://pypi.org/project/tensorflow-datasets/ Package license: Apache-2.0 -Summary: tensorflow/datasets is a library of datasets ready to use with TensorFlow. +Summary: TensorFlow Datasets is a collection of datasets ready to use, with TensorFlow or other Python ML frameworks, such as Jax. + +Development: https://github.com/tensorflow/datasets + +Documentation: https://www.tensorflow.org/datasets/overview Current build status ==================== From 3f9c829bc23484d27d3cbdb83d90ed1a5288072f Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 03:23:15 +0900 Subject: [PATCH 12/26] Fix tests --- recipe/meta.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cbe7186..0a6387f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -45,6 +45,7 @@ requirements: - toml - tqdm - wrapt + - dill run_constrained: - tensorflow >=2.1 @@ -57,18 +58,6 @@ test: requires: - python {{ python_min }} - pip - - dill - - jax ==0.4.28 - - jupyter - - pytest - - pytest-shard - - pytest-xdist - - apache-beam - - conllu - - mlcroissant >=1.0.9 - - pandas - - pydub - - pyyaml about: home: https://pypi.org/project/tensorflow-datasets/ From 68573c81ffa7a5bec684e26e725b15072cee3cb5 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 03:36:04 +0900 Subject: [PATCH 13/26] Fix build --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0a6387f..483ccc6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -27,7 +27,7 @@ requirements: # - array_record >=0.5.0 # [linux] - click - dm-tree - - etils >=1.9.1 + - etils >=1.6.0 - typing_extensions - fsspec - importlib_resources From 35adfbd1f09c73d64c9aed2023983693b6e02e6b Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 03:45:48 +0900 Subject: [PATCH 14/26] Fix Python 3.9 --- recipe/meta.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 483ccc6..4330d3c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "tensorflow-datasets" %} -{% set version = "4.9.7" %} +{% set version = "4.9.3" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://github.com/tensorflow/datasets/archive/refs/tags/v{{ version }}.tar.gz - sha256: 918b74f142151a445f90bc72605e7d6837aed241b0759fe55e32ede11b6126ac + sha256: 21c0a717ff5eac93a405ddbdb603b69a376e45c7220d24f0bd75a743c2bb5b6c build: number: 0 @@ -27,7 +27,7 @@ requirements: # - array_record >=0.5.0 # [linux] - click - dm-tree - - etils >=1.6.0 + - etils >=0.9.0 - typing_extensions - fsspec - importlib_resources @@ -45,7 +45,6 @@ requirements: - toml - tqdm - wrapt - - dill run_constrained: - tensorflow >=2.1 From 6b63b02b7c21c634200c24f88a8321fd3337a672 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 03:59:12 +0900 Subject: [PATCH 15/26] Replace with PyPi --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4330d3c..61e377c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,8 +6,8 @@ package: version: {{ version }} source: - url: https://github.com/tensorflow/datasets/archive/refs/tags/v{{ version }}.tar.gz - sha256: 21c0a717ff5eac93a405ddbdb603b69a376e45c7220d24f0bd75a743c2bb5b6c + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow_datasets-{{ version }}.tar.gz + sha256: 948d7a68ee693d9709cbfe955f97344b98647e5512e0e42dd2a61f3e7925d68b build: number: 0 From 383a337309c6705e3c912ac0256668e5356e8b8e Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 04:00:34 +0900 Subject: [PATCH 16/26] Fix URL --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 61e377c..ce3d163 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ version }} source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow_datasets-{{ version }}.tar.gz + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow-datasets-{{ version }}.tar.gz sha256: 948d7a68ee693d9709cbfe955f97344b98647e5512e0e42dd2a61f3e7925d68b build: From 1f7896d82aa61ea9720b31b02e30da1a541b3432 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 04:07:05 +0900 Subject: [PATCH 17/26] Fix hash --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ce3d163..78e4069 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,7 +7,7 @@ package: source: url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow-datasets-{{ version }}.tar.gz - sha256: 948d7a68ee693d9709cbfe955f97344b98647e5512e0e42dd2a61f3e7925d68b + sha256: 90390077dde2c9e4e240754ddfc5bb50b482946d421c8a34677c3afdb0463427 build: number: 0 From 61e39fe2f9d4f99632c516144d438d38c46d370e Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:16:59 +0900 Subject: [PATCH 18/26] Add patch --- recipe/meta.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 78e4069..191f5a5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,10 @@ build: noarch: python entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + script: + - {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + # Remove when updated from v4.9.3: https://github.com/tensorflow/datasets/commit/3f27a2c222d5490be6e04ce127152e15af5becb1 + - sed -i 's/^Requires-Dist: array_record.*/Requires-Dist: array_record>=0.5.0; platform_system == "Linux"/' ${SP_DIR}/tensorflow_datasets-${PKG_VERSION}.dist-info/METADATA requirements: host: From ed7a4ff74cd37b52b04875b955844f3cb3702cc1 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 06:11:08 -0800 Subject: [PATCH 19/26] Fix build script --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 191f5a5..5c8d9d7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,10 +14,10 @@ build: noarch: python entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli - script: - - {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + script: | + {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation # Remove when updated from v4.9.3: https://github.com/tensorflow/datasets/commit/3f27a2c222d5490be6e04ce127152e15af5becb1 - - sed -i 's/^Requires-Dist: array_record.*/Requires-Dist: array_record>=0.5.0; platform_system == "Linux"/' ${SP_DIR}/tensorflow_datasets-${PKG_VERSION}.dist-info/METADATA + sed -i 's/^Requires-Dist: array_record.*/Requires-Dist: array_record>=0.5.0; platform_system == "Linux"/' ${SP_DIR}/tensorflow_datasets-${PKG_VERSION}.dist-info/METADATA requirements: host: From efec5e9fbafbba1a15e32f8b44d5ab98fea3aa97 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Thu, 20 Feb 2025 06:15:53 -0800 Subject: [PATCH 20/26] Fix build procedures --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5c8d9d7..f7b84d7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,7 +15,7 @@ build: entry_points: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli script: | - {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + ${PYTHON} -m pip install . -vv --no-deps --no-build-isolation # Remove when updated from v4.9.3: https://github.com/tensorflow/datasets/commit/3f27a2c222d5490be6e04ce127152e15af5becb1 sed -i 's/^Requires-Dist: array_record.*/Requires-Dist: array_record>=0.5.0; platform_system == "Linux"/' ${SP_DIR}/tensorflow_datasets-${PKG_VERSION}.dist-info/METADATA From 81345972934ffb06abb10d4a2f12d126340d186b Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:54:15 +0900 Subject: [PATCH 21/26] Update to recent specs --- recipe/meta.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f7b84d7..d20f346 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "tensorflow-datasets" %} -{% set version = "4.9.3" %} +{% set version = "4.9.9" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow-datasets-{{ version }}.tar.gz - sha256: 90390077dde2c9e4e240754ddfc5bb50b482946d421c8a34677c3afdb0463427 + sha256: 9cb245cad97e7d227f0b8e006491cfef860ff8d4b9d84a3c68f8b96d6295355e build: number: 0 @@ -16,8 +16,6 @@ build: - tfds = tensorflow_datasets.scripts.cli.main:launch_cli script: | ${PYTHON} -m pip install . -vv --no-deps --no-build-isolation - # Remove when updated from v4.9.3: https://github.com/tensorflow/datasets/commit/3f27a2c222d5490be6e04ce127152e15af5becb1 - sed -i 's/^Requires-Dist: array_record.*/Requires-Dist: array_record>=0.5.0; platform_system == "Linux"/' ${SP_DIR}/tensorflow_datasets-${PKG_VERSION}.dist-info/METADATA requirements: host: @@ -27,7 +25,7 @@ requirements: run: - python >={{ python_min }} - absl-py >=1 - # - array_record >=0.5.0 # [linux] + - array_record >=0.5.0 # [linux] - click - dm-tree - etils >=0.9.0 From 02dc340005d445a7123d2dcd3bc730fc87eead95 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 06:56:48 +0000 Subject: [PATCH 22/26] MNT: Re-rendered with conda-build 25.7.0, conda-smithy 3.51.1, and conda-forge-pinning 2025.08.20.02.25.38 --- .azure-pipelines/azure-pipelines-linux.yml | 2 +- .gitattributes | 1 + .gitignore | 2 + .scripts/build_steps.sh | 2 +- .scripts/run_docker_build.sh | 4 +- build-locally.py | 55 ++++++++++++++-------- 6 files changed, 42 insertions(+), 24 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 1741648..8d9608f 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -41,4 +41,4 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.gitattributes b/.gitattributes index 18f114a..85ccb8f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,4 +24,5 @@ bld.bat text eol=crlf /README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true +pixi.toml linguist-generated=true shippable.yml linguist-generated=true diff --git a/.gitignore b/.gitignore index bb38536..47b5408 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ # Rattler-build's artifacts are in `output` when not specifying anything. /output +# Pixi's configuration +.pixi diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index f8051ab..250a5e2 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -94,4 +94,4 @@ fi ( startgroup "Final checks" ) 2> /dev/null -touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 00f377a..b63b5a0 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -12,7 +12,7 @@ source .scripts/logging_utils.sh set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" +PROVIDER_DIR="$(basename "$THISDIR")" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" @@ -111,4 +111,4 @@ docker run ${DOCKER_RUN_ARGS} \ test -f "$DONE_CANARY" # This closes the last group opened in `build_steps.sh` -( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file +( endgroup "Final checks" ) 2> /dev/null diff --git a/build-locally.py b/build-locally.py index c4a56c6..9dfe440 100755 --- a/build-locally.py +++ b/build-locally.py @@ -10,6 +10,7 @@ import os import platform import subprocess +import sys from argparse import ArgumentParser @@ -44,10 +45,19 @@ def run_osx_build(ns): subprocess.check_call([script]) +def run_win_build(ns): + script = ".scripts/run_win_build.bat" + subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"]) + + def verify_config(ns): + choices_filter = ns.filter or "*" valid_configs = { - os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + os.path.basename(f)[:-5] + for f in glob.glob(f".ci_support/{choices_filter}.yaml") } + if choices_filter != "*": + print(f"filtering for '{choices_filter}.yaml' configs") print(f"valid configs are {valid_configs}") if ns.config in valid_configs: print("Using " + ns.config + " configuration") @@ -60,38 +70,43 @@ def verify_config(ns): selections = list(enumerate(sorted(valid_configs), 1)) for i, c in selections: print(f"{i}. {c}") - s = input("\n> ") + try: + s = input("\n> ") + except KeyboardInterrupt: + print("\nno option selected, bye!", file=sys.stderr) + sys.exit(1) idx = int(s) - 1 ns.config = selections[idx][1] print(f"selected {ns.config}") else: raise ValueError("config " + ns.config + " is not valid") - # Remove the following, as implemented - if ns.config.startswith("win"): - raise ValueError( - f"only Linux/macOS configs currently supported, got {ns.config}" + if ( + ns.config.startswith("osx") + and platform.system() == "Darwin" + and not os.environ.get("OSX_SDK_DIR") + ): + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) - elif ns.config.startswith("osx"): - if "OSX_SDK_DIR" not in os.environ: - raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " - "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " - "Note: OSX_SDK_DIR must be set to an absolute path. " - "Setting this variable implies agreement to the licensing terms of the SDK by Apple." - ) def main(args=None): p = ArgumentParser("build-locally") p.add_argument("config", default=None, nargs="?") + p.add_argument( + "--filter", + default=None, + help="Glob string to filter which build choices are presented in interactive mode.", + ) p.add_argument( "--debug", action="store_true", help="Setup debug environment using `conda debug`", ) - p.add_argument( - "--output-id", help="If running debug, specify the output to setup." - ) + p.add_argument("--output-id", help="If running debug, specify the output to setup.") ns = p.parse_args(args=args) verify_config(ns) @@ -104,10 +119,10 @@ def main(args=None): run_docker_build(ns) elif ns.config.startswith("osx"): run_osx_build(ns) + elif ns.config.startswith("win"): + run_win_build(ns) finally: - recipe_license_file = os.path.join( - "recipe", "recipe-scripts-license.txt" - ) + recipe_license_file = os.path.join("recipe", "recipe-scripts-license.txt") if os.path.exists(recipe_license_file): os.remove(recipe_license_file) From 553102656c4bf50ba420251d5ceef57e7ee93684 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:06:53 +0900 Subject: [PATCH 23/26] Re-format for array-record --- recipe/meta.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d20f346..96c4d01 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -25,7 +25,6 @@ requirements: run: - python >={{ python_min }} - absl-py >=1 - - array_record >=0.5.0 # [linux] - click - dm-tree - etils >=0.9.0 @@ -48,13 +47,12 @@ requirements: - wrapt run_constrained: - tensorflow >=2.1 + - array-record >=0.5.0 test: imports: - tensorflow_datasets - tensorflow_datasets.audio - commands: - - pip check requires: - python {{ python_min }} - pip From 154bf50ebdaa168c67aef8032253dafc3c553269 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:13:19 +0900 Subject: [PATCH 24/26] Change typo --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 96c4d01..274a4cc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ version }} source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow-datasets-{{ version }}.tar.gz + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/tensorflow_datasets-{{ version }}.tar.gz sha256: 9cb245cad97e7d227f0b8e006491cfef860ff8d4b9d84a3c68f8b96d6295355e build: From f338843499cf2ae155f53ef387d3289756828bd7 Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:29:38 +0900 Subject: [PATCH 25/26] Constrain Python --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 274a4cc..5e31f3c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,6 @@ {% set name = "tensorflow-datasets" %} {% set version = "4.9.9" %} +{% set python_min = "3.10" %} package: name: {{ name|lower }} From 6d5970593fcfb9de287c48f6634bb8931d17c77e Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:37:31 +0900 Subject: [PATCH 26/26] Add pip list check --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5e31f3c..081877d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -54,6 +54,8 @@ test: imports: - tensorflow_datasets - tensorflow_datasets.audio + commands: + - pip list requires: - python {{ python_min }} - pip