@things-factory/mlops 10.0.0-zeta.7 → 10.0.0

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 (66) hide show
  1. package/dist-client/bootstrap.d.ts +1 -0
  2. package/dist-client/bootstrap.js +40 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/index.d.ts +2 -0
  5. package/dist-client/index.js +3 -0
  6. package/dist-client/index.js.map +1 -0
  7. package/dist-client/pages/ml-deployment/ml-deployment-list-page.d.ts +5 -0
  8. package/dist-client/pages/ml-deployment/ml-deployment-list-page.js +49 -0
  9. package/dist-client/pages/ml-deployment/ml-deployment-list-page.js.map +1 -0
  10. package/dist-client/pages/ml-model/ml-model-list-page.d.ts +5 -0
  11. package/dist-client/pages/ml-model/ml-model-list-page.js +49 -0
  12. package/dist-client/pages/ml-model/ml-model-list-page.js.map +1 -0
  13. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.d.ts +5 -0
  14. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.js +49 -0
  15. package/dist-client/pages/ml-pipeline/ml-pipeline-list-page.js.map +1 -0
  16. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.d.ts +5 -0
  17. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.js +93 -0
  18. package/dist-client/pages/mlops-dashboard/mlops-dashboard-page.js.map +1 -0
  19. package/dist-client/route.d.ts +1 -0
  20. package/dist-client/route.js +17 -0
  21. package/dist-client/route.js.map +1 -0
  22. package/dist-client/tsconfig.tsbuildinfo +1 -0
  23. package/dist-server/index.d.ts +2 -0
  24. package/dist-server/index.js +6 -0
  25. package/dist-server/index.js.map +1 -0
  26. package/dist-server/routes.d.ts +5 -0
  27. package/dist-server/routes.js +12 -0
  28. package/dist-server/routes.js.map +1 -0
  29. package/dist-server/service/index.d.ts +8 -0
  30. package/dist-server/service/index.js +31 -0
  31. package/dist-server/service/index.js.map +1 -0
  32. package/dist-server/service/ml-deployment/index.d.ts +3 -0
  33. package/dist-server/service/ml-deployment/index.js +8 -0
  34. package/dist-server/service/ml-deployment/index.js.map +1 -0
  35. package/dist-server/service/ml-deployment/ml-deployment.d.ts +48 -0
  36. package/dist-server/service/ml-deployment/ml-deployment.js +153 -0
  37. package/dist-server/service/ml-deployment/ml-deployment.js.map +1 -0
  38. package/dist-server/service/ml-model/index.d.ts +5 -0
  39. package/dist-server/service/ml-model/index.js +11 -0
  40. package/dist-server/service/ml-model/index.js.map +1 -0
  41. package/dist-server/service/ml-model/ml-model-mutation.d.ts +24 -0
  42. package/dist-server/service/ml-model/ml-model-mutation.js +177 -0
  43. package/dist-server/service/ml-model/ml-model-mutation.js.map +1 -0
  44. package/dist-server/service/ml-model/ml-model-query.d.ts +23 -0
  45. package/dist-server/service/ml-model/ml-model-query.js +123 -0
  46. package/dist-server/service/ml-model/ml-model-query.js.map +1 -0
  47. package/dist-server/service/ml-model/ml-model-types.d.ts +27 -0
  48. package/dist-server/service/ml-model/ml-model-types.js +105 -0
  49. package/dist-server/service/ml-model/ml-model-types.js.map +1 -0
  50. package/dist-server/service/ml-model/ml-model.d.ts +52 -0
  51. package/dist-server/service/ml-model/ml-model.js +161 -0
  52. package/dist-server/service/ml-model/ml-model.js.map +1 -0
  53. package/dist-server/service/ml-pipeline/index.d.ts +3 -0
  54. package/dist-server/service/ml-pipeline/index.js +8 -0
  55. package/dist-server/service/ml-pipeline/index.js.map +1 -0
  56. package/dist-server/service/ml-pipeline/ml-pipeline.d.ts +50 -0
  57. package/dist-server/service/ml-pipeline/ml-pipeline.js +163 -0
  58. package/dist-server/service/ml-pipeline/ml-pipeline.js.map +1 -0
  59. package/dist-server/service/ml-pipeline-run/index.d.ts +3 -0
  60. package/dist-server/service/ml-pipeline-run/index.js +8 -0
  61. package/dist-server/service/ml-pipeline-run/index.js.map +1 -0
  62. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.d.ts +40 -0
  63. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.js +136 -0
  64. package/dist-server/service/ml-pipeline-run/ml-pipeline-run.js.map +1 -0
  65. package/dist-server/tsconfig.tsbuildinfo +1 -0
  66. package/package.json +12 -12
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MLPipeline = exports.PipelineTriggerType = exports.PipelineStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ /**
10
+ * Pipeline Status
11
+ */
12
+ var PipelineStatus;
13
+ (function (PipelineStatus) {
14
+ PipelineStatus["DRAFT"] = "DRAFT";
15
+ PipelineStatus["ACTIVE"] = "ACTIVE";
16
+ PipelineStatus["PAUSED"] = "PAUSED";
17
+ PipelineStatus["ARCHIVED"] = "ARCHIVED";
18
+ })(PipelineStatus || (exports.PipelineStatus = PipelineStatus = {}));
19
+ (0, type_graphql_1.registerEnumType)(PipelineStatus, {
20
+ name: 'PipelineStatus',
21
+ description: 'ML pipeline status'
22
+ });
23
+ /**
24
+ * Pipeline Trigger Type
25
+ */
26
+ var PipelineTriggerType;
27
+ (function (PipelineTriggerType) {
28
+ PipelineTriggerType["MANUAL"] = "MANUAL";
29
+ PipelineTriggerType["SCHEDULE"] = "SCHEDULE";
30
+ PipelineTriggerType["WEBHOOK"] = "WEBHOOK";
31
+ PipelineTriggerType["EVENT"] = "EVENT";
32
+ })(PipelineTriggerType || (exports.PipelineTriggerType = PipelineTriggerType = {}));
33
+ (0, type_graphql_1.registerEnumType)(PipelineTriggerType, {
34
+ name: 'PipelineTriggerType',
35
+ description: 'How pipeline is triggered'
36
+ });
37
+ /**
38
+ * ML Pipeline Entity
39
+ *
40
+ * Represents an end-to-end ML pipeline for auto-training
41
+ */
42
+ let MLPipeline = class MLPipeline {
43
+ };
44
+ exports.MLPipeline = MLPipeline;
45
+ tslib_1.__decorate([
46
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
47
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Pipeline ID' }),
48
+ tslib_1.__metadata("design:type", String)
49
+ ], MLPipeline.prototype, "id", void 0);
50
+ tslib_1.__decorate([
51
+ (0, typeorm_1.Column)({ nullable: true, comment: 'Pipeline name' }),
52
+ (0, type_graphql_1.Field)({ description: 'Pipeline name' }),
53
+ tslib_1.__metadata("design:type", String)
54
+ ], MLPipeline.prototype, "name", void 0);
55
+ tslib_1.__decorate([
56
+ (0, typeorm_1.Column)({ nullable: true, comment: 'Pipeline description' }),
57
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Pipeline description' }),
58
+ tslib_1.__metadata("design:type", String)
59
+ ], MLPipeline.prototype, "description", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.Column)({ type: 'varchar', default: PipelineStatus.DRAFT, comment: 'Pipeline status' }),
62
+ (0, type_graphql_1.Field)(type => PipelineStatus, { description: 'Current pipeline status' }),
63
+ tslib_1.__metadata("design:type", String)
64
+ ], MLPipeline.prototype, "status", void 0);
65
+ tslib_1.__decorate([
66
+ (0, typeorm_1.Column)({ type: 'varchar', default: PipelineTriggerType.MANUAL, comment: 'Trigger type' }),
67
+ (0, type_graphql_1.Field)(type => PipelineTriggerType, { description: 'How pipeline is triggered' }),
68
+ tslib_1.__metadata("design:type", String)
69
+ ], MLPipeline.prototype, "triggerType", void 0);
70
+ tslib_1.__decorate([
71
+ (0, typeorm_1.Column)({ nullable: true, comment: 'Cron schedule (if SCHEDULE trigger)' }),
72
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Cron expression for scheduling' }),
73
+ tslib_1.__metadata("design:type", String)
74
+ ], MLPipeline.prototype, "schedule", void 0);
75
+ tslib_1.__decorate([
76
+ (0, typeorm_1.Column)({ type: 'int', nullable: true, comment: 'Label Studio project ID' }),
77
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Source Label Studio project' }),
78
+ tslib_1.__metadata("design:type", Number)
79
+ ], MLPipeline.prototype, "labelStudioProjectId", void 0);
80
+ tslib_1.__decorate([
81
+ (0, typeorm_1.Column)({ type: 'int', nullable: true, comment: 'Minimum new annotations to trigger' }),
82
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Min annotations threshold' }),
83
+ tslib_1.__metadata("design:type", Number)
84
+ ], MLPipeline.prototype, "annotationThreshold", void 0);
85
+ tslib_1.__decorate([
86
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Pipeline configuration' }),
87
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Pipeline config as JSON' }),
88
+ tslib_1.__metadata("design:type", String)
89
+ ], MLPipeline.prototype, "config", void 0);
90
+ tslib_1.__decorate([
91
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Training parameters' }),
92
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Training params as JSON' }),
93
+ tslib_1.__metadata("design:type", String)
94
+ ], MLPipeline.prototype, "trainingParams", void 0);
95
+ tslib_1.__decorate([
96
+ (0, typeorm_1.Column)({ type: 'float', nullable: true, comment: 'Auto-promotion accuracy threshold' }),
97
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Auto-promote if accuracy exceeds this' }),
98
+ tslib_1.__metadata("design:type", Number)
99
+ ], MLPipeline.prototype, "promotionThreshold", void 0);
100
+ tslib_1.__decorate([
101
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Notification settings' }),
102
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Notification config as JSON' }),
103
+ tslib_1.__metadata("design:type", String)
104
+ ], MLPipeline.prototype, "notifications", void 0);
105
+ tslib_1.__decorate([
106
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true, comment: 'Last execution time' }),
107
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Last executed at' }),
108
+ tslib_1.__metadata("design:type", Date)
109
+ ], MLPipeline.prototype, "lastExecutedAt", void 0);
110
+ tslib_1.__decorate([
111
+ (0, typeorm_1.Column)({ type: 'int', default: 0, comment: 'Total execution count' }),
112
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Total times executed' }),
113
+ tslib_1.__metadata("design:type", Number)
114
+ ], MLPipeline.prototype, "executionCount", void 0);
115
+ tslib_1.__decorate([
116
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain),
117
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Domain' }),
118
+ tslib_1.__metadata("design:type", shell_1.Domain)
119
+ ], MLPipeline.prototype, "domain", void 0);
120
+ tslib_1.__decorate([
121
+ (0, typeorm_1.RelationId)((pipeline) => pipeline.domain),
122
+ tslib_1.__metadata("design:type", String)
123
+ ], MLPipeline.prototype, "domainId", void 0);
124
+ tslib_1.__decorate([
125
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
126
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Creator' }),
127
+ tslib_1.__metadata("design:type", auth_base_1.User)
128
+ ], MLPipeline.prototype, "creator", void 0);
129
+ tslib_1.__decorate([
130
+ (0, typeorm_1.RelationId)((pipeline) => pipeline.creator),
131
+ tslib_1.__metadata("design:type", String)
132
+ ], MLPipeline.prototype, "creatorId", void 0);
133
+ tslib_1.__decorate([
134
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
135
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Last updater' }),
136
+ tslib_1.__metadata("design:type", auth_base_1.User)
137
+ ], MLPipeline.prototype, "updater", void 0);
138
+ tslib_1.__decorate([
139
+ (0, typeorm_1.RelationId)((pipeline) => pipeline.updater),
140
+ tslib_1.__metadata("design:type", String)
141
+ ], MLPipeline.prototype, "updaterId", void 0);
142
+ tslib_1.__decorate([
143
+ (0, typeorm_1.CreateDateColumn)(),
144
+ (0, type_graphql_1.Field)({ description: 'Created at' }),
145
+ tslib_1.__metadata("design:type", Date)
146
+ ], MLPipeline.prototype, "createdAt", void 0);
147
+ tslib_1.__decorate([
148
+ (0, typeorm_1.UpdateDateColumn)(),
149
+ (0, type_graphql_1.Field)({ description: 'Updated at' }),
150
+ tslib_1.__metadata("design:type", Date)
151
+ ], MLPipeline.prototype, "updatedAt", void 0);
152
+ tslib_1.__decorate([
153
+ (0, typeorm_1.DeleteDateColumn)(),
154
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Deleted at' }),
155
+ tslib_1.__metadata("design:type", Date)
156
+ ], MLPipeline.prototype, "deletedAt", void 0);
157
+ exports.MLPipeline = MLPipeline = tslib_1.__decorate([
158
+ (0, typeorm_1.Entity)('ml_pipelines'),
159
+ (0, typeorm_1.Index)('ix_ml_pipeline_0', ['domain', 'name']),
160
+ (0, typeorm_1.Index)('ix_ml_pipeline_1', ['domain', 'status']),
161
+ (0, type_graphql_1.ObjectType)({ description: 'ML Pipeline for automated training workflow' })
162
+ ], MLPipeline);
163
+ //# sourceMappingURL=ml-pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-pipeline.js","sourceRoot":"","sources":["../../../server/service/ml-pipeline/ml-pipeline.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAA2E;AAC3E,iDAA8C;AAC9C,yDAAgD;AAEhD;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;AACvB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oBAAoB;CAClC,CAAC,CAAA;AAEF;;GAEG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACn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AC/C,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;GAC9D,UAAU,CAyFtB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n/**\n * Pipeline Status\n */\nexport enum PipelineStatus {\n DRAFT = 'DRAFT',\n ACTIVE = 'ACTIVE',\n PAUSED = 'PAUSED',\n ARCHIVED = 'ARCHIVED'\n}\n\nregisterEnumType(PipelineStatus, {\n name: 'PipelineStatus',\n description: 'ML pipeline status'\n})\n\n/**\n * Pipeline Trigger Type\n */\nexport enum PipelineTriggerType {\n MANUAL = 'MANUAL',\n SCHEDULE = 'SCHEDULE',\n WEBHOOK = 'WEBHOOK',\n EVENT = 'EVENT'\n}\n\nregisterEnumType(PipelineTriggerType, {\n name: 'PipelineTriggerType',\n description: 'How pipeline is triggered'\n})\n\n/**\n * ML Pipeline Entity\n *\n * Represents an end-to-end ML pipeline for auto-training\n */\n@Entity('ml_pipelines')\n@Index('ix_ml_pipeline_0', ['domain', 'name'])\n@Index('ix_ml_pipeline_1', ['domain', 'status'])\n@ObjectType({ description: 'ML Pipeline for automated training workflow' })\nexport class MLPipeline {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Pipeline ID' })\n id: string\n\n @Column({ nullable: true, comment: 'Pipeline name' })\n @Field({ description: 'Pipeline name' })\n name: string\n\n @Column({ nullable: true, comment: 'Pipeline description' })\n @Field({ nullable: true, description: 'Pipeline description' })\n description?: string\n\n @Column({ type: 'varchar', default: PipelineStatus.DRAFT, comment: 'Pipeline status' })\n @Field(type => PipelineStatus, { description: 'Current pipeline status' })\n status: PipelineStatus\n\n @Column({ type: 'varchar', default: PipelineTriggerType.MANUAL, comment: 'Trigger type' })\n @Field(type => PipelineTriggerType, { description: 'How pipeline is triggered' })\n triggerType: PipelineTriggerType\n\n @Column({ nullable: true, comment: 'Cron schedule (if SCHEDULE trigger)' })\n @Field({ nullable: true, description: 'Cron expression for scheduling' })\n schedule?: string\n\n @Column({ type: 'int', nullable: true, comment: 'Label Studio project ID' })\n @Field(type => Int, { nullable: true, description: 'Source Label Studio project' })\n labelStudioProjectId?: number\n\n @Column({ type: 'int', nullable: true, comment: 'Minimum new annotations to trigger' })\n @Field(type => Int, { nullable: true, description: 'Min annotations threshold' })\n annotationThreshold?: number\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Pipeline configuration' })\n @Field(type => String, { nullable: true, description: 'Pipeline config as JSON' })\n config?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Training parameters' })\n @Field(type => String, { nullable: true, description: 'Training params as JSON' })\n trainingParams?: string\n\n @Column({ type: 'float', nullable: true, comment: 'Auto-promotion accuracy threshold' })\n @Field({ nullable: true, description: 'Auto-promote if accuracy exceeds this' })\n promotionThreshold?: number\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Notification settings' })\n @Field(type => String, { nullable: true, description: 'Notification config as JSON' })\n notifications?: string\n\n @Column({ type: 'timestamp', nullable: true, comment: 'Last execution time' })\n @Field({ nullable: true, description: 'Last executed at' })\n lastExecutedAt?: Date\n\n @Column({ type: 'int', default: 0, comment: 'Total execution count' })\n @Field(type => Int, { description: 'Total times executed' })\n executionCount: number\n\n @ManyToOne(() => Domain)\n @Field({ nullable: true, description: 'Domain' })\n domain?: Domain\n\n @RelationId((pipeline: MLPipeline) => pipeline.domain)\n domainId?: string\n\n @ManyToOne(() => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Creator' })\n creator?: User\n\n @RelationId((pipeline: MLPipeline) => pipeline.creator)\n creatorId?: string\n\n @ManyToOne(() => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Last updater' })\n updater?: User\n\n @RelationId((pipeline: MLPipeline) => pipeline.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ description: 'Created at' })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ description: 'Updated at' })\n updatedAt: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Deleted at' })\n deletedAt?: Date\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { MLPipelineRun } from './ml-pipeline-run';
2
+ export declare const entities: (typeof MLPipelineRun)[];
3
+ export declare const resolvers: any[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const ml_pipeline_run_1 = require("./ml-pipeline-run");
5
+ exports.entities = [ml_pipeline_run_1.MLPipelineRun];
6
+ exports.resolvers = [];
7
+ // export * from './ml-pipeline-run'
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/ml-pipeline-run/index.ts"],"names":[],"mappings":";;;AAAA,uDAAiD;AAEpC,QAAA,QAAQ,GAAG,CAAC,+BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,EAAE,CAAA;AAE3B,oCAAoC","sourcesContent":["import { MLPipelineRun } from './ml-pipeline-run'\n\nexport const entities = [MLPipelineRun]\nexport const resolvers = []\n\n// export * from './ml-pipeline-run'\n"]}
@@ -0,0 +1,40 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { MLPipeline } from '../ml-pipeline/ml-pipeline';
4
+ /**
5
+ * Pipeline Run Status
6
+ */
7
+ export declare enum PipelineRunStatus {
8
+ PENDING = "PENDING",
9
+ RUNNING = "RUNNING",
10
+ SUCCEEDED = "SUCCEEDED",
11
+ FAILED = "FAILED",
12
+ CANCELLED = "CANCELLED"
13
+ }
14
+ /**
15
+ * ML Pipeline Run Entity
16
+ *
17
+ * Tracks individual pipeline executions
18
+ */
19
+ export declare class MLPipelineRun {
20
+ id: string;
21
+ pipeline: MLPipeline;
22
+ pipelineId: string;
23
+ status: PipelineRunStatus;
24
+ startedAt?: Date;
25
+ completedAt?: Date;
26
+ duration?: number;
27
+ errorMessage?: string;
28
+ params?: string;
29
+ results?: string;
30
+ trainingDataCount?: number;
31
+ modelId?: string;
32
+ mlflowRunId?: string;
33
+ logs?: string;
34
+ domain?: Domain;
35
+ domainId?: string;
36
+ triggeredBy?: User;
37
+ triggeredById?: string;
38
+ createdAt: Date;
39
+ updatedAt: Date;
40
+ }
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MLPipelineRun = exports.PipelineRunStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ const ml_pipeline_1 = require("../ml-pipeline/ml-pipeline");
10
+ /**
11
+ * Pipeline Run Status
12
+ */
13
+ var PipelineRunStatus;
14
+ (function (PipelineRunStatus) {
15
+ PipelineRunStatus["PENDING"] = "PENDING";
16
+ PipelineRunStatus["RUNNING"] = "RUNNING";
17
+ PipelineRunStatus["SUCCEEDED"] = "SUCCEEDED";
18
+ PipelineRunStatus["FAILED"] = "FAILED";
19
+ PipelineRunStatus["CANCELLED"] = "CANCELLED";
20
+ })(PipelineRunStatus || (exports.PipelineRunStatus = PipelineRunStatus = {}));
21
+ (0, type_graphql_1.registerEnumType)(PipelineRunStatus, {
22
+ name: 'PipelineRunStatus',
23
+ description: 'Status of pipeline execution'
24
+ });
25
+ /**
26
+ * ML Pipeline Run Entity
27
+ *
28
+ * Tracks individual pipeline executions
29
+ */
30
+ let MLPipelineRun = class MLPipelineRun {
31
+ };
32
+ exports.MLPipelineRun = MLPipelineRun;
33
+ tslib_1.__decorate([
34
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
35
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Run ID' }),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], MLPipelineRun.prototype, "id", void 0);
38
+ tslib_1.__decorate([
39
+ (0, typeorm_1.ManyToOne)(() => ml_pipeline_1.MLPipeline),
40
+ (0, type_graphql_1.Field)(type => ml_pipeline_1.MLPipeline, { description: 'Parent pipeline' }),
41
+ tslib_1.__metadata("design:type", ml_pipeline_1.MLPipeline)
42
+ ], MLPipelineRun.prototype, "pipeline", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.RelationId)((run) => run.pipeline),
45
+ tslib_1.__metadata("design:type", String)
46
+ ], MLPipelineRun.prototype, "pipelineId", void 0);
47
+ tslib_1.__decorate([
48
+ (0, typeorm_1.Column)({ type: 'varchar', default: PipelineRunStatus.PENDING, comment: 'Run status' }),
49
+ (0, type_graphql_1.Field)(type => PipelineRunStatus, { description: 'Current run status' }),
50
+ tslib_1.__metadata("design:type", String)
51
+ ], MLPipelineRun.prototype, "status", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true, comment: 'Start time' }),
54
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Started at' }),
55
+ tslib_1.__metadata("design:type", Date)
56
+ ], MLPipelineRun.prototype, "startedAt", void 0);
57
+ tslib_1.__decorate([
58
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true, comment: 'End time' }),
59
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Completed at' }),
60
+ tslib_1.__metadata("design:type", Date)
61
+ ], MLPipelineRun.prototype, "completedAt", void 0);
62
+ tslib_1.__decorate([
63
+ (0, typeorm_1.Column)({ type: 'int', nullable: true, comment: 'Duration in seconds' }),
64
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Duration in seconds' }),
65
+ tslib_1.__metadata("design:type", Number)
66
+ ], MLPipelineRun.prototype, "duration", void 0);
67
+ tslib_1.__decorate([
68
+ (0, typeorm_1.Column)({ type: 'text', nullable: true, comment: 'Error message if failed' }),
69
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Error message' }),
70
+ tslib_1.__metadata("design:type", String)
71
+ ], MLPipelineRun.prototype, "errorMessage", void 0);
72
+ tslib_1.__decorate([
73
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Run parameters' }),
74
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Parameters used as JSON' }),
75
+ tslib_1.__metadata("design:type", String)
76
+ ], MLPipelineRun.prototype, "params", void 0);
77
+ tslib_1.__decorate([
78
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Run results and metrics' }),
79
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Results as JSON' }),
80
+ tslib_1.__metadata("design:type", String)
81
+ ], MLPipelineRun.prototype, "results", void 0);
82
+ tslib_1.__decorate([
83
+ (0, typeorm_1.Column)({ type: 'int', nullable: true, comment: 'Training data count' }),
84
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Number of training samples' }),
85
+ tslib_1.__metadata("design:type", Number)
86
+ ], MLPipelineRun.prototype, "trainingDataCount", void 0);
87
+ tslib_1.__decorate([
88
+ (0, typeorm_1.Column)({ nullable: true, comment: 'Generated model ID' }),
89
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Model ID created by this run' }),
90
+ tslib_1.__metadata("design:type", String)
91
+ ], MLPipelineRun.prototype, "modelId", void 0);
92
+ tslib_1.__decorate([
93
+ (0, typeorm_1.Column)({ nullable: true, comment: 'MLflow run ID' }),
94
+ (0, type_graphql_1.Field)({ nullable: true, description: 'MLflow run ID' }),
95
+ tslib_1.__metadata("design:type", String)
96
+ ], MLPipelineRun.prototype, "mlflowRunId", void 0);
97
+ tslib_1.__decorate([
98
+ (0, typeorm_1.Column)({ type: 'simple-json', nullable: true, comment: 'Logs or execution trace' }),
99
+ (0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Execution logs as JSON' }),
100
+ tslib_1.__metadata("design:type", String)
101
+ ], MLPipelineRun.prototype, "logs", void 0);
102
+ tslib_1.__decorate([
103
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain),
104
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Domain' }),
105
+ tslib_1.__metadata("design:type", shell_1.Domain)
106
+ ], MLPipelineRun.prototype, "domain", void 0);
107
+ tslib_1.__decorate([
108
+ (0, typeorm_1.RelationId)((run) => run.domain),
109
+ tslib_1.__metadata("design:type", String)
110
+ ], MLPipelineRun.prototype, "domainId", void 0);
111
+ tslib_1.__decorate([
112
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
113
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Triggered by' }),
114
+ tslib_1.__metadata("design:type", auth_base_1.User)
115
+ ], MLPipelineRun.prototype, "triggeredBy", void 0);
116
+ tslib_1.__decorate([
117
+ (0, typeorm_1.RelationId)((run) => run.triggeredBy),
118
+ tslib_1.__metadata("design:type", String)
119
+ ], MLPipelineRun.prototype, "triggeredById", void 0);
120
+ tslib_1.__decorate([
121
+ (0, typeorm_1.CreateDateColumn)(),
122
+ (0, type_graphql_1.Field)({ description: 'Created at' }),
123
+ tslib_1.__metadata("design:type", Date)
124
+ ], MLPipelineRun.prototype, "createdAt", void 0);
125
+ tslib_1.__decorate([
126
+ (0, typeorm_1.UpdateDateColumn)(),
127
+ (0, type_graphql_1.Field)({ description: 'Updated at' }),
128
+ tslib_1.__metadata("design:type", Date)
129
+ ], MLPipelineRun.prototype, "updatedAt", void 0);
130
+ exports.MLPipelineRun = MLPipelineRun = tslib_1.__decorate([
131
+ (0, typeorm_1.Entity)('ml_pipeline_runs'),
132
+ (0, typeorm_1.Index)('ix_ml_pipeline_run_0', ['domain', 'pipeline']),
133
+ (0, typeorm_1.Index)('ix_ml_pipeline_run_1', ['status', 'startedAt']),
134
+ (0, type_graphql_1.ObjectType)({ description: 'Individual ML pipeline execution record' })
135
+ ], MLPipelineRun);
136
+ //# sourceMappingURL=ml-pipeline-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ml-pipeline-run.js","sourceRoot":"","sources":["../../../server/service/ml-pipeline-run/ml-pipeline-run.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAC3E,iDAA8C;AAC9C,yDAAgD;AAChD,4DAAuD;AAEvD;;GAEG;AACH,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;AACzB,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AAED,IAAA,+BAAgB,EAAC,iBAAiB,EAAE;IAClC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,8BAA8B;CAC5C,CAAC,CAAA;AAEF;;;;GAIG;AAKI,IAAM,aAAa,GAAnB,MAAM,aAAa;CA6EzB,CAAA;AA7EY,sCAAa;AAGxB;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;;yCACnC;AAIV;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;IAC3B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;sCACpD,wBAAU;+CAAA;AAGpB;IADC,IAAA,oBAAU,EAAC,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC;;iDAC/B;AAIlB;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IACtF,IAAA,oB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CAAC,cAAM,CAAC;IACvB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;sCACxC,cAAM;6CAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;+CAC9B;AAIjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;sCACvD,gBAAI;kDAAA;AAGlB;IADC,IAAA,oBAAU,EAAC,CAAC,GAAkB,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC;;oDAC9B;AAItB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;sCAC1B,IAAI;gDAAA;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;sCAC1B,IAAI;gDAAA;wBA5EJ,aAAa;IAJzB,IAAA,gBAAM,EAAC,kBAAkB,CAAC;IAC1B,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACrD,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACtD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;GAC1D,aAAa,CA6EzB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { MLPipeline } from '../ml-pipeline/ml-pipeline'\n\n/**\n * Pipeline Run Status\n */\nexport enum PipelineRunStatus {\n PENDING = 'PENDING',\n RUNNING = 'RUNNING',\n SUCCEEDED = 'SUCCEEDED',\n FAILED = 'FAILED',\n CANCELLED = 'CANCELLED'\n}\n\nregisterEnumType(PipelineRunStatus, {\n name: 'PipelineRunStatus',\n description: 'Status of pipeline execution'\n})\n\n/**\n * ML Pipeline Run Entity\n *\n * Tracks individual pipeline executions\n */\n@Entity('ml_pipeline_runs')\n@Index('ix_ml_pipeline_run_0', ['domain', 'pipeline'])\n@Index('ix_ml_pipeline_run_1', ['status', 'startedAt'])\n@ObjectType({ description: 'Individual ML pipeline execution record' })\nexport class MLPipelineRun {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Run ID' })\n id: string\n\n @ManyToOne(() => MLPipeline)\n @Field(type => MLPipeline, { description: 'Parent pipeline' })\n pipeline: MLPipeline\n\n @RelationId((run: MLPipelineRun) => run.pipeline)\n pipelineId: string\n\n @Column({ type: 'varchar', default: PipelineRunStatus.PENDING, comment: 'Run status' })\n @Field(type => PipelineRunStatus, { description: 'Current run status' })\n status: PipelineRunStatus\n\n @Column({ type: 'timestamp', nullable: true, comment: 'Start time' })\n @Field({ nullable: true, description: 'Started at' })\n startedAt?: Date\n\n @Column({ type: 'timestamp', nullable: true, comment: 'End time' })\n @Field({ nullable: true, description: 'Completed at' })\n completedAt?: Date\n\n @Column({ type: 'int', nullable: true, comment: 'Duration in seconds' })\n @Field(type => Int, { nullable: true, description: 'Duration in seconds' })\n duration?: number\n\n @Column({ type: 'text', nullable: true, comment: 'Error message if failed' })\n @Field({ nullable: true, description: 'Error message' })\n errorMessage?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Run parameters' })\n @Field(type => String, { nullable: true, description: 'Parameters used as JSON' })\n params?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Run results and metrics' })\n @Field(type => String, { nullable: true, description: 'Results as JSON' })\n results?: string\n\n @Column({ type: 'int', nullable: true, comment: 'Training data count' })\n @Field(type => Int, { nullable: true, description: 'Number of training samples' })\n trainingDataCount?: number\n\n @Column({ nullable: true, comment: 'Generated model ID' })\n @Field({ nullable: true, description: 'Model ID created by this run' })\n modelId?: string\n\n @Column({ nullable: true, comment: 'MLflow run ID' })\n @Field({ nullable: true, description: 'MLflow run ID' })\n mlflowRunId?: string\n\n @Column({ type: 'simple-json', nullable: true, comment: 'Logs or execution trace' })\n @Field(type => String, { nullable: true, description: 'Execution logs as JSON' })\n logs?: string\n\n @ManyToOne(() => Domain)\n @Field({ nullable: true, description: 'Domain' })\n domain?: Domain\n\n @RelationId((run: MLPipelineRun) => run.domain)\n domainId?: string\n\n @ManyToOne(() => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Triggered by' })\n triggeredBy?: User\n\n @RelationId((run: MLPipelineRun) => run.triggeredBy)\n triggeredById?: string\n\n @CreateDateColumn()\n @Field({ description: 'Created at' })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ description: 'Updated at' })\n updatedAt: Date\n}\n"]}