Skip to content

Commit 2f6340a

Browse files
nickmazziclaude
andcommitted
Merge branch 'main' into feat/automl-create
Resolved conflicts in AutomlExperiments component: - Accepted main's refactoring that moved create button to parent component - Fixed routing in AutomlExperimentsPage to use automlConfigurePathname - Aligned with AutoRAG implementation pattern The create button is now in AutomlExperimentsPage with label "Create AutoML optimization run" and proper routing to configure page. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2 parents 28734e3 + 3b5d646 commit 2f6340a

42 files changed

Lines changed: 3006 additions & 132 deletions

Some content is hidden

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

frontend/config/webpack.dev.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,15 @@ module.exports = smp.wrap(
164164
}
165165

166166
if (!dashboardHost) {
167-
// try to get dashboard host from Route
167+
// try to get dashboard host from Route, but skip if its backend is a redirect service
168168
try {
169-
dashboardHost = execSync(
170-
`oc get routes -n ${odhProject} ${app} -o jsonpath='{.spec.host}'`,
171-
{ stdio: ['pipe', 'pipe', 'ignore'] },
172-
)
173-
.toString()
174-
.trim();
169+
const routeJson = execSync(`oc get routes -n ${odhProject} ${app} -o json`, {
170+
stdio: ['pipe', 'pipe', 'ignore'],
171+
}).toString();
172+
const route = JSON.parse(routeJson);
173+
if (route?.spec?.to?.name !== 'dashboard-redirect') {
174+
dashboardHost = route?.spec?.host;
175+
}
175176
} catch (e) {
176177
// ignore
177178
}

packages/automl/.env.local.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ DEV_MODE=true
1515

1616
# Logging Level: DEBUG, INFO, WARN, ERROR
1717
LOG_LEVEL=INFO
18+
19+
# Pipeline Server override (optional - for local dev when not using DSPA discovery)
20+
# PIPELINE_SERVER_URL=https://localhost:8443

packages/automl/.eslintrc.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ module.exports = require('@odh-dashboard/eslint-config')
55
'!.github',
66
// Ignore non-JS/TS files in api (OpenAPI specs)
77
'api/**/*',
8-
// Ignore Go backend files but allow markdown
9-
'bff/**/*',
10-
'!bff/**/*.md',
8+
// Ignore Go backend sources; keep bff/*.md and bff/docs/*.md lintable (bff/**/* + negation is unreliable in ESLint)
9+
'bff/cmd/**',
10+
'bff/internal/**',
11+
'bff/bin/**',
12+
'bff/static/**',
13+
'bff/go.mod',
14+
'bff/go.sum',
15+
'bff/go.work.sum',
16+
'bff/Makefile',
17+
'bff/.golangci.yaml',
18+
'bff/.gitignore',
19+
'bff/**/*.go',
1120
// Ignore frontend (has its own eslint config) but allow markdown
1221
'frontend/**/*',
1322
'!frontend/**/*.md',

packages/automl/api/openapi/automl.yaml

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,64 @@ paths:
560560
Supports all common line endings (\n, \r\n, \r) and properly handles quoted CSV fields.
561561
Returns a 400 Bad Request error if the file has fewer than 100 data rows.
562562
563+
# =============================================================================
564+
# MODEL REGISTRY ENDPOINTS
565+
# =============================================================================
566+
567+
/api/v1/model-registries/{registryId}/models:
568+
summary: Register a model in a specific Model Registry instance
569+
description: >-
570+
Registers a model binary by creating a RegisteredModel, ModelVersion, and
571+
ModelArtifact in the specified Model Registry instance. The model binary
572+
remains in S3; the ModelArtifact.uri points to the S3 location.
573+
The registryId path parameter is the Kubernetes UID of the ModelRegistry CR
574+
(from GET /api/v1/model-registries). The BFF resolves the server_url for that
575+
instance and POSTs to the Model Registry REST API.
576+
Returns 404 if the ID is unknown, 403 if the user cannot list ModelRegistries,
577+
and 503 if the registry exists but is not ready.
578+
post:
579+
tags:
580+
- ModelRegistry
581+
security:
582+
- Bearer: []
583+
parameters:
584+
- $ref: "#/components/parameters/namespace"
585+
- name: registryId
586+
in: path
587+
required: true
588+
schema:
589+
type: string
590+
description: Kubernetes UID of the target ModelRegistry CR (from GET /api/v1/model-registries id field)
591+
requestBody:
592+
required: true
593+
content:
594+
application/json:
595+
schema:
596+
$ref: "#/components/schemas/RegisterModelRequest"
597+
responses:
598+
"201":
599+
$ref: "#/components/responses/RegisterModelResponse"
600+
"400":
601+
$ref: "#/components/responses/BadRequest"
602+
"401":
603+
$ref: "#/components/responses/Unauthorized"
604+
"403":
605+
$ref: "#/components/responses/Forbidden"
606+
"404":
607+
$ref: "#/components/responses/NotFound"
608+
"409":
609+
$ref: "#/components/responses/Conflict"
610+
"500":
611+
$ref: "#/components/responses/InternalServerError"
612+
"503":
613+
$ref: "#/components/responses/ServiceUnavailable"
614+
operationId: registerModel
615+
summary: Register model binary
616+
description: >-
617+
Creates RegisteredModel, ModelVersion, and ModelArtifact in the Model Registry,
618+
linking the artifact to the provided S3 URI. Requires s3_path, model_name,
619+
and version_name in the request body.
620+
563621
# =============================================================================
564622
# PIPELINE RUNS ENDPOINTS
565623
# =============================================================================
@@ -1024,6 +1082,70 @@ components:
10241082
not:
10251083
required: [label_column]
10261084

1085+
RegisterModelRequest:
1086+
type: object
1087+
description: >-
1088+
Request body for registering a model binary in the Model Registry.
1089+
The target registry is identified by the registryId path parameter.
1090+
required:
1091+
- s3_path
1092+
- model_name
1093+
- version_name
1094+
properties:
1095+
s3_path:
1096+
type: string
1097+
minLength: 1
1098+
pattern: "^s3a?://[^/]+/.+"
1099+
description: S3 URI where the model binary is stored (s3:// or s3a:// scheme required)
1100+
example: "s3://my-bucket/models/v1/model.bin"
1101+
model_name:
1102+
type: string
1103+
minLength: 1
1104+
pattern: "\\S"
1105+
description: Name of the registered model (must contain at least one non-whitespace character)
1106+
example: "my-model"
1107+
model_description:
1108+
type: string
1109+
description: Optional description of the model
1110+
version_name:
1111+
type: string
1112+
minLength: 1
1113+
pattern: "\\S"
1114+
description: Name of the model version (must contain at least one non-whitespace character)
1115+
example: "v1"
1116+
version_description:
1117+
type: string
1118+
description: Optional description of this version
1119+
artifact_name:
1120+
type: string
1121+
description: Name for the ModelArtifact; defaults to version_name if empty
1122+
artifact_description:
1123+
type: string
1124+
description: Optional description of the artifact
1125+
model_format_name:
1126+
type: string
1127+
description: Optional format (e.g., onnx, pytorch, tensorflow)
1128+
model_format_version:
1129+
type: string
1130+
description: Optional format version (e.g., 1.0)
1131+
1132+
ModelArtifact:
1133+
type: object
1134+
description: Model artifact created in the Model Registry, pointing to the S3 URI
1135+
properties:
1136+
id:
1137+
type: string
1138+
description: Unique identifier of the artifact
1139+
name:
1140+
type: string
1141+
description: Artifact name
1142+
uri:
1143+
type: string
1144+
description: S3 URI of the model binary
1145+
artifactType:
1146+
type: string
1147+
description: Type of the artifact (e.g., model-artifact)
1148+
10271149
CreateAutoMLRunRequest:
10281150
description: >-
10291151
Request body for creating an AutoML pipeline run. The schema varies based on the
@@ -1385,6 +1507,21 @@ components:
13851507
data:
13861508
$ref: "#/components/schemas/PipelineRun"
13871509

1510+
RegisterModelResponse:
1511+
description: Registered model artifact
1512+
content:
1513+
application/json:
1514+
schema:
1515+
type: object
1516+
required:
1517+
- data
1518+
properties:
1519+
metadata:
1520+
type: object
1521+
description: Response metadata
1522+
data:
1523+
$ref: "#/components/schemas/ModelArtifact"
1524+
13881525
BadRequest:
13891526
description: Bad Request
13901527
content:
@@ -1456,7 +1593,7 @@ components:
14561593
Conflict:
14571594
description: >-
14581595
Conflict (e.g. S3 conditional upload failed because the object already exists at the
1459-
resolved key; client may retry the request)
1596+
resolved key, or duplicate model name in the registry; client may retry the request)
14601597
content:
14611598
application/json:
14621599
schema:

packages/automl/bff/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ This service exposes the following endpoints:
1717
- GET `/api/v1/pipeline-runs` – query merged pipeline runs from all auto-discovered AutoML pipelines
1818
- GET `/api/v1/pipeline-runs/:runId` – get a single pipeline run with full task details
1919
- POST `/api/v1/pipeline-runs` – create a new AutoML pipeline run
20+
- GET `/api/v1/model-registries` – list Model Registry instances (Kubernetes CRs) with `id` and `server_url` for routing
21+
- POST `/api/v1/model-registries/:registryId/models` – register a model binary in a specific Model Registry instance
2022

2123
## Development
2224

@@ -104,8 +106,12 @@ GET /api/v1/secrets (filter secrets by type, e.g., ?namespace=defau
104106
GET /api/v1/pipeline-runs (query merged runs from all auto-discovered AutoML pipelines)
105107
GET /api/v1/pipeline-runs/:runId
106108
POST /api/v1/pipeline-runs (create a new AutoML pipeline run)
109+
GET /api/v1/model-registries (list Model Registry instances: id, server_url, readiness)
110+
POST /api/v1/model-registries/:registryId/models (register model in a specific registry)
107111
```
108112

113+
For Model Registry integration details (configuration, authentication, S3), see [docs/model-registry-integration.md](docs/model-registry-integration.md).
114+
109115
For detailed information about the secrets endpoint, see [docs/secrets-endpoint.md](docs/secrets-endpoint.md).
110116

111117
### Sample local calls

packages/automl/bff/cmd/main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ import (
55
"crypto/tls"
66
"flag"
77
"fmt"
8+
"log/slog"
9+
"net/http"
10+
"os"
811
"os/signal"
912
"strings"
1013
"syscall"
14+
"time"
1115

1216
"github.com/opendatahub-io/automl-library/bff/internal/api"
1317
"github.com/opendatahub-io/automl-library/bff/internal/config"
14-
15-
"log/slog"
16-
"net/http"
17-
"os"
18-
"time"
1918
)
2019

2120
func main() {

0 commit comments

Comments
 (0)