Skip to content

common: Include torch package for s390x #13699

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

Merged
merged 2 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion requirements/requirements-convert_hf_to_gguf.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-r ./requirements-convert_legacy_llama.txt
--extra-index-url https://download.pytorch.org/whl/cpu
torch~=2.2.1
torch~=2.2.1; platform_machine != "s390x"
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] Similarly, a brief inline comment explaining the rationale for the conditional torch dependency on non-s390x platforms could improve clarity for future maintainers.

Copilot uses AI. Check for mistakes.


# torch s390x packages can only be found from nightly builds
--extra-index-url https://download.pytorch.org/whl/nightly
torch>=0.0.0.dev0; platform_machine == "s390x"
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider reviewing and possibly pinning the nightly torch version for s390x if a more stable version becomes available, to ensure predictable dependency behavior.

Copilot uses AI. Check for mistakes.

6 changes: 5 additions & 1 deletion requirements/requirements-convert_hf_to_gguf_update.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-r ./requirements-convert_legacy_llama.txt
--extra-index-url https://download.pytorch.org/whl/cpu
torch~=2.2.1
torch~=2.2.1; platform_machine != "s390x"
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] It may be helpful to briefly note in an inline comment why the torch version is pinned with '~=' for non-s390x platforms, for better clarity on the dependency strategy.

Copilot uses AI. Check for mistakes.


# torch s390x packages can only be found from nightly builds
--extra-index-url https://download.pytorch.org/whl/nightly
torch>=0.0.0.dev0; platform_machine == "s390x"
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] If a stable torch version becomes available for s390x in the future, consider updating this nightly dependency to a pinned version to avoid unexpected updates.

Suggested change
torch>=0.0.0.dev0; platform_machine == "s390x"
torch>=0.0.0.dev0; platform_machine == "s390x" # TODO: Update to a pinned stable version when available

Copilot uses AI. Check for mistakes.

2 changes: 2 additions & 0 deletions requirements/requirements-convert_lora_to_gguf.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-r ./requirements-convert_hf_to_gguf.txt
--extra-index-url https://download.pytorch.org/whl/cpu
# torch s390x packages can only be found from nightly builds
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

Consider expanding this comment to clarify that the nightly extra-index-url is added for transitive dependency resolution on the s390x architecture, even though the torch requirement is not directly specified in this file.

Copilot uses AI. Check for mistakes.

--extra-index-url https://download.pytorch.org/whl/nightly