Skip to content

Commit c26ff2a

Browse files
authored
Merge branch 'main' into fix/serialize_local_jobs
2 parents fe04ff3 + 689e75c commit c26ff2a

772 files changed

Lines changed: 56 additions & 44658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -106,39 +106,6 @@ updates:
106106
- dependency-name: '@teamsupercell/typings-for-css-modules-loader'
107107
update-types: ['version-update:semver-major']
108108

109-
# Docs site (Docusaurus, managed with yarn classic — dependabot's npm ecosystem auto-detects yarn.lock)
110-
# Build runs on Node 22 via transformerlab-docs/netlify.toml. Major bumps are ignored across
111-
# the board (manual coordination needed); minor/patch updates flow through for security.
112-
- package-ecosystem: 'npm'
113-
directory: '/transformerlab-docs'
114-
schedule:
115-
interval: 'weekly'
116-
day: 'monday'
117-
open-pull-requests-limit: 5
118-
commit-message:
119-
prefix: 'docs-deps'
120-
include: 'scope'
121-
labels:
122-
- 'dependencies'
123-
- 'docs'
124-
groups:
125-
docusaurus:
126-
patterns:
127-
- '@docusaurus/*'
128-
- '@mdx-js/*'
129-
react:
130-
patterns:
131-
- 'react'
132-
- 'react-dom'
133-
minor-and-patch:
134-
update-types:
135-
- 'minor'
136-
- 'patch'
137-
ignore:
138-
# Major bumps on docs deps need manual coordination; minor/patch is enough for security.
139-
- dependency-name: '*'
140-
update-types: ['version-update:semver-major']
141-
142109
# API (FastAPI, managed with uv)
143110
- package-ecosystem: 'uv'
144111
directory: '/api'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
entry: npm run format
1919
language: system
2020
pass_filenames: false
21-
files: ^(src|transformerlab-docs)/.*\.(js|jsx|ts|tsx|json|css|scss|md|mdx|ya?ml)$
21+
files: ^src/.*\.(js|jsx|ts|tsx|json|css|scss|md|mdx|ya?ml)$
2222
- repo: local
2323
hooks:
2424
- id: react-doctor

api/test/compute_providers/test_runpod_image.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,25 @@ def test_default_image_when_no_override():
5656
config = ClusterConfig(accelerators="A100:1")
5757
provider.launch_cluster("clust-1", config)
5858
assert captured["pod_data"]["imageName"] == "runpod/pytorch:1.0.3-cu1281-torch290-ubuntu2204"
59+
60+
61+
def test_amd_gpu_defaults_to_rocm_image():
62+
provider = _provider()
63+
captured = _capture_pod_data(provider)
64+
# AMD/ROCm card resolves to a ROCm image, not the default CUDA image.
65+
provider._map_gpu_type_to_runpod = lambda _accel: "AMD Instinct MI300X OAM"
66+
config = ClusterConfig(accelerators="MI300X:1")
67+
provider.launch_cluster("clust-1", config)
68+
assert captured["pod_data"]["imageName"] == "rocm/pytorch:latest"
69+
70+
71+
def test_amd_gpu_image_name_override_still_honored():
72+
provider = _provider()
73+
captured = _capture_pod_data(provider)
74+
provider._map_gpu_type_to_runpod = lambda _accel: "AMD Instinct MI300X OAM"
75+
config = ClusterConfig(
76+
accelerators="MI300X:1",
77+
provider_config={"image_name": "my-org/rocm-custom:latest"},
78+
)
79+
provider.launch_cluster("clust-1", config)
80+
assert captured["pod_data"]["imageName"] == "my-org/rocm-custom:latest"

api/transformerlab/compute_providers/runpod.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,33 @@
6868
"RTX5000": "NVIDIA RTX 5000 Ada Generation",
6969
"RTX4000": "NVIDIA RTX 4000 Ada Generation",
7070
"RTX2000": "NVIDIA RTX 2000 Ada Generation",
71+
# AMD Instinct (ROCm). Launching these requires a ROCm container image, not
72+
# the default CUDA image — see _is_amd_gpu_id and the image selection in
73+
# launch_cluster().
74+
"MI300X": "AMD Instinct MI300X OAM",
7175
}
7276

77+
# Runpod GPU type IDs for AMD/ROCm cards. Used to pick a ROCm container image at
78+
# launch time instead of the default CUDA image.
79+
_RUNPOD_AMD_GPU_IDS: frozenset = frozenset(
80+
{
81+
"AMD Instinct MI300X OAM",
82+
}
83+
)
84+
85+
# Default ROCm container image for AMD pods. Overridable per-launch via the
86+
# provider config `image_name` (or legacy `template_id`).
87+
_RUNPOD_DEFAULT_ROCM_IMAGE = "rocm/pytorch:latest"
88+
# Default CUDA container image for NVIDIA pods.
89+
_RUNPOD_DEFAULT_CUDA_IMAGE = "runpod/pytorch:1.0.3-cu1281-torch290-ubuntu2204"
90+
91+
92+
def _is_amd_gpu_id(gpu_type_id: Optional[str]) -> bool:
93+
"""Return True if the resolved Runpod GPU type ID is an AMD/ROCm card."""
94+
if not gpu_type_id:
95+
return False
96+
return gpu_type_id in _RUNPOD_AMD_GPU_IDS or "AMD" in gpu_type_id
97+
7398

7499
async def fetch_runpod_provider_logs(
75100
provider_instance: ComputeProvider,
@@ -360,8 +385,12 @@ def launch_cluster(self, cluster_name: str, config: ClusterConfig) -> Dict[str,
360385
except ValueError:
361386
gpu_count = 1
362387

363-
# Use GPU-enabled image
364-
default_image = "runpod/pytorch:1.0.3-cu1281-torch290-ubuntu2204"
388+
# Use a GPU-enabled image. AMD/ROCm cards need a ROCm image; the
389+
# default CUDA image will not run on them.
390+
if _is_amd_gpu_id(gpu_type_id):
391+
default_image = _RUNPOD_DEFAULT_ROCM_IMAGE
392+
else:
393+
default_image = _RUNPOD_DEFAULT_CUDA_IMAGE
365394
else:
366395
# CPU pod
367396
compute_type = "CPU"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"check-ports": "! lsof -i :1212 -i :8338",
3333
"start": "dotenv -e .env -- cross-env NODE_ENV=development tsx node_modules/webpack-dev-server/bin/webpack-dev-server.js --config ./.erb/configs/webpack.config.cloud.dev.ts",
3434
"dev": "npm run check-ports && concurrently -k -n FRONTEND,API -c cyan,magenta \"npm run start\" \"npm run api:start\"",
35-
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\" \"transformerlab-docs/**/*.{js,jsx,ts,tsx,json,css,scss,md,mdx,yml,yaml}\"",
36-
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\" \"transformerlab-docs/**/*.{js,jsx,ts,tsx,json,css,scss,md,mdx,yml,yaml}\"",
35+
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
36+
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
3737
"format:api": "prettier --write \"api/transformerlab/plugins/**/*.json\"",
3838
"api:install": "cd api && ./install.sh",
3939
"api:start": "cd api && ./run.sh",

transformerlab-docs/.gitignore

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)