Skip to content

Commit e002621

Browse files
committed
Merge branch 'main' into fix/autorag-max-pred-length
2 parents 9421f61 + 4b960d7 commit e002621

33 files changed

Lines changed: 1260 additions & 50 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
.odh-number-input-wrapper {
2+
.pf-v6-c-number-input__unit {
3+
white-space: nowrap;
4+
}
5+
26
&.m-full-width {
37
width: 100%;
48
display: flex;
@@ -8,8 +12,5 @@
812
width: 100%;
913
}
1014
}
11-
.pf-v6-c-number-input__unit {
12-
white-space: nowrap;
13-
}
1415
}
1516
}

frontend/src/components/NumberInputWrapper.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ type NumberInputWrapperProps = {
88
onBlur?: (blurValue: number | undefined) => void;
99
onChange?: (newValue: number | undefined) => void;
1010
intOnly?: boolean;
11+
increment?: number;
1112
fullWidth?: boolean;
1213
} & Omit<React.ComponentProps<typeof NumberInput>, 'onChange' | 'onPlus' | 'onMinus'>;
1314

1415
const NumberInputWrapper: React.FC<NumberInputWrapperProps> = ({
1516
onBlur,
1617
onChange,
1718
intOnly = true,
19+
increment = 1,
1820
fullWidth = false,
1921
value,
2022
validated,
@@ -23,7 +25,7 @@ const NumberInputWrapper: React.FC<NumberInputWrapperProps> = ({
2325
...otherProps
2426
}) => (
2527
<NumberInput
26-
className={fullWidth ? 'odh-number-input-wrapper m-full-width' : undefined}
28+
className={fullWidth ? 'odh-number-input-wrapper m-full-width' : 'odh-number-input-wrapper'}
2729
inputProps={{ placeholder: '' }}
2830
inputName="value-unit-input"
2931
{...otherProps}
@@ -43,10 +45,10 @@ const NumberInputWrapper: React.FC<NumberInputWrapperProps> = ({
4345
onChange(undefined);
4446
return;
4547
}
46-
if (min) {
48+
if (min != null) {
4749
v = Math.max(v, min);
4850
}
49-
if (max) {
51+
if (max != null) {
5052
v = Math.min(v, max);
5153
}
5254
onChange(v);
@@ -64,16 +66,16 @@ const NumberInputWrapper: React.FC<NumberInputWrapperProps> = ({
6466
onPlus={
6567
onChange
6668
? () => {
67-
const newVal = (value || 0) + 1;
68-
onChange(min ? Math.max(newVal, min) : newVal);
69+
const newVal = (value || 0) + increment;
70+
onChange(max != null ? Math.min(newVal, max) : newVal);
6971
}
7072
: undefined
7173
}
7274
onMinus={
7375
onChange
7476
? () => {
75-
const newVal = (value || 0) - 1;
76-
onChange(max ? Math.min(newVal, max) : newVal);
77+
const newVal = (value || 0) - increment;
78+
onChange(min != null ? Math.max(newVal, min) : newVal);
7779
}
7880
: undefined
7981
}

frontend/src/k8sTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ export enum DeploymentMode {
499499
export type InferenceServiceAnnotations = DisplayNameAnnotations &
500500
Partial<{
501501
'security.opendatahub.io/enable-auth': string;
502+
'security.opendatahub.io/auth-proxy-type': 'kube-rbac-proxy' | 'oauth-proxy' | string;
502503
'serving.kserve.io/deploymentMode': DeploymentMode;
503504
'serving.knative.openshift.io/enablePassthrough': 'true';
504505
'sidecar.istio.io/inject': 'true';
@@ -529,6 +530,7 @@ export type InferenceServiceKind = K8sResourceCommon & {
529530
annotations?: Record<string, string>;
530531
tolerations?: Toleration[];
531532
nodeSelector?: NodeSelector;
533+
timeout?: number;
532534
deploymentStrategy?: {
533535
type: 'RollingUpdate' | 'Recreate';
534536
};

frontend/src/pages/modelServing/customServingRuntimes/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ export const findTemplateByName = (
159159
getServingRuntimeNameFromTemplate(t) === templateName || t.metadata.name === templateName,
160160
);
161161

162-
export const isTemplateKind = (
163-
resource: ServingRuntimeKind | TemplateKind,
164-
): resource is TemplateKind => resource.kind === 'Template';
162+
export const isTemplateKind = (resource: K8sResourceCommon): resource is TemplateKind =>
163+
resource.kind === 'Template';
165164

166165
export const getEnabledPlatformsFromTemplate = (
167166
template: TemplateKind,

frontend/src/pages/projects/screens/detail/connections/__tests__/ManageConnectionsModal.spec.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ describe('Create connection modal', () => {
198198
type: 'numeric',
199199
name: 'numeric 3',
200200
envVar: 'env3',
201-
properties: { min: 0 },
201+
properties: { min: 0, max: 100 },
202202
},
203203
],
204204
}),
@@ -236,18 +236,21 @@ describe('Create connection modal', () => {
236236
});
237237
expect(createButton).toBeEnabled();
238238

239-
// numeric
239+
// numeric - values outside min/max are auto-corrected on blur
240240
await act(async () => {
241241
fireEvent.change(numeric, {
242242
target: { value: '-10' },
243243
});
244+
fireEvent.blur(numeric);
244245
});
245-
expect(createButton).toBeDisabled();
246+
// Value is clamped to min (0), so button remains enabled
247+
expect(createButton).toBeEnabled();
246248

247249
await act(async () => {
248250
fireEvent.change(numeric, {
249251
target: { value: '2' },
250252
});
253+
fireEvent.blur(numeric);
251254
});
252255
expect(createButton).toBeEnabled();
253256

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
projectName: rayjob-e2e-test
2+
rayJobName: test-ray-job-pause-scale
3+
flavorName: ray-e2e-flavor
4+
clusterQueueName: ray-e2e-cluster-queue
5+
localQueueName: ray-e2e-local-queue
6+
cpuQuota: 100
7+
memoryQuota: 200
8+
gpuQuota: 8
9+
workerGroupName: worker-group-1
10+
rayImage: rayproject/ray:2.9.0
11+
rayVersion: "2.9.0"

packages/cypress/cypress/fixtures/e2e/modelTraining/trainJobs/testTrainjobProgression.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ cpuQuota: 100
88
memoryQuota: 200
99
gpuQuota: 8
1010

11-
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
apiVersion: ray.io/v1
2+
kind: RayJob
3+
metadata:
4+
name: ${rayJobName}
5+
namespace: ${namespace}
6+
labels:
7+
kueue.x-k8s.io/queue-name: ${localQueueName}
8+
spec:
9+
shutdownAfterJobFinishes: true
10+
ttlSecondsAfterFinished: 86400
11+
submissionMode: K8sJobMode
12+
entrypoint: python -c "import time; time.sleep(86400)"
13+
rayClusterSpec:
14+
rayVersion: '${rayVersion}'
15+
headGroupSpec:
16+
rayStartParams:
17+
dashboard-host: '0.0.0.0'
18+
template:
19+
spec:
20+
containers:
21+
- name: ray-head
22+
image: ${rayImage}
23+
resources:
24+
limits:
25+
cpu: '1'
26+
memory: 4Gi
27+
requests:
28+
cpu: 500m
29+
memory: 2Gi
30+
workerGroupSpecs:
31+
- groupName: ${workerGroupName}
32+
replicas: 1
33+
minReplicas: 0
34+
maxReplicas: 10
35+
rayStartParams: {}
36+
template:
37+
spec:
38+
containers:
39+
- name: ray-worker
40+
image: ${rayImage}
41+
resources:
42+
limits:
43+
cpu: '1'
44+
memory: 2Gi
45+
requests:
46+
cpu: 500m
47+
memory: 2Gi

packages/cypress/cypress/pages/modelTraining.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,10 @@ class RayJobResourcesTab {
951951
return cy.findByTestId('nodes-value');
952952
}
953953

954+
findNodesEditButton() {
955+
return cy.findByTestId('nodes-edit-button');
956+
}
957+
954958
findProcessesPerNodeValue() {
955959
return cy.findByTestId('processes-per-node-value');
956960
}

0 commit comments

Comments
 (0)