From 26b621cec3415bbdb6879b1aeaef5d0bb53181d1 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Wed, 22 Nov 2023 05:59:42 +0000 Subject: [PATCH 1/3] Refreshed to 0.16.1 --- config/build-config.yaml | 4 ++-- {text-0.15 => text-0.16.1}/recipe/0101-disable-tcmalloc.patch | 0 {text-0.15 => text-0.16.1}/recipe/build.sh | 0 {text-0.15 => text-0.16.1}/recipe/meta.yaml | 2 +- {text-0.15 => text-0.16.1}/recipe/open-ce-info.yaml | 0 {text-0.15 => text-0.16.1}/variants/meta.yaml | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename {text-0.15 => text-0.16.1}/recipe/0101-disable-tcmalloc.patch (100%) rename {text-0.15 => text-0.16.1}/recipe/build.sh (100%) rename {text-0.15 => text-0.16.1}/recipe/meta.yaml (98%) rename {text-0.15 => text-0.16.1}/recipe/open-ce-info.yaml (100%) rename {text-0.15 => text-0.16.1}/variants/meta.yaml (97%) diff --git a/config/build-config.yaml b/config/build-config.yaml index 48814fb..df4cf82 100644 --- a/config/build-config.yaml +++ b/config/build-config.yaml @@ -7,8 +7,8 @@ recipes: path : text-0.11/variants {% else %} - name : torchtext-base - path : text-0.15/recipe + path : text-0.16.1/recipe - name : torchtext-meta - path : text-0.15/variants + path : text-0.16.1/variants {% endif %} diff --git a/text-0.15/recipe/0101-disable-tcmalloc.patch b/text-0.16.1/recipe/0101-disable-tcmalloc.patch similarity index 100% rename from text-0.15/recipe/0101-disable-tcmalloc.patch rename to text-0.16.1/recipe/0101-disable-tcmalloc.patch diff --git a/text-0.15/recipe/build.sh b/text-0.16.1/recipe/build.sh similarity index 100% rename from text-0.15/recipe/build.sh rename to text-0.16.1/recipe/build.sh diff --git a/text-0.15/recipe/meta.yaml b/text-0.16.1/recipe/meta.yaml similarity index 98% rename from text-0.15/recipe/meta.yaml rename to text-0.16.1/recipe/meta.yaml index 7619b0a..762460f 100644 --- a/text-0.15/recipe/meta.yaml +++ b/text-0.16.1/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "torchtext-base" %} -{% set version = "0.15.2" %} +{% set version = "0.16.1" %} package: name: "{{ name|lower }}" diff --git a/text-0.15/recipe/open-ce-info.yaml b/text-0.16.1/recipe/open-ce-info.yaml similarity index 100% rename from text-0.15/recipe/open-ce-info.yaml rename to text-0.16.1/recipe/open-ce-info.yaml diff --git a/text-0.15/variants/meta.yaml b/text-0.16.1/variants/meta.yaml similarity index 97% rename from text-0.15/variants/meta.yaml rename to text-0.16.1/variants/meta.yaml index b24ee25..f78b2d4 100644 --- a/text-0.15/variants/meta.yaml +++ b/text-0.16.1/variants/meta.yaml @@ -1,6 +1,6 @@ # A metapackge for installing GPU or CPU versions of torchtext explicitly -{% set version = "0.15.2" %} +{% set version = "0.16.1" %} package: name: torchtext{{ '-cpu' if build_type == 'cpu' else '' }} From b0d5a8828efd5a4e801dd73d86d510a4c100cf00 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Fri, 8 Dec 2023 10:55:37 +0000 Subject: [PATCH 2/3] Removed text for 11.2 --- config/build-config.yaml | 8 --- text-0.11/recipe/0101-disable-tcmalloc.patch | 14 ----- text-0.11/recipe/build.sh | 39 ------------- text-0.11/recipe/meta.yaml | 59 -------------------- text-0.11/recipe/open-ce-info.yaml | 16 ------ text-0.11/variants/meta.yaml | 32 ----------- 6 files changed, 168 deletions(-) delete mode 100644 text-0.11/recipe/0101-disable-tcmalloc.patch delete mode 100644 text-0.11/recipe/build.sh delete mode 100644 text-0.11/recipe/meta.yaml delete mode 100644 text-0.11/recipe/open-ce-info.yaml delete mode 100644 text-0.11/variants/meta.yaml diff --git a/config/build-config.yaml b/config/build-config.yaml index df4cf82..0d5111f 100644 --- a/config/build-config.yaml +++ b/config/build-config.yaml @@ -1,14 +1,6 @@ recipes: -{% if build_type == 'cuda' and cudatoolkit == '11.2' %} - - name : torchtext-base - path : text-0.11/recipe - - - name : torchtext-meta - path : text-0.11/variants -{% else %} - name : torchtext-base path : text-0.16.1/recipe - name : torchtext-meta path : text-0.16.1/variants -{% endif %} diff --git a/text-0.11/recipe/0101-disable-tcmalloc.patch b/text-0.11/recipe/0101-disable-tcmalloc.patch deleted file mode 100644 index e9e22cd..0000000 --- a/text-0.11/recipe/0101-disable-tcmalloc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/build_tools/setup_helpers/extension.py b/build_tools/setup_helpers/extension.py -index f3a2097..a7de77b 100644 ---- a/build_tools/setup_helpers/extension.py -+++ b/build_tools/setup_helpers/extension.py -@@ -143,7 +143,8 @@ def _build_sentence_piece(debug): - else: - extra_args = [] - subprocess.run( -- args=['cmake', '-DSPM_ENABLE_SHARED=OFF', f'-DCMAKE_INSTALL_PREFIX={_TP_INSTALL_DIR}', -+ args=['cmake', '-DSPM_ENABLE_TCMALLOC=OFF', '-DSPM_ENABLE_SHARED=OFF', -+ f'-DCMAKE_INSTALL_PREFIX={_TP_INSTALL_DIR}', - '-DCMAKE_CXX_FLAGS=' + _get_cxx11_abi(), - f'-DCMAKE_BUILD_TYPE={config}'] + extra_args + ['..'], - cwd=str(build_dir), diff --git a/text-0.11/recipe/build.sh b/text-0.11/recipe/build.sh deleted file mode 100644 index aa0c782..0000000 --- a/text-0.11/recipe/build.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# ***************************************************************** -# (C) Copyright IBM Corp. 2019, 2021. All Rights Reserved. -# -# 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. -# ***************************************************************** - -set -ex - -if [[ $ppc_arch == "p10" ]] -then - if [[ -z "${GCC_11_HOME}" ]]; - then - echo "Please set GCC_11_HOME to the install path of gcc-toolset-11" - exit 1 - else - export CMAKE_PREFIX_PATH=$PREFIX - export GCC_AR=$GCC_11_HOME/bin/ar - # Removing Anaconda supplied libstdc++.so so that generated libs build against - # libstdc++.so present on the system provided by gcc-toolset-11 - rm ${PREFIX}/lib/libstdc++.so* - rm ${BUILD_PREFIX}/lib/libstdc++.so* - fi -fi - -PYTHON_VERSION=$(python -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2) -PACKAGE_PATH=$PREFIX/lib/python${PYTHON_VERSION}/site-packages/ - -python setup.py install --single-version-externally-managed --record=record.txt diff --git a/text-0.11/recipe/meta.yaml b/text-0.11/recipe/meta.yaml deleted file mode 100644 index c8395ab..0000000 --- a/text-0.11/recipe/meta.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{% set name = "torchtext-base" %} -{% set version = "0.11.2" %} - -package: - name: "{{ name|lower }}" - version: "{{ version }}" - -source: - git_url: https://github.com/pytorch/text.git - git_rev: v{{ version }} - patches: - # 01xx - patch is specific to open-ce and will always be carried forward and not upstreamed - - 0101-disable-tcmalloc.patch - -build: - number: 2 - string: {{ build_type }}_py{{ python | replace(".", "") }}_{{ PKG_BUILDNUM }} #[build_type == 'cpu'] - string: {{ build_type }}{{ cudatoolkit | replace(".*", "") }}_py{{ python | replace(".", "") }}_{{ PKG_BUILDNUM }} #[build_type == 'cuda'] - script_env: #[ppc_arch == 'p10'] - - GCC_11_HOME #[ppc_arch == 'p10'] - -requirements: - build: - - {{ compiler('cxx') }} #[ppc_arch != "p10"] - - cmake {{ cmake }} - - make - - patch - host: - - python {{ python }} - - _pytorch_select {{ pytorch_select_version }} - - pytorch-base {{ pytorch }} - run: - - numpy {{ numpy }} - - python {{ python }} - - _pytorch_select {{ pytorch_select_version }} - - pytorch-base {{ pytorch }} - - requests {{ requests }} - - tqdm {{ tqdm }} - - sentencepiece {{ sentencepiece }} - -test: - imports: - - torchtext - - torchtext.data - - torchtext.datasets - -about: - home: https://github.com/pytorch/text - license: BSD - license_family: BSD - license_file: LICENSE - summary: Text utilities and datasets for PyTorch - description: Text utilities and datasets for PyTorch - doc_url: https://torchtext.readthedocs.io/en/latest/ - dev_url: https://github.com/pytorch/text/ - -extra: - recipe-maintainers: - - open-ce/open-ce-dev-team diff --git a/text-0.11/recipe/open-ce-info.yaml b/text-0.11/recipe/open-ce-info.yaml deleted file mode 100644 index f73ab1e..0000000 --- a/text-0.11/recipe/open-ce-info.yaml +++ /dev/null @@ -1,16 +0,0 @@ -third_party_packages: -- name: double-conversion - license: BSD-3-Clause - url: - - https://github.com/google/double-conversion.git - version: b1d531b -- name: re2 - license: BSD-3-Clause - url: - - https://github.com/google/re2.git - version: 2b25567 -- name: sentencepiece - license: Apache License - url: - - https://github.com/google/sentencepiece.git - version: e8a84a1 diff --git a/text-0.11/variants/meta.yaml b/text-0.11/variants/meta.yaml deleted file mode 100644 index 592e657..0000000 --- a/text-0.11/variants/meta.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# A metapackge for installing GPU or CPU versions of torchtext explicitly - -{% set version = "0.11.2" %} - -package: - name: torchtext{{ '-cpu' if build_type == 'cpu' else '' }} - version: {{ version }} - -build: - number: 1 - string: py{{ python | replace(".", "") }}_{{ PKG_BUILDNUM }} #[build_type == 'cpu'] - string: {{ build_type }}{{ cudatoolkit | replace(".*", "") }}_py{{ python | replace(".", "") }}_{{ PKG_BUILDNUM }} #[build_type == 'cuda'] - -requirements: - run: - - pytorch-base {{ pytorch }} - - _pytorch_select {{ pytorch_select_version }} - - torchtext-base {{ torchtext }} - - python {{ python }} - -about: - home: http://pytorch.org/ - license: BSD 3-Clause - license_family: BSD - summary: Meta-package to install torchtext variant for {{ 'GPU-enabled' if build_type == 'cuda' else 'CPU-only' }} pytorch - description: Meta-package to install torchtext varaint for {{ 'GPU-enabled' if build_type == 'cuda' else 'CPU-only' }} pytorch - dev_url: https://github.com/pytorch/text - doc_url: https://pytorch.org/text/stable/index.html - -extra: - recipe-maintainers: - - open-ce/open-ce-dev-team From 2218c2646a4d90306e9a6f84cea0a28e62a54bc1 Mon Sep 17 00:00:00 2001 From: Aman-Surkar Date: Tue, 2 Jan 2024 12:07:35 +0000 Subject: [PATCH 3/3] Updated to v0.16.2 --- config/build-config.yaml | 4 ++-- .../recipe/0101-disable-tcmalloc.patch | 0 {text-0.16.1 => text-0.16.2}/recipe/build.sh | 0 {text-0.16.1 => text-0.16.2}/recipe/meta.yaml | 2 +- {text-0.16.1 => text-0.16.2}/recipe/open-ce-info.yaml | 0 {text-0.16.1 => text-0.16.2}/variants/meta.yaml | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename {text-0.16.1 => text-0.16.2}/recipe/0101-disable-tcmalloc.patch (100%) rename {text-0.16.1 => text-0.16.2}/recipe/build.sh (100%) rename {text-0.16.1 => text-0.16.2}/recipe/meta.yaml (98%) rename {text-0.16.1 => text-0.16.2}/recipe/open-ce-info.yaml (100%) rename {text-0.16.1 => text-0.16.2}/variants/meta.yaml (97%) diff --git a/config/build-config.yaml b/config/build-config.yaml index 0d5111f..d694abc 100644 --- a/config/build-config.yaml +++ b/config/build-config.yaml @@ -1,6 +1,6 @@ recipes: - name : torchtext-base - path : text-0.16.1/recipe + path : text-0.16.2/recipe - name : torchtext-meta - path : text-0.16.1/variants + path : text-0.16.2/variants diff --git a/text-0.16.1/recipe/0101-disable-tcmalloc.patch b/text-0.16.2/recipe/0101-disable-tcmalloc.patch similarity index 100% rename from text-0.16.1/recipe/0101-disable-tcmalloc.patch rename to text-0.16.2/recipe/0101-disable-tcmalloc.patch diff --git a/text-0.16.1/recipe/build.sh b/text-0.16.2/recipe/build.sh similarity index 100% rename from text-0.16.1/recipe/build.sh rename to text-0.16.2/recipe/build.sh diff --git a/text-0.16.1/recipe/meta.yaml b/text-0.16.2/recipe/meta.yaml similarity index 98% rename from text-0.16.1/recipe/meta.yaml rename to text-0.16.2/recipe/meta.yaml index 762460f..5fc0446 100644 --- a/text-0.16.1/recipe/meta.yaml +++ b/text-0.16.2/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "torchtext-base" %} -{% set version = "0.16.1" %} +{% set version = "0.16.2" %} package: name: "{{ name|lower }}" diff --git a/text-0.16.1/recipe/open-ce-info.yaml b/text-0.16.2/recipe/open-ce-info.yaml similarity index 100% rename from text-0.16.1/recipe/open-ce-info.yaml rename to text-0.16.2/recipe/open-ce-info.yaml diff --git a/text-0.16.1/variants/meta.yaml b/text-0.16.2/variants/meta.yaml similarity index 97% rename from text-0.16.1/variants/meta.yaml rename to text-0.16.2/variants/meta.yaml index f78b2d4..8581d5b 100644 --- a/text-0.16.1/variants/meta.yaml +++ b/text-0.16.2/variants/meta.yaml @@ -1,6 +1,6 @@ # A metapackge for installing GPU or CPU versions of torchtext explicitly -{% set version = "0.16.1" %} +{% set version = "0.16.2" %} package: name: torchtext{{ '-cpu' if build_type == 'cpu' else '' }}