Skip to content

Conversation

iofu728
Copy link
Collaborator

@iofu728 iofu728 commented Jun 17, 2025

What does this PR do?

Fixes release yaml torch version.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@iofu728

@iofu728 iofu728 requested a review from Copilot June 17, 2025 05:36
@iofu728 iofu728 self-assigned this Jun 17, 2025
@iofu728 iofu728 added the bug Something isn't working label Jun 17, 2025
@iofu728 iofu728 merged commit 417d5ba into main Jun 17, 2025
1 check passed
@iofu728 iofu728 deleted the hjiang/fix_release_torch_version branch June 17, 2025 05:36
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the PyTorch installation script in the GitHub workflows to fix the torch version mapping for release builds.

  • Updated the minimum and maximum CUDA version mappings to reflect new MATRIX_TORCH_VERSION values.
  • Removed older version keys and introduced newer ones to align with updated release targets.

Comment on lines +23 to +24
minv = {'2.4': 118, '2.5': 118, '2.6': 118, '2.7': 118}[env['MATRIX_TORCH_VERSION']]; \
maxv = {'2.4': 124, '2.5': 124, '2.6': 126, '2.7': 128}[env['MATRIX_TORCH_VERSION']]; \
Copy link
Preview

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

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

Consider adding error handling for unexpected MATRIX_TORCH_VERSION values to prevent a potential KeyError during dictionary lookup.

Suggested change
minv = {'2.4': 118, '2.5': 118, '2.6': 118, '2.7': 118}[env['MATRIX_TORCH_VERSION']]; \
maxv = {'2.4': 124, '2.5': 124, '2.6': 126, '2.7': 128}[env['MATRIX_TORCH_VERSION']]; \
torch_versions_min = {'2.4': 118, '2.5': 118, '2.6': 118, '2.7': 118}; \
torch_versions_max = {'2.4': 124, '2.5': 124, '2.6': 126, '2.7': 128}; \
matrix_torch_version = env.get('MATRIX_TORCH_VERSION'); \
if matrix_torch_version not in torch_versions_min or matrix_torch_version not in torch_versions_max: \
raise ValueError(f'Unexpected MATRIX_TORCH_VERSION: {matrix_torch_version}. Valid versions are: {list(torch_versions_min.keys())}'); \
minv = torch_versions_min[matrix_torch_version]; \
maxv = torch_versions_max[matrix_torch_version]; \

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant