Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgboost 2.1.1 fix #20

Merged
merged 4 commits into from
Aug 19, 2024
Merged

xgboost 2.1.1 fix #20

merged 4 commits into from
Aug 19, 2024

Conversation

lorepirri
Copy link

@lorepirri lorepirri commented Aug 13, 2024

xgboost 2.1.1 fix

Destination channel: defaults

Links

Explanation of changes:

  • fix pip check

Notes for the reviewers

  • pip 24.2 seems to introduce a check on the tag within the wheel file.

  • WHEEL content for osx-arm64:

    Wheel-Version: 1.0
    Generator: hatchling 1.21.1
    Root-Is-Purelib: true
    Tag: py3-none-macosx_11_1_arm64
    
  • compatible tags for the platform:

    ['macosx_13_0_arm64', 'macosx_13_0_universal2', 'macosx_12_0_arm64', 'macosx_12_0_universal2', 'macosx_11_0_arm64', 'macosx_11_0_universal2', 'macosx_10_16_universal2', 'macosx_10_15_universal2', 'macosx_10_14_universal2', 'macosx_10_13_universal2', 'macosx_10_12_universal2', 'macosx_10_11_universal2', 'macosx_10_10_universal2', 'macosx_10_9_universal2', 'macosx_10_8_universal2', 'macosx_10_7_universal2', 'macosx_10_6_universal2', 'macosx_10_5_universal2', 'macosx_10_4_universal2']
    
  • there is no macosx_11_1_arm64 and the pip check fails https://github.com/pypa/pip/blob/e98cc5ce078d8c8afd6804ff4e61aa2b12d05715/src/pip/_internal/commands/check.py#L29-L34

What the internet says

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_e7dteiw572/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:36: host_section_needs_exact_pinnings: output "libxgboost": Linked libraries host should have exact version pinnings.

===== ERRORS =====

  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "xgboost": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "py-xgboost-cpu": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:84: missing_test_requirement_pip: pip is required in the test requirements.
  • clone/recipe/meta.yaml:89: has_run_test_and_commands: output "py-xgboost": Test commands are not executed when run_test.sh (.bat...) is present.
  • clone/recipe/meta.yaml:83: missing_test_requirement_pip: pip is required in the test requirements.
  • clone/recipe/meta.yaml:1: missing_tests: output "xgboost": No tests were found.
  • clone/recipe/meta.yaml:125: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
  • clone/recipe/meta.yaml:0: missing_section: output "_py-xgboost-mutex": The requirements section is missing.
  • clone/recipe/meta.yaml:77: version_constraints_missing_whitespace: output "py-xgboost": Packages and their version constraints must be space separated
  • clone/recipe/meta.yaml:1: missing_tests: output "py-xgboost-cpu": No tests were found.
    ===== Final Report: =====
    10 Errors and 1 Warning were found

@lorepirri
Copy link
Author

@cbouss @danpetry do you think that the upper bound for pip <24.2 could be a viable solution, or better build it with the 11_0?

recipe/meta.yaml Outdated
@@ -64,7 +64,7 @@ outputs:
- m2-patch # [win]
host:
- python
- pip
- pip <24.2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- pip <24.2
- pip

This issue is only affecting pip check, no?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right!
removed

recipe/meta.yaml Outdated
@@ -79,7 +79,7 @@ outputs:
- pandas >=1.2
test:
requires:
- pip
- pip <24.2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. Another option is to or true the pip check call.
A comment as to why would help though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I added the upper bound pinning only for osx-arm64, and added a comment

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_ddyxn4v_y_/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:36: host_section_needs_exact_pinnings: output "libxgboost": Linked libraries host should have exact version pinnings.

===== ERRORS =====

  • clone/recipe/meta.yaml:1: missing_tests: output "xgboost": No tests were found.
  • clone/recipe/meta.yaml:96: has_run_test_and_commands: output "py-xgboost": Test commands are not executed when run_test.sh (.bat...) is present.
  • clone/recipe/meta.yaml:90: missing_test_requirement_pip: pip is required in the test requirements.
  • clone/recipe/meta.yaml:1: missing_tests: output "py-xgboost-cpu": No tests were found.
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "xgboost": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:132: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "py-xgboost-cpu": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:0: missing_section: output "_py-xgboost-mutex": The requirements section is missing.
    ===== Final Report: =====
    8 Errors and 1 Warning were found

@danpetry
Copy link

That seems fine. I wonder if this is going to affect all other packages and we need to find some wider solution? Maybe patch out the check in pip, or put an upper bound in for all packages in the test section?

@lorepirri
Copy link
Author

That seems fine. I wonder if this is going to affect all other packages and we need to find some wider solution? Maybe patch out the check in pip, or put an upper bound in for all packages in the test section?

I wonder the same. Also, this is failing on osx-arm64 but other feedstocks not.

It is probably due to how the wheel is created and the tag in it is set (in this case py3-none-macosx_11_1_arm64). As far as I understand from the issues and PRs, the idea of pip for apple, was to flatten the version to macosx_11_0 for all of the 11.x.

@JeanChristopheMorinPerso

In this specific case, we could probably just fix xgboost. I'd prefer that we actually fix the source of the problem instead of working around it. Remobing https://github.com/dmlc/xgboost/blob/v2.1.1/python-package/pyproject.toml#L48 should fix the issue.

@lorepirri
Copy link
Author

lorepirri commented Aug 13, 2024

In this specific case, we could probably just fix xgboost. I'd prefer that we actually fix the source of the problem instead of working around it. Remobing https://github.com/dmlc/xgboost/blob/v2.1.1/python-package/pyproject.toml#L48 should fix the issue.

Ah, that runs https://github.com/dmlc/xgboost/blob/9c9db1259240bffe9040ed7ca6e3fb2c1bda80e4/python-package/hatch_build.py#L15 and sets the tag to a wrong value. Thanks nice catch!

@JeanChristopheMorinPerso

We should also flag that problem upstream.

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_47mqtbaio_/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:37: host_section_needs_exact_pinnings: output "libxgboost": Linked libraries host should have exact version pinnings.

===== ERRORS =====

  • clone/recipe/meta.yaml:1: missing_tests: output "xgboost": No tests were found.
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "py-xgboost-cpu": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:0: missing_section: output "_py-xgboost-mutex": The requirements section is missing.
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "xgboost": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:126: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
  • clone/recipe/meta.yaml:1: missing_tests: output "py-xgboost-cpu": No tests were found.
  • clone/recipe/meta.yaml:90: has_run_test_and_commands: output "py-xgboost": Test commands are not executed when run_test.sh (.bat...) is present.
    ===== Final Report: =====
    7 Errors and 1 Warning were found

pip check would fail with:
"xgboost 2.1.1 requires nccl, which is not installed."
remove the requirement nvidia-nccl-cu12 because we
are not building for CUDA.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor: even if we did, we would still need to remove it from the metadata since we don't ship that package. nvidia-nccl-cu12 is specific to the python/PyPI ecosystem and doesn't map to anything in our ecosystem, at least not in this form.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the comment, thanks!

@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_f5aleri6d8/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:37: host_section_needs_exact_pinnings: output "libxgboost": Linked libraries host should have exact version pinnings.

===== ERRORS =====

  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "py-xgboost-cpu": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:126: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
  • clone/recipe/meta.yaml:1: missing_tests: output "xgboost": No tests were found.
  • clone/recipe/meta.yaml:1: missing_tests: output "py-xgboost-cpu": No tests were found.
  • clone/recipe/meta.yaml:90: has_run_test_and_commands: output "py-xgboost": Test commands are not executed when run_test.sh (.bat...) is present.
  • clone/recipe/meta.yaml:0: missing_section: output "_py-xgboost-mutex": The requirements section is missing.
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "xgboost": Python packages require imports or a python test file in tests.
    ===== Final Report: =====
    7 Errors and 1 Warning were found

@lorepirri lorepirri merged commit 6d19732 into master Aug 19, 2024
7 of 8 checks passed
@lorepirri lorepirri deleted the PKG-5352-xgboost-2_1_1-fix branch August 19, 2024 13:21
@anaconda-pkg-build
Copy link

Linter check found the following problems: ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_c0nub9j09t/clone` failed. (See above for error) The following problems have been found:

===== WARNINGS =====

  • clone/recipe/meta.yaml:37: host_section_needs_exact_pinnings: output "libxgboost": Linked libraries host should have exact version pinnings.

===== ERRORS =====

  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "xgboost": Python packages require imports or a python test file in tests.
  • clone/recipe/meta.yaml:1: missing_tests: output "xgboost": No tests were found.
  • clone/recipe/meta.yaml:0: missing_section: output "_py-xgboost-mutex": The requirements section is missing.
  • clone/recipe/meta.yaml:1: missing_tests: output "py-xgboost-cpu": No tests were found.
  • clone/recipe/meta.yaml:90: has_run_test_and_commands: output "py-xgboost": Test commands are not executed when run_test.sh (.bat...) is present.
  • clone/recipe/meta.yaml:126: invalid_url: https://xgboost.readthedocs.io/ : Not reachable: 403
  • clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "py-xgboost-cpu": Python packages require imports or a python test file in tests.
    ===== Final Report: =====
    7 Errors and 1 Warning were found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants