@things-factory/mlops 9.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +341 -0
  2. package/client/bootstrap.ts +41 -0
  3. package/client/index.ts +2 -0
  4. package/client/pages/ml-deployment/ml-deployment-list-page.ts +46 -0
  5. package/client/pages/ml-model/ml-model-list-page.ts +46 -0
  6. package/client/pages/ml-pipeline/ml-pipeline-list-page.ts +46 -0
  7. package/client/pages/mlops-dashboard/mlops-dashboard-page.ts +90 -0
  8. package/client/route.ts +19 -0
  9. package/client/tsconfig.json +12 -0
  10. package/dist-client/bootstrap.d.ts +1 -0
  11. package/dist-client/bootstrap.js +40 -0
  12. package/dist-client/bootstrap.js.map +1 -0
  13. package/dist-client/index.d.ts +2 -0
  14. package/dist-client/index.js +3 -0
  15. package/dist-client/index.js.map +1 -0
  16. package/dist-client/pages/ml-deployment/ml-deployment-list-page.d.ts +5 -0
  17. package/dist-client/pages/ml-deployment/ml-deployment-list-page.js +49 -0
  18. package/dist-client/pages/ml-deployment/ml-deployment-list-page.js.map +1 -0
  19. package/dist-client/pages/ml-model/ml-model-list-page.d.ts +5 -0
  20. package/dist-client/pages/ml-model/ml-model-list-page.js +49 -0
  21. package/dist-client/pages/ml-model/ml-model-list-page.js.map +1 -0
  22. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.d.ts +5 -0
  23. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.js +49 -0
  24. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.js.map +1 -0
  25. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.d.ts +5 -0
  26. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.js +93 -0
  27. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.js.map +1 -0
  28. package/dist-client/route.d.ts +1 -0
  29. package/dist-client/route.js +17 -0
  30. package/dist-client/route.js.map +1 -0
  31. package/dist-client/tsconfig.tsbuildinfo +1 -0
  32. package/dist-server/index.d.ts +2 -0
  33. package/dist-server/index.js +6 -0
  34. package/dist-server/index.js.map +1 -0
  35. package/dist-server/routes.d.ts +5 -0
  36. package/dist-server/routes.js +12 -0
  37. package/dist-server/routes.js.map +1 -0
  38. package/dist-server/service/index.d.ts +8 -0
  39. package/dist-server/service/index.js +31 -0
  40. package/dist-server/service/index.js.map +1 -0
  41. package/dist-server/service/ml-deployment/index.d.ts +3 -0
  42. package/dist-server/service/ml-deployment/index.js +8 -0
  43. package/dist-server/service/ml-deployment/index.js.map +1 -0
  44. package/dist-server/service/ml-deployment/ml-deployment.d.ts +48 -0
  45. package/dist-server/service/ml-deployment/ml-deployment.js +153 -0
  46. package/dist-server/service/ml-deployment/ml-deployment.js.map +1 -0
  47. package/dist-server/service/ml-model/index.d.ts +5 -0
  48. package/dist-server/service/ml-model/index.js +11 -0
  49. package/dist-server/service/ml-model/index.js.map +1 -0
  50. package/dist-server/service/ml-model/ml-model-mutation.d.ts +24 -0
  51. package/dist-server/service/ml-model/ml-model-mutation.js +177 -0
  52. package/dist-server/service/ml-model/ml-model-mutation.js.map +1 -0
  53. package/dist-server/service/ml-model/ml-model-query.d.ts +23 -0
  54. package/dist-server/service/ml-model/ml-model-query.js +123 -0
  55. package/dist-server/service/ml-model/ml-model-query.js.map +1 -0
  56. package/dist-server/service/ml-model/ml-model-types.d.ts +27 -0
  57. package/dist-server/service/ml-model/ml-model-types.js +105 -0
  58. package/dist-server/service/ml-model/ml-model-types.js.map +1 -0
  59. package/dist-server/service/ml-model/ml-model.d.ts +52 -0
  60. package/dist-server/service/ml-model/ml-model.js +161 -0
  61. package/dist-server/service/ml-model/ml-model.js.map +1 -0
  62. package/dist-server/service/ml-pipeline/index.d.ts +3 -0
  63. package/dist-server/service/ml-pipeline/index.js +8 -0
  64. package/dist-server/service/ml-pipeline/index.js.map +1 -0
  65. package/dist-server/service/ml-pipeline/ml-pipeline.d.ts +50 -0
  66. package/dist-server/service/ml-pipeline/ml-pipeline.js +163 -0
  67. package/dist-server/service/ml-pipeline/ml-pipeline.js.map +1 -0
  68. package/dist-server/service/ml-pipeline-run/index.d.ts +3 -0
  69. package/dist-server/service/ml-pipeline-run/index.js +8 -0
  70. package/dist-server/service/ml-pipeline-run/index.js.map +1 -0
  71. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.d.ts +40 -0
  72. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.js +136 -0
  73. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.js.map +1 -0
  74. package/dist-server/tsconfig.json +11 -0
  75. package/dist-server/tsconfig.tsbuildinfo +1 -0
  76. package/package.json +52 -0
  77. package/server/index.ts +3 -0
  78. package/server/routes.ts +13 -0
  79. package/server/service/index.ts +29 -0
  80. package/server/service/ml-deployment/index.ts +6 -0
  81. package/server/service/ml-deployment/ml-deployment.ts +136 -0
  82. package/server/service/ml-model/index.ts +9 -0
  83. package/server/service/ml-model/ml-model-mutation.ts +171 -0
  84. package/server/service/ml-model/ml-model-query.ts +97 -0
  85. package/server/service/ml-model/ml-model-types.ts +71 -0
  86. package/server/service/ml-model/ml-model.ts +143 -0
  87. package/server/service/ml-pipeline/index.ts +6 -0
  88. package/server/service/ml-pipeline/ml-pipeline.ts +144 -0
  89. package/server/service/ml-pipeline-run/index.ts +6 -0
  90. package/server/service/ml-pipeline-run/ml-pipeline-run.ts +118 -0
  91. package/server/tsconfig.json +11 -0
  92. package/things-factory.config.js +13 -0
  93. package/translations/en.json +30 -0
  94. package/translations/ko.json +30 -0
package/README.md ADDED
@@ -0,0 +1,341 @@
1
+ # @things-factory/mlops
2
+
3
+ **ML lifecycle orchestration platform for Things-Factory**
4
+
5
+ MLOps 모듈은 머신러닝 모델의 전체 라이프사이클을 관리하는 플랫폼입니다. MLflow, Label Studio 등 다양한 ML 도구들을 통합하여 end-to-end ML 워크플로우를 자동화합니다.
6
+
7
+ ## 핵심 기능
8
+
9
+ ### ✅ Model Lifecycle Management
10
+ - **모델 등록 및 버전 관리** - MLflow와 연동하여 모델 추적
11
+ - **Stage 관리** - None → Staging → Production 프로모션
12
+ - **메트릭 추적** - 정확도, 손실, 커스텀 메트릭 저장
13
+ - **메타데이터 관리** - 프레임워크, 학습 파라미터, 태그
14
+
15
+ ### 🔄 ML Pipeline Orchestration
16
+ - **자동 재학습 파이프라인** - Label Studio 어노테이션 → 자동 학습
17
+ - **스케줄 기반 학습** - Cron 표현식으로 주기적 재학습
18
+ - **이벤트 기반 트리거** - 임계값 도달 시 자동 학습
19
+ - **파이프라인 모니터링** - 실행 이력, 성공률 추적
20
+
21
+ ### 🚀 Model Deployment
22
+ - **환경별 배포** - Development, Staging, Production
23
+ - **배포 상태 추적** - Deploying, Active, Failed, Stopped
24
+ - **성능 메트릭** - Latency, throughput, error rate
25
+ - **롤백 지원** - 문제 발생 시 이전 버전으로 복구
26
+
27
+ ### 📊 Monitoring & Observability
28
+ - **대시보드** - 모델, 파이프라인, 배포 현황 한눈에
29
+ - **실행 이력** - 파이프라인 실행 로그 및 결과
30
+ - **알림** - 파이프라인 실패, 배포 이슈 통보
31
+
32
+ ## 아키텍처
33
+
34
+ ```
35
+ ┌─────────────────────────────────────────────────────────┐
36
+ │ @things-factory/mlops │
37
+ │ │
38
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
39
+ │ │ Model │ │ Pipeline │ │ Deployment │ │
40
+ │ │ Registry │ │ Orchestrator│ │ Manager │ │
41
+ │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
42
+ │ │ │ │ │
43
+ └─────────┼─────────────────┼──────────────────┼───────────┘
44
+ │ │ │
45
+ ┌───────▼────────┐ ┌──────▼───────┐ ┌──────▼───────┐
46
+ │integration- │ │integration- │ │ Kubernetes │
47
+ │ mlflow │ │label-studio │ │ / Lambda │
48
+ └────────────────┘ └──────────────┘ └──────────────┘
49
+ ```
50
+
51
+ ## 빠른 시작
52
+
53
+ ### 1. 설치
54
+
55
+ ```bash
56
+ cd things-factory
57
+ yarn install
58
+ ```
59
+
60
+ ### 2. 모델 등록
61
+
62
+ ```graphql
63
+ mutation RegisterModel {
64
+ registerMLModel(
65
+ input: {
66
+ name: "defect-classifier"
67
+ version: "v1.0.0"
68
+ description: "WBM defect classification model"
69
+ framework: PYTORCH
70
+ metrics: "{\"accuracy\": 0.95, \"f1\": 0.93}"
71
+ mlflowRunId: "abc123"
72
+ labelStudioProjectId: 1
73
+ tags: "[\"production-ready\", \"wbm\"]"
74
+ }
75
+ ) {
76
+ id
77
+ name
78
+ version
79
+ stage
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### 3. 모델 프로모션
85
+
86
+ ```graphql
87
+ mutation PromoteModel {
88
+ promoteMLModel(
89
+ input: { modelId: "uuid", targetStage: PRODUCTION, notes: "Passed QA tests" }
90
+ ) {
91
+ id
92
+ name
93
+ stage
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### 4. 파이프라인 생성 (향후)
99
+
100
+ ```graphql
101
+ mutation CreatePipeline {
102
+ createMLPipeline(
103
+ input: {
104
+ name: "wbm-auto-retrain"
105
+ labelStudioProjectId: 1
106
+ annotationThreshold: 100
107
+ schedule: "0 2 * * *"
108
+ promotionThreshold: 0.95
109
+ }
110
+ ) {
111
+ id
112
+ name
113
+ status
114
+ }
115
+ }
116
+ ```
117
+
118
+ ## GraphQL API
119
+
120
+ ### Query
121
+
122
+ ```graphql
123
+ # 모든 모델 조회
124
+ query {
125
+ mlModels {
126
+ id
127
+ name
128
+ version
129
+ stage
130
+ framework
131
+ metrics
132
+ createdAt
133
+ }
134
+ }
135
+
136
+ # Stage별 모델 조회
137
+ query {
138
+ mlModelsByStage(stage: PRODUCTION) {
139
+ id
140
+ name
141
+ version
142
+ }
143
+ }
144
+
145
+ # 모델 버전 조회
146
+ query {
147
+ mlModelVersions(name: "defect-classifier") {
148
+ id
149
+ version
150
+ stage
151
+ metrics
152
+ }
153
+ }
154
+
155
+ # Label Studio 프로젝트 연결 모델
156
+ query {
157
+ mlModelsByLabelStudioProject(projectId: 1) {
158
+ id
159
+ name
160
+ version
161
+ }
162
+ }
163
+ ```
164
+
165
+ ### Mutation
166
+
167
+ ```graphql
168
+ # 모델 업데이트
169
+ mutation {
170
+ updateMLModel(
171
+ id: "uuid"
172
+ input: { description: "Updated description", stage: STAGING }
173
+ ) {
174
+ id
175
+ description
176
+ stage
177
+ }
178
+ }
179
+
180
+ # 모델 아카이브
181
+ mutation {
182
+ archiveMLModel(id: "uuid")
183
+ }
184
+
185
+ # 모델 삭제
186
+ mutation {
187
+ deleteMLModel(id: "uuid")
188
+ }
189
+ ```
190
+
191
+ ## 엔티티
192
+
193
+ ### MLModel
194
+ - **id**: UUID
195
+ - **name**: 모델 이름
196
+ - **version**: 버전 (semantic versioning 권장)
197
+ - **stage**: None, Staging, Production, Archived
198
+ - **framework**: TensorFlow, PyTorch, Scikit-Learn, etc.
199
+ - **metrics**: JSON 형태의 메트릭
200
+ - **artifactUri**: 모델 파일 저장 위치
201
+ - **mlflowRunId**: MLflow 연동 ID
202
+ - **labelStudioProjectId**: Label Studio 프로젝트 ID
203
+
204
+ ### MLPipeline (향후)
205
+ - **name**: 파이프라인 이름
206
+ - **status**: DRAFT, ACTIVE, PAUSED, ARCHIVED
207
+ - **triggerType**: MANUAL, SCHEDULE, WEBHOOK, EVENT
208
+ - **schedule**: Cron 표현식
209
+ - **annotationThreshold**: 재학습 트리거 임계값
210
+
211
+ ### MLPipelineRun (향후)
212
+ - **pipeline**: 부모 파이프라인
213
+ - **status**: PENDING, RUNNING, SUCCEEDED, FAILED, CANCELLED
214
+ - **startedAt**: 시작 시간
215
+ - **duration**: 실행 시간 (초)
216
+ - **results**: 실행 결과 JSON
217
+
218
+ ### MLDeployment (향후)
219
+ - **model**: 배포된 모델
220
+ - **environment**: DEVELOPMENT, STAGING, PRODUCTION
221
+ - **status**: DEPLOYING, ACTIVE, FAILED, STOPPED
222
+ - **endpoint**: API 엔드포인트 URL
223
+
224
+ ## 사용 예제
225
+
226
+ ### WBM 자동 재학습 워크플로우
227
+
228
+ ```typescript
229
+ import { registerMLModel, promoteMLModel } from '@things-factory/mlops'
230
+ import { getAnnotations } from '@things-factory/integration-label-studio'
231
+
232
+ // 1. Label Studio에서 새 어노테이션 확인
233
+ const annotations = await getAnnotations(projectId)
234
+
235
+ if (annotations.length > lastCount + 100) {
236
+ // 2. 재학습 실행 (외부 스크립트)
237
+ const trainResult = await runTraining(annotations)
238
+
239
+ // 3. MLOps에 모델 등록
240
+ const model = await registerMLModel({
241
+ name: 'wbm-classifier',
242
+ version: `v${Date.now()}`,
243
+ framework: 'PYTORCH',
244
+ metrics: JSON.stringify(trainResult.metrics),
245
+ mlflowRunId: trainResult.runId,
246
+ labelStudioProjectId: projectId
247
+ })
248
+
249
+ // 4. 성능 기준 충족 시 자동 프로모션
250
+ if (trainResult.metrics.accuracy > 0.95) {
251
+ await promoteMLModel({
252
+ modelId: model.id,
253
+ targetStage: 'PRODUCTION'
254
+ })
255
+ }
256
+ }
257
+ ```
258
+
259
+ ## 통합 모듈
260
+
261
+ ### @things-factory/integration-mlflow
262
+ - MLflow experiment tracking
263
+ - Model registry 연동
264
+ - Artifact 저장
265
+
266
+ ### @things-factory/integration-label-studio
267
+ - 어노테이션 데이터 소싱
268
+ - 재학습 트리거
269
+ - 데이터 품질 관리
270
+
271
+ ## 로드맵
272
+
273
+ ### Phase 1: 기본 모델 관리 (현재)
274
+ - ✅ 모델 등록/조회
275
+ - ✅ 버전 관리
276
+ - ✅ Stage 프로모션
277
+ - ✅ GraphQL API
278
+
279
+ ### Phase 2: 파이프라인 자동화
280
+ - ⏳ 자동 재학습 파이프라인
281
+ - ⏳ 스케줄링
282
+ - ⏳ 이벤트 트리거
283
+
284
+ ### Phase 3: 배포 관리
285
+ - ⏳ 모델 서빙
286
+ - ⏳ A/B 테스트
287
+ - ⏳ 카나리 배포
288
+
289
+ ### Phase 4: 고급 기능
290
+ - ⏳ 모델 드리프트 감지
291
+ - ⏳ 자동 롤백
292
+ - ⏳ AutoML 통합
293
+
294
+ ## 파일 구조
295
+
296
+ ```
297
+ mlops/
298
+ ├── server/
299
+ │ ├── entities/
300
+ │ │ ├── ml-model.ts # 모델 엔티티
301
+ │ │ ├── ml-pipeline.ts # 파이프라인 엔티티
302
+ │ │ ├── ml-pipeline-run.ts # 실행 이력 엔티티
303
+ │ │ └── ml-deployment.ts # 배포 엔티티
304
+ │ ├── service/
305
+ │ │ ├── ml-model/
306
+ │ │ │ ├── ml-model-query.ts # 모델 조회
307
+ │ │ │ ├── ml-model-mutation.ts # 모델 변경
308
+ │ │ │ └── ml-model-types.ts # GraphQL 타입
309
+ │ │ ├── ml-pipeline/
310
+ │ │ ├── ml-pipeline-run/
311
+ │ │ └── ml-deployment/
312
+ │ ├── routes.ts
313
+ │ └── index.ts
314
+ ├── client/
315
+ │ ├── pages/
316
+ │ │ ├── ml-model/
317
+ │ │ │ └── ml-model-list-page.ts
318
+ │ │ ├── ml-pipeline/
319
+ │ │ │ └── ml-pipeline-list-page.ts
320
+ │ │ ├── ml-deployment/
321
+ │ │ │ └── ml-deployment-list-page.ts
322
+ │ │ └── mlops-dashboard/
323
+ │ │ └── mlops-dashboard-page.ts
324
+ │ ├── route.ts
325
+ │ ├── bootstrap.ts
326
+ │ └── index.ts
327
+ ├── translations/
328
+ │ ├── en.json
329
+ │ └── ko.json
330
+ ├── package.json
331
+ ├── things-factory.config.js
332
+ └── README.md
333
+ ```
334
+
335
+ ## 라이선스
336
+
337
+ MIT
338
+
339
+ ## 기여
340
+
341
+ 버그 리포트 및 기능 제안은 GitHub Issues로 부탁드립니다.
@@ -0,0 +1,41 @@
1
+ import { store } from '@operato/shell'
2
+
3
+ export default function bootstrap() {
4
+ /**
5
+ * MLOps Module Bootstrap
6
+ *
7
+ * Initialize module-specific settings, event listeners, etc.
8
+ */
9
+
10
+ // Example: Register menu items
11
+ store.dispatch({
12
+ type: 'ADD_MENU',
13
+ menu: {
14
+ category: 'mlops',
15
+ name: 'mlops',
16
+ icon: 'model_training',
17
+ childrens: [
18
+ {
19
+ name: 'ml-models',
20
+ path: 'ml-model-list',
21
+ icon: 'psychology'
22
+ },
23
+ {
24
+ name: 'ml-pipelines',
25
+ path: 'ml-pipeline-list',
26
+ icon: 'account_tree'
27
+ },
28
+ {
29
+ name: 'ml-deployments',
30
+ path: 'ml-deployment-list',
31
+ icon: 'rocket_launch'
32
+ },
33
+ {
34
+ name: 'mlops-dashboard',
35
+ path: 'mlops-dashboard',
36
+ icon: 'dashboard'
37
+ }
38
+ ]
39
+ }
40
+ })
41
+ }
@@ -0,0 +1,2 @@
1
+ export { default as route } from './route'
2
+ export { default as bootstrap } from './bootstrap'
@@ -0,0 +1,46 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+
4
+ @customElement('ml-deployment-list-page')
5
+ export class MLDeploymentListPage extends LitElement {
6
+ static styles = [
7
+ css`
8
+ :host {
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ padding: 20px;
13
+ }
14
+
15
+ h2 {
16
+ margin: 0 0 20px 0;
17
+ }
18
+
19
+ .placeholder {
20
+ text-align: center;
21
+ padding: 40px;
22
+ color: #666;
23
+ }
24
+ `
25
+ ]
26
+
27
+ render() {
28
+ return html`
29
+ <h2>ML Deployments</h2>
30
+
31
+ <div class="placeholder">
32
+ <p>ML Deployment list will be displayed here</p>
33
+ <p>
34
+ This page will show:
35
+ <ul style="text-align: left; display: inline-block;">
36
+ <li>Active deployments</li>
37
+ <li>Environment (Development, Staging, Production)</li>
38
+ <li>Deployment status</li>
39
+ <li>Performance metrics (latency, error rate)</li>
40
+ <li>Actions: Stop, Restart, Rollback</li>
41
+ </ul>
42
+ </p>
43
+ </div>
44
+ `
45
+ }
46
+ }
@@ -0,0 +1,46 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+
4
+ @customElement('ml-model-list-page')
5
+ export class MLModelListPage extends LitElement {
6
+ static styles = [
7
+ css`
8
+ :host {
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ padding: 20px;
13
+ }
14
+
15
+ h2 {
16
+ margin: 0 0 20px 0;
17
+ }
18
+
19
+ .placeholder {
20
+ text-align: center;
21
+ padding: 40px;
22
+ color: #666;
23
+ }
24
+ `
25
+ ]
26
+
27
+ render() {
28
+ return html`
29
+ <h2>ML Models</h2>
30
+
31
+ <div class="placeholder">
32
+ <p>ML Model list will be displayed here</p>
33
+ <p>
34
+ This page will show:
35
+ <ul style="text-align: left; display: inline-block;">
36
+ <li>Registered ML models</li>
37
+ <li>Model versions</li>
38
+ <li>Deployment stages (None, Staging, Production)</li>
39
+ <li>Model metrics</li>
40
+ <li>Actions: Promote, Archive, Delete</li>
41
+ </ul>
42
+ </p>
43
+ </div>
44
+ `
45
+ }
46
+ }
@@ -0,0 +1,46 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+
4
+ @customElement('ml-pipeline-list-page')
5
+ export class MLPipelineListPage extends LitElement {
6
+ static styles = [
7
+ css`
8
+ :host {
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ padding: 20px;
13
+ }
14
+
15
+ h2 {
16
+ margin: 0 0 20px 0;
17
+ }
18
+
19
+ .placeholder {
20
+ text-align: center;
21
+ padding: 40px;
22
+ color: #666;
23
+ }
24
+ `
25
+ ]
26
+
27
+ render() {
28
+ return html`
29
+ <h2>ML Pipelines</h2>
30
+
31
+ <div class="placeholder">
32
+ <p>ML Pipeline list will be displayed here</p>
33
+ <p>
34
+ This page will show:
35
+ <ul style="text-align: left; display: inline-block;">
36
+ <li>Configured ML pipelines</li>
37
+ <li>Pipeline status (Active, Paused, Draft)</li>
38
+ <li>Trigger configuration (Manual, Schedule, Event)</li>
39
+ <li>Last execution time</li>
40
+ <li>Actions: Run, Pause, Edit, Delete</li>
41
+ </ul>
42
+ </p>
43
+ </div>
44
+ `
45
+ }
46
+ }
@@ -0,0 +1,90 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+
4
+ @customElement('mlops-dashboard-page')
5
+ export class MLOpsDashboardPage extends LitElement {
6
+ static styles = [
7
+ css`
8
+ :host {
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ padding: 20px;
13
+ }
14
+
15
+ h2 {
16
+ margin: 0 0 20px 0;
17
+ }
18
+
19
+ .dashboard-grid {
20
+ display: grid;
21
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
22
+ gap: 20px;
23
+ margin-top: 20px;
24
+ }
25
+
26
+ .dashboard-card {
27
+ background: white;
28
+ border: 1px solid #e0e0e0;
29
+ border-radius: 8px;
30
+ padding: 20px;
31
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
32
+ }
33
+
34
+ .dashboard-card h3 {
35
+ margin: 0 0 15px 0;
36
+ font-size: 18px;
37
+ }
38
+
39
+ .placeholder {
40
+ text-align: center;
41
+ padding: 40px;
42
+ color: #666;
43
+ }
44
+ `
45
+ ]
46
+
47
+ render() {
48
+ return html`
49
+ <h2>MLOps Dashboard</h2>
50
+
51
+ <div class="dashboard-grid">
52
+ <div class="dashboard-card">
53
+ <h3>Models Overview</h3>
54
+ <div class="placeholder">
55
+ <p>Total models: -</p>
56
+ <p>Production: -</p>
57
+ <p>Staging: -</p>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="dashboard-card">
62
+ <h3>Pipeline Status</h3>
63
+ <div class="placeholder">
64
+ <p>Active pipelines: -</p>
65
+ <p>Recent runs: -</p>
66
+ <p>Success rate: -</p>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="dashboard-card">
71
+ <h3>Deployment Health</h3>
72
+ <div class="placeholder">
73
+ <p>Active deployments: -</p>
74
+ <p>Avg latency: -</p>
75
+ <p>Error rate: -</p>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="dashboard-card">
80
+ <h3>Recent Activity</h3>
81
+ <div class="placeholder">
82
+ <p>Recent model registrations</p>
83
+ <p>Recent pipeline runs</p>
84
+ <p>Recent promotions</p>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ `
89
+ }
90
+ }
@@ -0,0 +1,19 @@
1
+ export default function route(page: string) {
2
+ switch (page) {
3
+ case 'ml-model-list':
4
+ import('./pages/ml-model/ml-model-list-page')
5
+ return page
6
+
7
+ case 'ml-pipeline-list':
8
+ import('./pages/ml-pipeline/ml-pipeline-list-page')
9
+ return page
10
+
11
+ case 'ml-deployment-list':
12
+ import('./pages/ml-deployment/ml-deployment-list-page')
13
+ return page
14
+
15
+ case 'mlops-dashboard':
16
+ import('./pages/mlops-dashboard/mlops-dashboard-page')
17
+ return page
18
+ }
19
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "../../tsconfig-base.json",
3
+ "compilerOptions": {
4
+ "experimentalDecorators": true,
5
+ "strict": true,
6
+ "declaration": true,
7
+ "module": "esnext",
8
+ "outDir": "../dist-client",
9
+ "baseUrl": "./"
10
+ },
11
+ "include": ["./**/*"]
12
+ }
@@ -0,0 +1 @@
1
+ export default function bootstrap(): void;
@@ -0,0 +1,40 @@
1
+ import { store } from '@operato/shell';
2
+ export default function bootstrap() {
3
+ /**
4
+ * MLOps Module Bootstrap
5
+ *
6
+ * Initialize module-specific settings, event listeners, etc.
7
+ */
8
+ // Example: Register menu items
9
+ store.dispatch({
10
+ type: 'ADD_MENU',
11
+ menu: {
12
+ category: 'mlops',
13
+ name: 'mlops',
14
+ icon: 'model_training',
15
+ childrens: [
16
+ {
17
+ name: 'ml-models',
18
+ path: 'ml-model-list',
19
+ icon: 'psychology'
20
+ },
21
+ {
22
+ name: 'ml-pipelines',
23
+ path: 'ml-pipeline-list',
24
+ icon: 'account_tree'
25
+ },
26
+ {
27
+ name: 'ml-deployments',
28
+ path: 'ml-deployment-list',
29
+ icon: 'rocket_launch'
30
+ },
31
+ {
32
+ name: 'mlops-dashboard',
33
+ path: 'mlops-dashboard',
34
+ icon: 'dashboard'
35
+ }
36
+ ]
37
+ }
38
+ });
39
+ }
40
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B;;;;OAIG;IAEH,+BAA+B;IAC/B,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,gBAAgB;YACtB,SAAS,EAAE;gBACT;oBACE,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,YAAY;iBACnB;gBACD;oBACE,IAAI,EAAE,cAAc;oBACpB,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,cAAc;iBACrB;gBACD;oBACE,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,oBAAoB;oBAC1B,IAAI,EAAE,eAAe;iBACtB;gBACD;oBACE,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,WAAW;iBAClB;aACF;SACF;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { store } from '@operato/shell'\n\nexport default function bootstrap() {\n /**\n * MLOps Module Bootstrap\n *\n * Initialize module-specific settings, event listeners, etc.\n */\n\n // Example: Register menu items\n store.dispatch({\n type: 'ADD_MENU',\n menu: {\n category: 'mlops',\n name: 'mlops',\n icon: 'model_training',\n childrens: [\n {\n name: 'ml-models',\n path: 'ml-model-list',\n icon: 'psychology'\n },\n {\n name: 'ml-pipelines',\n path: 'ml-pipeline-list',\n icon: 'account_tree'\n },\n {\n name: 'ml-deployments',\n path: 'ml-deployment-list',\n icon: 'rocket_launch'\n },\n {\n name: 'mlops-dashboard',\n path: 'mlops-dashboard',\n icon: 'dashboard'\n }\n ]\n }\n })\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { default as route } from './route';
2
+ export { default as bootstrap } from './bootstrap';