From 6247f35eea4c8511de416a1a85139ececb58c511 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 11:23:43 +0100 Subject: [PATCH 01/11] recbole 1.2.0 --- README.md | 20 ++--- abs.yaml | 6 ++ pull_request_template.md | 15 ---- recipe/meta.yaml | 79 +++++++++++++++---- .../0001-update-colorlog-pinning.patch | 25 ++++++ 5 files changed, 105 insertions(+), 40 deletions(-) create mode 100644 abs.yaml delete mode 100644 pull_request_template.md create mode 100644 recipe/patches/0001-update-colorlog-pinning.patch diff --git a/README.md b/README.md index 2fd97d8..cd83a0d 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -About -feedstock +About recbole-feedstock ======================= Feedstock license: [BSD-3-Clause](LICENSE) -Home: +Home: https://recbole.io -Package license: +Package license: MIT -Summary: +Summary: RecBole is developed based on Python and PyTorch for reproducing and developing recommendation algorithms in a unified, comprehensive and efficient framework for research purpose. In the first version, our library includes 53 recommendation algorithms, covering four major categories: General Recommendation, Sequential Recommendation, Context-aware Recommendation and Knowledge-based Recommendation. Current release info @@ -15,19 +15,19 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe--green.svg)](https://anaconda.org/anaconda/) | [![Conda Downloads](https://img.shields.io/conda/dn/anaconda/.svg)](https://anaconda.org/anaconda/) | [![Conda Version](https://img.shields.io/conda/vn/anaconda/.svg)](https://anaconda.org/anaconda/) | [![Conda Platforms](https://img.shields.io/conda/pn/anaconda/.svg)](https://anaconda.org/anaconda/) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-recbole-green.svg)](https://anaconda.org/anaconda/recbole) | [![Conda Downloads](https://img.shields.io/conda/dn/anaconda/recbole.svg)](https://anaconda.org/anaconda/recbole) | [![Conda Version](https://img.shields.io/conda/vn/anaconda/recbole.svg)](https://anaconda.org/anaconda/recbole) | [![Conda Platforms](https://img.shields.io/conda/pn/anaconda/recbole.svg)](https://anaconda.org/anaconda/recbole) | -Installing +Installing recbole ================== -Installing `` from the main channel can be achieved by: +Installing `recbole` from the main channel can be achieved by: ``` -conda install +conda install recbole ``` -It is possible to list all of the versions of `` available on your platform with `conda`: +It is possible to list all of the versions of `recbole` available on your platform with `conda`: ``` -conda search +conda search recbole ``` \ No newline at end of file diff --git a/abs.yaml b/abs.yaml new file mode 100644 index 0000000..035ed65 --- /dev/null +++ b/abs.yaml @@ -0,0 +1,6 @@ +upload_channels: + - sfe1ed40 + +channels: + - https://staging.continuum.io/prefect/fs/thop-feedstock/pr1/c390ad0 + - https://staging.continuum.io/prefect/fs/kmeans-pytorch-feedstock/pr1/ec93af2 \ No newline at end of file diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 2bddf19..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,15 +0,0 @@ -{package} {version} {:snowflake:} - -**Destination channel:** {Snowflake | defaults} - -### Links - -- [{ticket_number}]() -- [Upstream repository]() -- [Upstream changelog/diff]() -- Relevant dependency PRs: - - ... - -### Explanation of changes: - -- ... diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9018614..5e29426 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,45 +1,94 @@ -{% set name = "" %} -{% set version = "" %} +{% set name = "recbole" %} +{% set version = "1.2.0" %} package: name: {{ name|lower }} version: {{ version }} source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: + - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/recbole-{{ version }}.tar.gz + sha256: 132a8a706462b26bed82d409b67fbc09e90b3a49b607c7ba76c2f1718d8ddc17 + patches: + - patches/0001-update-colorlog-pinning.patch + # use github release archive for tests + - url: https://github.com/RUCAIBox/RecBole/archive/refs/tags/v{{ version }}.tar.gz + sha256: 1bc77a567083884b41ddd652b9b35078a0c3554c39ca38ab825ab2681eef138e + folder: gh_src build: number: 0 + # s390x: kmeans-pytorch (numba) unavailable + # py>=312: ray unavailable + # skip: True # [py<38 or py>311 or s390x] script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation - skip: True # [py<38] requirements: + build: + - patch # [not win] + - m2-patch # [win] host: - python - pip + - setuptools + - wheel run: - python + - pytorch >=1.10.0 + - numpy >=1.17.2 + - scipy >=1.6.0 + - pandas >=1.3.0 + - tqdm >=4.48.2 + # colorlog pinning relaxed to lower bound instead of exact + # (we have more recent version and it seems to work). + - colorlog >=4.7.2 + - colorama 0.4.4 + - scikit-learn >=0.23.2 + - pyyaml >=5.1.0 + - tensorboard >=2.5.0 + - thop >=0.1.1.post2207130030 + - tabulate >=0.8.10 + - plotly >=4.0.0 + - texttable >=0.9.0 + - psutil >=5.9.0 + - ray-core >=1.13.0,<=2.6.3 + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L51 + - kmeans-pytorch + run_constrained: + - hyperopt 0.2.5 test: imports: - - {{ name.replace('-', '.') }} + - recbole requires: - pip + - pytest + source_files: + - gh_src/run_recbole.py + - gh_src/tests commands: - pip check + - cd gh_src + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L55 + - python run_recbole.py --model=BPR --epochs=2 + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/run_test.sh#L7C1-L7C48 + - python -m pytest -v tests/config/test_config.py + - python -m pytest -v tests/config/test_overall.py about: - home: - summary: + home: https://recbole.io + summary: A unified, comprehensive and efficient recommendation library + license: MIT + license_family: MIT + license_file: LICENSE description: | - - license: - license_family: - license_file: - dev_url: - doc_url: + RecBole is developed based on Python and PyTorch for reproducing and developing + recommendation algorithms in a unified, comprehensive and efficient framework + for research purpose. In the first version, our library includes 53 recommendation + algorithms, covering four major categories: General Recommendation, Sequential + Recommendation, Context-aware Recommendation and Knowledge-based Recommendation. + doc_url: https://recbole.io/docs + dev_url: https://github.com/RUCAIBox/RecBole extra: recipe-maintainers: - - Jrice1317 + - lorepirri diff --git a/recipe/patches/0001-update-colorlog-pinning.patch b/recipe/patches/0001-update-colorlog-pinning.patch new file mode 100644 index 0000000..d73140d --- /dev/null +++ b/recipe/patches/0001-update-colorlog-pinning.patch @@ -0,0 +1,25 @@ +From dc6746147b2d24edb5b0049698facea040c55186 Mon Sep 17 00:00:00 2001 +From: Lorenzo Pirritano +Date: Fri, 1 Nov 2024 11:16:58 +0100 +Subject: [PATCH] update colorlog pinning + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 9fa8cba..8c1334b 100644 +--- a/setup.py ++++ b/setup.py +@@ -12,7 +12,7 @@ install_requires = [ + "scipy>=1.6.0", + "pandas>=1.4.0", + "tqdm>=4.48.2", +- "colorlog==4.7.2", ++ "colorlog>=4.7.2", + "colorama==0.4.4", + "scikit_learn>=0.23.2", + "pyyaml>=5.1.0", +-- +2.39.1 + From fcf8cf08433064e7f15e77a8705d2738b8b22ee2 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 16:22:57 +0100 Subject: [PATCH 02/11] recbole 1.2.0 --- recipe/meta.yaml | 44 +++++++++++++++++-- .../0001-update-colorlog-pinning.patch | 18 ++++---- ...domstate-to-default_rng-for-hyperopt.patch | 32 ++++++++++++++ 3 files changed, 81 insertions(+), 13 deletions(-) create mode 100644 recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5e29426..2f0f8d6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,6 +10,7 @@ source: sha256: 132a8a706462b26bed82d409b67fbc09e90b3a49b607c7ba76c2f1718d8ddc17 patches: - patches/0001-update-colorlog-pinning.patch + - patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch # use github release archive for tests - url: https://github.com/RUCAIBox/RecBole/archive/refs/tags/v{{ version }}.tar.gz sha256: 1bc77a567083884b41ddd652b9b35078a0c3554c39ca38ab825ab2681eef138e @@ -19,7 +20,7 @@ build: number: 0 # s390x: kmeans-pytorch (numba) unavailable # py>=312: ray unavailable - # skip: True # [py<38 or py>311 or s390x] + skip: True # [py<38 or py>311 or s390x] script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation requirements: @@ -35,7 +36,13 @@ requirements: - python - pytorch >=1.10.0 - numpy >=1.17.2 - - scipy >=1.6.0 + # Introduced upper pinning for scipy because of + # https://github.com/RUCAIBox/RecBole/issues/2034 + # https://github.com/RUCAIBox/RecBole/issues/2090 + # similar to any other like + # https://github.com/mmaelicke/scikit-gstat/issues/178 + # it can be removed when issues are closed. + - scipy >=1.6.0,<1.13.0a0 - pandas >=1.3.0 - tqdm >=4.48.2 # colorlog pinning relaxed to lower bound instead of exact @@ -50,11 +57,17 @@ requirements: - plotly >=4.0.0 - texttable >=0.9.0 - psutil >=5.9.0 - - ray-core >=1.13.0,<=2.6.3 + # ray-tune is needed: + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/recbole/quick_start/quick_start.py#L20 + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/conda/meta.yaml#L44 + - ray-tune >=1.13.0,<=2.6.3 # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L51 - kmeans-pytorch run_constrained: - - hyperopt 0.2.5 + # originally ==0.2.5 adapted with a patch + # to work with the more recent version we + # have (0.2.7) + - hyperopt >=0.2.5 test: imports: @@ -62,17 +75,40 @@ test: requires: - pip - pytest + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 + - xgboost + - lightgbm + - faiss + - hyperopt source_files: - gh_src/run_recbole.py - gh_src/tests commands: - pip check - cd gh_src + # Smoke test from the CI # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L55 - python run_recbole.py --model=BPR --epochs=2 + # Tests run as specified in run_test.sh # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/run_test.sh#L7C1-L7C48 + # "python -m pytest" is used instead of "pytest" + # As suggested in + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L52 - python -m pytest -v tests/config/test_config.py - python -m pytest -v tests/config/test_overall.py + # config tests + - python tests/config/test_command_line.py --use_gpu=False --valid_metric=Recall@10 --metrics="['Recall']" --epochs=200 --learning_rate=0.3 + # evaluation_setting tests + - python -m pytest -v tests/evaluation_setting + # model tests + - python -m pytest -v tests/model/test_model_auto.py + # disabled: requires manual intervention + # - python -m pytest -vv tests/model/test_model_manual.py + # data tests + - python -m pytest -v tests/data/test_dataset.py + - python -m pytest -v tests/data/test_dataloader.py + # hyper_tuning tests, require optional dep hyperopt + - python -m pytest -v tests/hyper_tuning/test_hyper_tuning.py about: home: https://recbole.io diff --git a/recipe/patches/0001-update-colorlog-pinning.patch b/recipe/patches/0001-update-colorlog-pinning.patch index d73140d..9d9749d 100644 --- a/recipe/patches/0001-update-colorlog-pinning.patch +++ b/recipe/patches/0001-update-colorlog-pinning.patch @@ -1,7 +1,7 @@ From dc6746147b2d24edb5b0049698facea040c55186 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 11:16:58 +0100 -Subject: [PATCH] update colorlog pinning +Subject: [PATCH 1/2] update colorlog pinning --- setup.py | 2 +- @@ -12,14 +12,14 @@ index 9fa8cba..8c1334b 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ install_requires = [ - "scipy>=1.6.0", - "pandas>=1.4.0", - "tqdm>=4.48.2", -- "colorlog==4.7.2", -+ "colorlog>=4.7.2", - "colorama==0.4.4", - "scikit_learn>=0.23.2", - "pyyaml>=5.1.0", + "scipy>=1.6.0", + "pandas>=1.4.0", + "tqdm>=4.48.2", +- "colorlog==4.7.2", ++ "colorlog>=4.7.2", + "colorama==0.4.4", + "scikit_learn>=0.23.2", + "pyyaml>=5.1.0", -- 2.39.1 diff --git a/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch new file mode 100644 index 0000000..72a2c36 --- /dev/null +++ b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch @@ -0,0 +1,32 @@ +From 609847dbc848e8d8f9babc3534e34dc74d6d78b1 Mon Sep 17 00:00:00 2001 +From: Lorenzo Pirritano +Date: Fri, 1 Nov 2024 16:06:00 +0100 +Subject: [PATCH 2/2] update RandomState to default_rng for hyperopt + +Fixes: +'numpy.random.mtrand.RandomState' object has no attribute 'integers' + +For using new hyperopt 0.2.7 rather than the one set by upstream 0.2.5. + +See: https://github.com/hyperopt/hyperopt/issues/838 + +--- + recbole/trainer/hyper_tuning.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/recbole/trainer/hyper_tuning.py b/recbole/trainer/hyper_tuning.py +index ee1cfd6..cad9a65 100644 +--- a/recbole/trainer/hyper_tuning.py ++++ b/recbole/trainer/hyper_tuning.py +@@ -113,7 +113,7 @@ def exhaustive_search(new_ids, domain, trials, seed, nbMaxSucessiveFailures=1000 + ] + ) + +- rng = np.random.RandomState(seed) ++ rng = np.random.default_rng(seed) + rval = [] + for _, new_id in enumerate(new_ids): + newSample = False +-- +2.39.1 + From b40a7763852b387f4e14e5f67f4230dde311e2ce Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 16:38:20 +0100 Subject: [PATCH 03/11] CRLF line endings of patch file --- .gitattributes | 1 + ...domstate-to-default_rng-for-hyperopt.patch | 67 ++++++++++--------- 2 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..434eade --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch text eol=crlf \ No newline at end of file diff --git a/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch index 72a2c36..5f302ac 100644 --- a/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch +++ b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch @@ -1,32 +1,35 @@ -From 609847dbc848e8d8f9babc3534e34dc74d6d78b1 Mon Sep 17 00:00:00 2001 -From: Lorenzo Pirritano -Date: Fri, 1 Nov 2024 16:06:00 +0100 -Subject: [PATCH 2/2] update RandomState to default_rng for hyperopt - -Fixes: -'numpy.random.mtrand.RandomState' object has no attribute 'integers' - -For using new hyperopt 0.2.7 rather than the one set by upstream 0.2.5. - -See: https://github.com/hyperopt/hyperopt/issues/838 - ---- - recbole/trainer/hyper_tuning.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/recbole/trainer/hyper_tuning.py b/recbole/trainer/hyper_tuning.py -index ee1cfd6..cad9a65 100644 ---- a/recbole/trainer/hyper_tuning.py -+++ b/recbole/trainer/hyper_tuning.py -@@ -113,7 +113,7 @@ def exhaustive_search(new_ids, domain, trials, seed, nbMaxSucessiveFailures=1000 - ] - ) - -- rng = np.random.RandomState(seed) -+ rng = np.random.default_rng(seed) - rval = [] - for _, new_id in enumerate(new_ids): - newSample = False --- -2.39.1 - +From 609847dbc848e8d8f9babc3534e34dc74d6d78b1 Mon Sep 17 00:00:00 2001 +From: Lorenzo Pirritano +Date: Fri, 1 Nov 2024 16:06:00 +0100 +Subject: [PATCH 2/2] update RandomState to default_rng for hyperopt + +NB this patch file must have CRLF line endings because the source file + that patches has CRLF line endings. This is achieved in .gitattributes + +Fixes: +'numpy.random.mtrand.RandomState' object has no attribute 'integers' + +For using new hyperopt 0.2.7 rather than the one set by upstream 0.2.5. + +See: https://github.com/hyperopt/hyperopt/issues/838 + +--- + recbole/trainer/hyper_tuning.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/recbole/trainer/hyper_tuning.py b/recbole/trainer/hyper_tuning.py +index ee1cfd6..cad9a65 100644 +--- a/recbole/trainer/hyper_tuning.py ++++ b/recbole/trainer/hyper_tuning.py +@@ -113,7 +113,7 @@ def exhaustive_search(new_ids, domain, trials, seed, nbMaxSucessiveFailures=1000 + ] + ) + +- rng = np.random.RandomState(seed) ++ rng = np.random.default_rng(seed) + rval = [] + for _, new_id in enumerate(new_ids): + newSample = False +-- +2.39.1 + From 78f7d9d21bd35564a65a813137313f511f102242 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 17:05:47 +0100 Subject: [PATCH 04/11] try again CRLF --- .gitattributes | 2 +- .../0002-update-randomstate-to-default_rng-for-hyperopt.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 434eade..cc5610a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch text eol=crlf \ No newline at end of file +0002-update-randomstate-to-default_rng-for-hyperopt.patch eol=crlf \ No newline at end of file diff --git a/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch index 5f302ac..cfbcda9 100644 --- a/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch +++ b/recipe/patches/0002-update-randomstate-to-default_rng-for-hyperopt.patch @@ -5,7 +5,7 @@ Subject: [PATCH 2/2] update RandomState to default_rng for hyperopt NB this patch file must have CRLF line endings because the source file that patches has CRLF line endings. This is achieved in .gitattributes - + Fixes: 'numpy.random.mtrand.RandomState' object has no attribute 'integers' From 3074bd9ce375899b97d89e3642f9d3d6c0873c28 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Fri, 1 Nov 2024 17:08:53 +0100 Subject: [PATCH 05/11] set CRLF for patch 0001 --- .gitattributes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index cc5610a..8e07179 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -0002-update-randomstate-to-default_rng-for-hyperopt.patch eol=crlf \ No newline at end of file +0001-update-colorlog-pinning.patch eol=crlf +0002-update-randomstate-to-default_rng-for-hyperopt.patch eol=crlf From f69c8f388299b7047b2d548eea25be817bc3df9d Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Mon, 4 Nov 2024 16:30:01 +0100 Subject: [PATCH 06/11] update staging channels --- abs.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/abs.yaml b/abs.yaml index 035ed65..d25ceec 100644 --- a/abs.yaml +++ b/abs.yaml @@ -2,5 +2,6 @@ upload_channels: - sfe1ed40 channels: - - https://staging.continuum.io/prefect/fs/thop-feedstock/pr1/c390ad0 - - https://staging.continuum.io/prefect/fs/kmeans-pytorch-feedstock/pr1/ec93af2 \ No newline at end of file + - https://staging.continuum.io/prefect/fs/thop-feedstock/pr1/99ca078 + - https://staging.continuum.io/prefect/fs/kmeans-pytorch-feedstock/pr1/7b96899 + - https://staging.continuum.io/prefect/fs/setproctitle-feedstock/pr1/daa8b86 \ No newline at end of file From 4f4950b0d57bd2372d73c272e7d1970246a85e2b Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Mon, 4 Nov 2024 17:48:07 +0100 Subject: [PATCH 07/11] add vv for pytest --- recipe/meta.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2f0f8d6..27d5a29 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -94,21 +94,21 @@ test: # "python -m pytest" is used instead of "pytest" # As suggested in # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L52 - - python -m pytest -v tests/config/test_config.py - - python -m pytest -v tests/config/test_overall.py + - python -m pytest -vv tests/config/test_config.py + - python -m pytest -vv tests/config/test_overall.py # config tests - python tests/config/test_command_line.py --use_gpu=False --valid_metric=Recall@10 --metrics="['Recall']" --epochs=200 --learning_rate=0.3 # evaluation_setting tests - - python -m pytest -v tests/evaluation_setting + - python -m pytest -vv tests/evaluation_setting # model tests - - python -m pytest -v tests/model/test_model_auto.py + - python -m pytest -vv tests/model/test_model_auto.py # disabled: requires manual intervention # - python -m pytest -vv tests/model/test_model_manual.py # data tests - - python -m pytest -v tests/data/test_dataset.py - - python -m pytest -v tests/data/test_dataloader.py + - python -m pytest -vv tests/data/test_dataset.py + - python -m pytest -vv tests/data/test_dataloader.py # hyper_tuning tests, require optional dep hyperopt - - python -m pytest -v tests/hyper_tuning/test_hyper_tuning.py + - python -m pytest -vv tests/hyper_tuning/test_hyper_tuning.py about: home: https://recbole.io From b92597394eda7f952485e1af87a35df5ca5ef103 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Mon, 4 Nov 2024 17:48:40 +0100 Subject: [PATCH 08/11] add blas=* =openblas for osx-64 --- recipe/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 27d5a29..9c6fb3c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -68,6 +68,8 @@ requirements: # to work with the more recent version we # have (0.2.7) - hyperopt >=0.2.5 + # mkl variant pulls in intel-openmp which conflicts with llvm-openmp. i.e. force to use openblas variant of numpy, scipy, etc. + - blas=* =openblas # [osx and x86_64] test: imports: From 0cae381855094df0fef4ef2b18c0b3ba4ff4c25a Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Wed, 13 Nov 2024 20:07:40 +0100 Subject: [PATCH 09/11] fix tests --- recipe/meta.yaml | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9c6fb3c..a9db0b4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -61,15 +61,39 @@ requirements: # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/recbole/quick_start/quick_start.py#L20 # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/conda/meta.yaml#L44 - ray-tune >=1.13.0,<=2.6.3 - # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L51 + # The following dependencies are specified in the CI + # and it's not clear if they are mandatory or not. + # We contacted the upstream authors but received no answer, + # therefore we decided to set those dependencies as + # runtime dependencies and ship most of the recommenders + # except KGAT (missing 'dgl'), KGIN, and MCCLK (missing + # 'torch-scatter'). + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 - kmeans-pytorch - run_constrained: + - xgboost + - lightgbm + - faiss-cpu + - networkx + - protobuf #3.19.0 # originally ==0.2.5 adapted with a patch # to work with the more recent version we # have (0.2.7) - hyperopt >=0.2.5 - # mkl variant pulls in intel-openmp which conflicts with llvm-openmp. i.e. force to use openblas variant of numpy, scipy, etc. - - blas=* =openblas # [osx and x86_64] + +# skip tests KGIN and MCCLK recommenders (they use +# torch-scatter, unavailable) +{% set tests_to_skip = "test_kgin" %} +{% set tests_to_skip = tests_to_skip + " or test_mcclk" %} +# skip tests KGAT recommenders (they use dgl, unavailable) +{% set tests_to_skip = tests_to_skip + " or test_kgat" %} +# faiss-cpu not available for some MKL issue for py 3.8 on osx-64 +# https://github.com/AnacondaRecipes/faiss-split-feedstock/blob/main/recipe/meta.yaml#L112 +# also, this problem occurs for osx-64 on "from . import _swigfaiss" then "_mkl_blas_caxpy" +# is not found: +# https://github.com/facebookresearch/faiss/issues/1755 +# https://discourse.cmake.org/t/mkl-64lp-versus-64ilp-difficulties/1223 +{% set tests_to_skip = tests_to_skip + " or test_NCL" %} # [osx and x86_64] + test: imports: @@ -77,11 +101,6 @@ test: requires: - pip - pytest - # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 - - xgboost - - lightgbm - - faiss - - hyperopt source_files: - gh_src/run_recbole.py - gh_src/tests @@ -103,13 +122,13 @@ test: # evaluation_setting tests - python -m pytest -vv tests/evaluation_setting # model tests - - python -m pytest -vv tests/model/test_model_auto.py + - python -m pytest -vv tests/model/test_model_auto.py -k "not ({{ tests_to_skip }})" # disabled: requires manual intervention # - python -m pytest -vv tests/model/test_model_manual.py # data tests - python -m pytest -vv tests/data/test_dataset.py - python -m pytest -vv tests/data/test_dataloader.py - # hyper_tuning tests, require optional dep hyperopt + # hyper_tuning tests - python -m pytest -vv tests/hyper_tuning/test_hyper_tuning.py about: From 4709f14ce6534c5561fecb2ba6dad8c522b6407e Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Mon, 30 Dec 2024 12:48:34 +0100 Subject: [PATCH 10/11] finalize recipe with latest info from upstream --- recipe/meta.yaml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a9db0b4..c6128f6 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -61,30 +61,17 @@ requirements: # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/recbole/quick_start/quick_start.py#L20 # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/conda/meta.yaml#L44 - ray-tune >=1.13.0,<=2.6.3 - # The following dependencies are specified in the CI - # and it's not clear if they are mandatory or not. - # We contacted the upstream authors but received no answer, - # therefore we decided to set those dependencies as - # runtime dependencies and ship most of the recommenders - # except KGAT (missing 'dgl'), KGIN, and MCCLK (missing - # 'torch-scatter'). - # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 - - kmeans-pytorch - - xgboost - - lightgbm - - faiss-cpu - - networkx - - protobuf #3.19.0 + run_constrained: # originally ==0.2.5 adapted with a patch # to work with the more recent version we # have (0.2.7) - hyperopt >=0.2.5 # skip tests KGIN and MCCLK recommenders (they use -# torch-scatter, unavailable) +# torch-scatter, optional and unavailable) {% set tests_to_skip = "test_kgin" %} {% set tests_to_skip = tests_to_skip + " or test_mcclk" %} -# skip tests KGAT recommenders (they use dgl, unavailable) +# skip tests KGAT recommenders (they use dgl, optional and unavailable) {% set tests_to_skip = tests_to_skip + " or test_kgat" %} # faiss-cpu not available for some MKL issue for py 3.8 on osx-64 # https://github.com/AnacondaRecipes/faiss-split-feedstock/blob/main/recipe/meta.yaml#L112 @@ -93,6 +80,7 @@ requirements: # https://github.com/facebookresearch/faiss/issues/1755 # https://discourse.cmake.org/t/mkl-64lp-versus-64ilp-difficulties/1223 {% set tests_to_skip = tests_to_skip + " or test_NCL" %} # [osx and x86_64] +{% set tests_to_skip = tests_to_skip + " or TestSequentialRecommender" %} # [osx or (linux and aarch64)] test: @@ -101,6 +89,21 @@ test: requires: - pip - pytest + - hyperopt + # The following dependencies are specified in the CI + # and they are optional. + # We contacted the upstream authors and they seem optional: + # https://github.com/RUCAIBox/RecBole/issues/2105#issuecomment-2559262386 + # Most of the recommenders are available optionally + # except KGAT (missing 'dgl'), KGIN, and MCCLK (missing + # 'torch-scatter'). + # https://github.com/RUCAIBox/RecBole/blob/v1.2.0/.github/workflows/python-package.yml#L36-L51 + - kmeans-pytorch + - xgboost + - lightgbm + - faiss-cpu + - networkx + - protobuf #3.19.0 source_files: - gh_src/run_recbole.py - gh_src/tests From 755f4d353cc3437dd7e1a8d8b440bfcee318d739 Mon Sep 17 00:00:00 2001 From: Lorenzo Pirritano Date: Mon, 30 Dec 2024 13:57:00 +0100 Subject: [PATCH 11/11] remove staging channels --- abs.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/abs.yaml b/abs.yaml index d25ceec..1ed0d29 100644 --- a/abs.yaml +++ b/abs.yaml @@ -1,7 +1,2 @@ upload_channels: - sfe1ed40 - -channels: - - https://staging.continuum.io/prefect/fs/thop-feedstock/pr1/99ca078 - - https://staging.continuum.io/prefect/fs/kmeans-pytorch-feedstock/pr1/7b96899 - - https://staging.continuum.io/prefect/fs/setproctitle-feedstock/pr1/daa8b86 \ No newline at end of file