-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Problem Description
The ROCm TensorFlow notebook's pyproject.toml currently declares the tensorflow-rocm wheel using a direct URL in the dependencies list, which is not the uv-native pattern and makes the dependencies section less clean.
Current Implementation
In jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
:
dependencies = [
"tensorflow-rocm @ https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=814a5e4842b0c92d63c7a0bb4df0baf51ff2db8615535d83fe8958204b840598",
# ... other dependencies
]
Proposed Solution
Move the URL declaration to tool.uv.sources
and add architecture requirements for better lock-time validation:
Step 1: Clean up dependencies
- "tensorflow-rocm @ https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=814a5e4842b0c92d63c7a0bb4df0baf51ff2db8615535d83fe8958204b840598",
+ "tensorflow-rocm==2.18.1",
Step 2: Add uv.sources configuration
[tool.uv.sources]
tensorflow-rocm = { url = "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl" }
Step 3: Add architecture requirements
[tool.uv]
# keep existing settings...
required-environments = [
"sys_platform == 'linux' and platform_machine == 'x86_64' and implementation_name == 'cpython'",
]
Benefits
- uv-Native Pattern: Follows uv's recommended approach for custom sources
- Cleaner Dependencies: Keeps project.dependencies focused on package names and versions
- Architecture Validation: Guarantees Linux x86_64 wheel exists at lock time
- Better Maintainability: Separates source configuration from dependency declarations
- Consistency: Aligns with other uv.sources usage in the repository
Files Affected
jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml
(similar pattern)
Acceptance Criteria
- Move tensorflow-rocm URL from dependencies to tool.uv.sources
- Update dependencies entry to use version specification only
- Add required-environments constraint for Linux x86_64
- Verify lock regeneration works correctly with new configuration
- Apply same pattern to runtimes/rocm-tensorflow if applicable
- Update any related documentation or comments
References
Context Links
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog