@hazeljs/ml 0.2.3 → 0.3.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 (69) hide show
  1. package/dist/evaluation/metrics.service.test.js +288 -0
  2. package/dist/experiments/__tests__/experiment.decorator.test.d.ts +2 -0
  3. package/dist/experiments/__tests__/experiment.decorator.test.d.ts.map +1 -0
  4. package/dist/experiments/__tests__/experiment.decorator.test.js +121 -0
  5. package/dist/experiments/__tests__/experiment.service.test.d.ts +2 -0
  6. package/dist/experiments/__tests__/experiment.service.test.d.ts.map +1 -0
  7. package/dist/experiments/__tests__/experiment.service.test.js +460 -0
  8. package/dist/experiments/experiment.decorator.d.ts +44 -0
  9. package/dist/experiments/experiment.decorator.d.ts.map +1 -0
  10. package/dist/experiments/experiment.decorator.js +51 -0
  11. package/dist/experiments/experiment.service.d.ts +42 -0
  12. package/dist/experiments/experiment.service.d.ts.map +1 -0
  13. package/dist/experiments/experiment.service.js +355 -0
  14. package/dist/experiments/experiment.types.d.ts +60 -0
  15. package/dist/experiments/experiment.types.d.ts.map +1 -0
  16. package/dist/experiments/experiment.types.js +5 -0
  17. package/dist/experiments/index.d.ts +9 -0
  18. package/dist/experiments/index.d.ts.map +1 -0
  19. package/dist/experiments/index.js +16 -0
  20. package/dist/features/__tests__/feature-view.decorator.test.d.ts +2 -0
  21. package/dist/features/__tests__/feature-view.decorator.test.d.ts.map +1 -0
  22. package/dist/features/__tests__/feature-view.decorator.test.js +168 -0
  23. package/dist/features/__tests__/feature.decorator.test.d.ts +2 -0
  24. package/dist/features/__tests__/feature.decorator.test.d.ts.map +1 -0
  25. package/dist/features/__tests__/feature.decorator.test.js +167 -0
  26. package/dist/features/feature-store.service.d.ts +59 -0
  27. package/dist/features/feature-store.service.d.ts.map +1 -0
  28. package/dist/features/feature-store.service.js +197 -0
  29. package/dist/features/feature-view.decorator.d.ts +52 -0
  30. package/dist/features/feature-view.decorator.d.ts.map +1 -0
  31. package/dist/features/feature-view.decorator.js +54 -0
  32. package/dist/features/feature.decorator.d.ts +42 -0
  33. package/dist/features/feature.decorator.d.ts.map +1 -0
  34. package/dist/features/feature.decorator.js +49 -0
  35. package/dist/features/feature.types.d.ts +93 -0
  36. package/dist/features/feature.types.d.ts.map +1 -0
  37. package/dist/features/feature.types.js +5 -0
  38. package/dist/features/index.d.ts +12 -0
  39. package/dist/features/index.d.ts.map +1 -0
  40. package/dist/features/index.js +29 -0
  41. package/dist/features/offline-store.d.ts +40 -0
  42. package/dist/features/offline-store.d.ts.map +1 -0
  43. package/dist/features/offline-store.js +215 -0
  44. package/dist/features/online-store.d.ts +45 -0
  45. package/dist/features/online-store.d.ts.map +1 -0
  46. package/dist/features/online-store.js +139 -0
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +26 -1
  50. package/dist/monitoring/__tests__/drift.service.test.d.ts +2 -0
  51. package/dist/monitoring/__tests__/drift.service.test.d.ts.map +1 -0
  52. package/dist/monitoring/__tests__/drift.service.test.js +362 -0
  53. package/dist/monitoring/__tests__/monitor.service.test.d.ts +2 -0
  54. package/dist/monitoring/__tests__/monitor.service.test.d.ts.map +1 -0
  55. package/dist/monitoring/__tests__/monitor.service.test.js +360 -0
  56. package/dist/monitoring/drift.service.d.ts +68 -0
  57. package/dist/monitoring/drift.service.d.ts.map +1 -0
  58. package/dist/monitoring/drift.service.js +360 -0
  59. package/dist/monitoring/drift.types.d.ts +44 -0
  60. package/dist/monitoring/drift.types.d.ts.map +1 -0
  61. package/dist/monitoring/drift.types.js +5 -0
  62. package/dist/monitoring/index.d.ts +10 -0
  63. package/dist/monitoring/index.d.ts.map +1 -0
  64. package/dist/monitoring/index.js +13 -0
  65. package/dist/monitoring/monitor.service.d.ts +79 -0
  66. package/dist/monitoring/monitor.service.d.ts.map +1 -0
  67. package/dist/monitoring/monitor.service.js +192 -0
  68. package/dist/training/trainer.service.test.js +105 -0
  69. package/package.json +2 -2
@@ -0,0 +1,93 @@
1
+ /**
2
+ * @hazeljs/ml - Feature Store Type Definitions
3
+ */
4
+ export type FeatureValueType = 'string' | 'number' | 'boolean' | 'array' | 'object';
5
+ export interface FeatureMetadata {
6
+ name: string;
7
+ description?: string;
8
+ valueType: FeatureValueType;
9
+ tags?: string[];
10
+ owner?: string;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }
14
+ export interface FeatureValue {
15
+ entityId: string;
16
+ featureName: string;
17
+ value: unknown;
18
+ timestamp: Date;
19
+ version?: string;
20
+ }
21
+ export interface FeatureSet {
22
+ name: string;
23
+ description?: string;
24
+ features: string[];
25
+ entities: string[];
26
+ source?: string;
27
+ ttl?: number;
28
+ version: string;
29
+ createdAt: Date;
30
+ }
31
+ export interface FeatureView {
32
+ name: string;
33
+ description?: string;
34
+ features: FeatureDefinition[];
35
+ entities: string[];
36
+ source: FeatureSource;
37
+ ttl?: number;
38
+ online?: boolean;
39
+ offline?: boolean;
40
+ }
41
+ export interface FeatureDefinition {
42
+ name: string;
43
+ valueType: FeatureValueType;
44
+ description?: string;
45
+ transform?: (input: unknown) => unknown;
46
+ }
47
+ export interface FeatureSource {
48
+ type: 'batch' | 'stream' | 'request';
49
+ config: Record<string, unknown>;
50
+ }
51
+ export interface FeatureQuery {
52
+ entityIds: string[];
53
+ featureNames: string[];
54
+ timestamp?: Date;
55
+ }
56
+ export interface FeatureResponse {
57
+ entityId: string;
58
+ features: Record<string, unknown>;
59
+ timestamp: Date;
60
+ }
61
+ export interface OnlineStoreConfig {
62
+ type: 'memory' | 'redis';
63
+ redis?: {
64
+ host: string;
65
+ port: number;
66
+ password?: string;
67
+ db?: number;
68
+ };
69
+ }
70
+ export interface OfflineStoreConfig {
71
+ type: 'file' | 'postgres' | 's3';
72
+ file?: {
73
+ path: string;
74
+ };
75
+ postgres?: {
76
+ host: string;
77
+ port: number;
78
+ database: string;
79
+ user: string;
80
+ password: string;
81
+ };
82
+ s3?: {
83
+ bucket: string;
84
+ region: string;
85
+ prefix?: string;
86
+ };
87
+ }
88
+ export interface FeatureStoreConfig {
89
+ online?: OnlineStoreConfig;
90
+ offline?: OfflineStoreConfig;
91
+ enablePointInTime?: boolean;
92
+ }
93
+ //# sourceMappingURL=feature.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.types.d.ts","sourceRoot":"","sources":["../../src/features/feature.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,iBAAiB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;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,EAAE,CAAC,EAAE;QACH,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * @hazeljs/ml - Feature Store Type Definitions
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @hazeljs/ml - Feature Store
3
+ *
4
+ * Export all feature store components
5
+ */
6
+ export type { FeatureValueType, FeatureMetadata, FeatureValue, FeatureSet, FeatureView as FeatureViewType, FeatureDefinition, FeatureSource, FeatureQuery, FeatureResponse, OnlineStoreConfig, OfflineStoreConfig, FeatureStoreConfig, } from './feature.types';
7
+ export { FeatureStoreService } from './feature-store.service';
8
+ export { MemoryOnlineStore, RedisOnlineStore, createOnlineStore, type OnlineStore, } from './online-store';
9
+ export { FileOfflineStore, PostgresOfflineStore, createOfflineStore, type OfflineStore, } from './offline-store';
10
+ export { Feature, getFeatureMetadata, hasFeatureMetadata, type FeatureOptions, type FeatureMetadata as FeatureDecoratorMetadata, } from './feature.decorator';
11
+ export { FeatureView, getFeatureViewMetadata, hasFeatureViewMetadata, type FeatureViewOptions, type FeatureViewMetadata, } from './feature-view.decorator';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,WAAW,IAAI,eAAe,EAC9B,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,OAAO,EACP,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,IAAI,wBAAwB,GACjD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * @hazeljs/ml - Feature Store
4
+ *
5
+ * Export all feature store components
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.hasFeatureViewMetadata = exports.getFeatureViewMetadata = exports.FeatureView = exports.hasFeatureMetadata = exports.getFeatureMetadata = exports.Feature = exports.createOfflineStore = exports.PostgresOfflineStore = exports.FileOfflineStore = exports.createOnlineStore = exports.RedisOnlineStore = exports.MemoryOnlineStore = exports.FeatureStoreService = void 0;
9
+ // Services
10
+ var feature_store_service_1 = require("./feature-store.service");
11
+ Object.defineProperty(exports, "FeatureStoreService", { enumerable: true, get: function () { return feature_store_service_1.FeatureStoreService; } });
12
+ // Stores
13
+ var online_store_1 = require("./online-store");
14
+ Object.defineProperty(exports, "MemoryOnlineStore", { enumerable: true, get: function () { return online_store_1.MemoryOnlineStore; } });
15
+ Object.defineProperty(exports, "RedisOnlineStore", { enumerable: true, get: function () { return online_store_1.RedisOnlineStore; } });
16
+ Object.defineProperty(exports, "createOnlineStore", { enumerable: true, get: function () { return online_store_1.createOnlineStore; } });
17
+ var offline_store_1 = require("./offline-store");
18
+ Object.defineProperty(exports, "FileOfflineStore", { enumerable: true, get: function () { return offline_store_1.FileOfflineStore; } });
19
+ Object.defineProperty(exports, "PostgresOfflineStore", { enumerable: true, get: function () { return offline_store_1.PostgresOfflineStore; } });
20
+ Object.defineProperty(exports, "createOfflineStore", { enumerable: true, get: function () { return offline_store_1.createOfflineStore; } });
21
+ // Decorators
22
+ var feature_decorator_1 = require("./feature.decorator");
23
+ Object.defineProperty(exports, "Feature", { enumerable: true, get: function () { return feature_decorator_1.Feature; } });
24
+ Object.defineProperty(exports, "getFeatureMetadata", { enumerable: true, get: function () { return feature_decorator_1.getFeatureMetadata; } });
25
+ Object.defineProperty(exports, "hasFeatureMetadata", { enumerable: true, get: function () { return feature_decorator_1.hasFeatureMetadata; } });
26
+ var feature_view_decorator_1 = require("./feature-view.decorator");
27
+ Object.defineProperty(exports, "FeatureView", { enumerable: true, get: function () { return feature_view_decorator_1.FeatureView; } });
28
+ Object.defineProperty(exports, "getFeatureViewMetadata", { enumerable: true, get: function () { return feature_view_decorator_1.getFeatureViewMetadata; } });
29
+ Object.defineProperty(exports, "hasFeatureViewMetadata", { enumerable: true, get: function () { return feature_view_decorator_1.hasFeatureViewMetadata; } });
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Offline Feature Store - Historical feature retrieval for training
3
+ */
4
+ import type { FeatureValue, OfflineStoreConfig } from './feature.types';
5
+ export interface OfflineStore {
6
+ write(values: FeatureValue[]): Promise<void>;
7
+ read(entityIds: string[], featureNames: string[], startTime?: Date, endTime?: Date): Promise<FeatureValue[]>;
8
+ readPointInTime(entityIds: string[], featureNames: string[], timestamp: Date): Promise<Record<string, Record<string, unknown>>>;
9
+ close(): Promise<void>;
10
+ }
11
+ /**
12
+ * File-based offline store - for development and small datasets
13
+ */
14
+ export declare class FileOfflineStore implements OfflineStore {
15
+ private filePath;
16
+ private cache;
17
+ private loaded;
18
+ constructor(config: NonNullable<OfflineStoreConfig['file']>);
19
+ private ensureLoaded;
20
+ write(values: FeatureValue[]): Promise<void>;
21
+ read(entityIds: string[], featureNames: string[], startTime?: Date, endTime?: Date): Promise<FeatureValue[]>;
22
+ readPointInTime(entityIds: string[], featureNames: string[], timestamp: Date): Promise<Record<string, Record<string, unknown>>>;
23
+ close(): Promise<void>;
24
+ }
25
+ /**
26
+ * Postgres offline store - for production use
27
+ * Requires 'pg' as peer dependency
28
+ */
29
+ export declare class PostgresOfflineStore implements OfflineStore {
30
+ private pool;
31
+ private config;
32
+ constructor(config: NonNullable<OfflineStoreConfig['postgres']>);
33
+ private ensurePool;
34
+ write(values: FeatureValue[]): Promise<void>;
35
+ read(entityIds: string[], featureNames: string[], startTime?: Date, endTime?: Date): Promise<FeatureValue[]>;
36
+ readPointInTime(entityIds: string[], featureNames: string[], timestamp: Date): Promise<Record<string, Record<string, unknown>>>;
37
+ close(): Promise<void>;
38
+ }
39
+ export declare function createOfflineStore(config: OfflineStoreConfig): OfflineStore;
40
+ //# sourceMappingURL=offline-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offline-store.d.ts","sourceRoot":"","sources":["../../src/features/offline-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CACF,SAAS,EAAE,MAAM,EAAE,EACnB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,CAAC,EAAE,IAAI,EAChB,OAAO,CAAC,EA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AAG,OAAO,CAAC,IAAI,CAAC;IA0B5C,IAAI,CACR,SAAS,EAAE,MAAM,EAAE,EACnB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,CAAC,EAAE,IAAI,EAChB,OAAO,CAAC,EAAE,IAAI,GACb,OAAO,CAAC,YAAY,EAAE,CAAC;IAiCpB,eAAe,CACnB,SAAS,EAAE,MAAM,EAAE,EACnB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,EAAE,IAAI,GACd,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IA2B7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAM7B;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAgB3E"}
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ /**
3
+ * Offline Feature Store - Historical feature retrieval for training
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PostgresOfflineStore = exports.FileOfflineStore = void 0;
7
+ exports.createOfflineStore = createOfflineStore;
8
+ const fs_1 = require("fs");
9
+ const path_1 = require("path");
10
+ /**
11
+ * File-based offline store - for development and small datasets
12
+ */
13
+ class FileOfflineStore {
14
+ constructor(config) {
15
+ this.cache = [];
16
+ this.loaded = false;
17
+ this.filePath = config.path;
18
+ }
19
+ ensureLoaded() {
20
+ if (this.loaded)
21
+ return;
22
+ if ((0, fs_1.existsSync)(this.filePath)) {
23
+ const content = (0, fs_1.readFileSync)(this.filePath, 'utf-8');
24
+ this.cache = content
25
+ .split('\n')
26
+ .filter(Boolean)
27
+ .map((line) => {
28
+ const parsed = JSON.parse(line);
29
+ return {
30
+ ...parsed,
31
+ timestamp: new Date(parsed.timestamp),
32
+ };
33
+ });
34
+ }
35
+ this.loaded = true;
36
+ }
37
+ async write(values) {
38
+ this.ensureLoaded();
39
+ const dir = (0, path_1.dirname)(this.filePath);
40
+ if (!(0, fs_1.existsSync)(dir)) {
41
+ (0, fs_1.mkdirSync)(dir, { recursive: true });
42
+ }
43
+ const lines = values.map((v) => JSON.stringify(v)).join('\n') + '\n';
44
+ (0, fs_1.writeFileSync)(this.filePath, lines, { flag: 'a' });
45
+ this.cache.push(...values);
46
+ }
47
+ async read(entityIds, featureNames, startTime, endTime) {
48
+ this.ensureLoaded();
49
+ return this.cache.filter((v) => {
50
+ const matchEntity = entityIds.includes(v.entityId);
51
+ const matchFeature = featureNames.includes(v.featureName);
52
+ const matchStart = !startTime || v.timestamp >= startTime;
53
+ const matchEnd = !endTime || v.timestamp <= endTime;
54
+ return matchEntity && matchFeature && matchStart && matchEnd;
55
+ });
56
+ }
57
+ async readPointInTime(entityIds, featureNames, timestamp) {
58
+ this.ensureLoaded();
59
+ const result = {};
60
+ for (const entityId of entityIds) {
61
+ result[entityId] = {};
62
+ for (const featureName of featureNames) {
63
+ const matching = this.cache
64
+ .filter((v) => v.entityId === entityId && v.featureName === featureName && v.timestamp <= timestamp)
65
+ .sort((a, b) => b.timestamp.getTime() - a.timestamp.getTime());
66
+ if (matching.length > 0) {
67
+ result[entityId][featureName] = matching[0].value;
68
+ }
69
+ }
70
+ }
71
+ return result;
72
+ }
73
+ async close() {
74
+ this.cache = [];
75
+ this.loaded = false;
76
+ }
77
+ }
78
+ exports.FileOfflineStore = FileOfflineStore;
79
+ /**
80
+ * Postgres offline store - for production use
81
+ * Requires 'pg' as peer dependency
82
+ */
83
+ class PostgresOfflineStore {
84
+ constructor(config) {
85
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
+ this.pool = null;
87
+ this.config = config;
88
+ }
89
+ async ensurePool() {
90
+ if (this.pool)
91
+ return;
92
+ try {
93
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
94
+ const { Pool } = require('pg');
95
+ this.pool = new Pool({
96
+ host: this.config.host,
97
+ port: this.config.port,
98
+ database: this.config.database,
99
+ user: this.config.user,
100
+ password: this.config.password,
101
+ });
102
+ await this.pool.query(`
103
+ CREATE TABLE IF NOT EXISTS hazel_features (
104
+ entity_id TEXT NOT NULL,
105
+ feature_name TEXT NOT NULL,
106
+ value JSONB NOT NULL,
107
+ timestamp TIMESTAMPTZ NOT NULL,
108
+ version TEXT,
109
+ PRIMARY KEY (entity_id, feature_name, timestamp)
110
+ )
111
+ `);
112
+ await this.pool.query(`
113
+ CREATE INDEX IF NOT EXISTS idx_hazel_features_entity_time
114
+ ON hazel_features (entity_id, timestamp DESC)
115
+ `);
116
+ }
117
+ catch (error) {
118
+ throw new Error(`PostgresOfflineStore requires 'pg' package. Install with: npm install pg\nError: ${error instanceof Error ? error.message : String(error)}`);
119
+ }
120
+ }
121
+ async write(values) {
122
+ await this.ensurePool();
123
+ const query = `
124
+ INSERT INTO hazel_features (entity_id, feature_name, value, timestamp, version)
125
+ VALUES ($1, $2, $3, $4, $5)
126
+ ON CONFLICT (entity_id, feature_name, timestamp) DO UPDATE
127
+ SET value = EXCLUDED.value, version = EXCLUDED.version
128
+ `;
129
+ const client = await this.pool.connect();
130
+ try {
131
+ for (const v of values) {
132
+ await client.query(query, [
133
+ v.entityId,
134
+ v.featureName,
135
+ JSON.stringify(v.value),
136
+ v.timestamp,
137
+ v.version ?? null,
138
+ ]);
139
+ }
140
+ }
141
+ finally {
142
+ client.release();
143
+ }
144
+ }
145
+ async read(entityIds, featureNames, startTime, endTime) {
146
+ await this.ensurePool();
147
+ let query = `
148
+ SELECT entity_id, feature_name, value, timestamp, version
149
+ FROM hazel_features
150
+ WHERE entity_id = ANY($1) AND feature_name = ANY($2)
151
+ `;
152
+ const params = [entityIds, featureNames];
153
+ if (startTime) {
154
+ query += ` AND timestamp >= $${params.length + 1}`;
155
+ params.push(startTime);
156
+ }
157
+ if (endTime) {
158
+ query += ` AND timestamp <= $${params.length + 1}`;
159
+ params.push(endTime);
160
+ }
161
+ query += ` ORDER BY timestamp DESC`;
162
+ const result = await this.pool.query(query, params);
163
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
164
+ return result.rows.map((row) => ({
165
+ entityId: row.entity_id,
166
+ featureName: row.feature_name,
167
+ value: JSON.parse(row.value),
168
+ timestamp: new Date(row.timestamp),
169
+ version: row.version,
170
+ }));
171
+ }
172
+ async readPointInTime(entityIds, featureNames, timestamp) {
173
+ await this.ensurePool();
174
+ const query = `
175
+ SELECT DISTINCT ON (entity_id, feature_name)
176
+ entity_id, feature_name, value
177
+ FROM hazel_features
178
+ WHERE entity_id = ANY($1)
179
+ AND feature_name = ANY($2)
180
+ AND timestamp <= $3
181
+ ORDER BY entity_id, feature_name, timestamp DESC
182
+ `;
183
+ const result = await this.pool.query(query, [entityIds, featureNames, timestamp]);
184
+ const output = {};
185
+ for (const entityId of entityIds) {
186
+ output[entityId] = {};
187
+ }
188
+ for (const row of result.rows) {
189
+ output[row.entity_id][row.feature_name] = JSON.parse(row.value);
190
+ }
191
+ return output;
192
+ }
193
+ async close() {
194
+ if (this.pool) {
195
+ await this.pool.end();
196
+ this.pool = null;
197
+ }
198
+ }
199
+ }
200
+ exports.PostgresOfflineStore = PostgresOfflineStore;
201
+ function createOfflineStore(config) {
202
+ if (config.type === 'postgres') {
203
+ if (!config.postgres) {
204
+ throw new Error('Postgres configuration is required for postgres offline store');
205
+ }
206
+ return new PostgresOfflineStore(config.postgres);
207
+ }
208
+ if (config.type === 'file') {
209
+ if (!config.file) {
210
+ throw new Error('File configuration is required for file offline store');
211
+ }
212
+ return new FileOfflineStore(config.file);
213
+ }
214
+ throw new Error(`Unsupported offline store type: ${config.type}`);
215
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Online Feature Store - Low-latency feature retrieval for inference
3
+ */
4
+ import type { FeatureValue, OnlineStoreConfig } from './feature.types';
5
+ export interface OnlineStore {
6
+ get(entityId: string, featureName: string): Promise<FeatureValue | null>;
7
+ getMulti(entityId: string, featureNames: string[]): Promise<Record<string, unknown>>;
8
+ set(value: FeatureValue): Promise<void>;
9
+ setMulti(values: FeatureValue[]): Promise<void>;
10
+ delete(entityId: string, featureName: string): Promise<void>;
11
+ close(): Promise<void>;
12
+ }
13
+ /**
14
+ * In-memory online store - for development and testing
15
+ */
16
+ export declare class MemoryOnlineStore implements OnlineStore {
17
+ private store;
18
+ private getKey;
19
+ get(entityId: string, featureName: string): Promise<FeatureValue | null>;
20
+ getMulti(entityId: string, featureNames: string[]): Promise<Record<string, unknown>>;
21
+ set(value: FeatureValue): Promise<void>;
22
+ setMulti(values: FeatureValue[]): Promise<void>;
23
+ delete(entityId: string, featureName: string): Promise<void>;
24
+ close(): Promise<void>;
25
+ size(): number;
26
+ }
27
+ /**
28
+ * Redis online store - for production use
29
+ * Requires 'redis' as peer dependency
30
+ */
31
+ export declare class RedisOnlineStore implements OnlineStore {
32
+ private client;
33
+ private config;
34
+ constructor(config: NonNullable<OnlineStoreConfig['redis']>);
35
+ private ensureClient;
36
+ private getKey;
37
+ get(entityId: string, featureName: string): Promise<FeatureValue | null>;
38
+ getMulti(entityId: string, featureNames: string[]): Promise<Record<string, unknown>>;
39
+ set(value: FeatureValue): Promise<void>;
40
+ setMulti(values: FeatureValue[]): Promise<void>;
41
+ delete(entityId: string, featureName: string): Promise<void>;
42
+ close(): Promise<void>;
43
+ }
44
+ export declare function createOnlineStore(config: OnlineStoreConfig): OnlineStore;
45
+ //# sourceMappingURL=online-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"online-store.d.ts","sourceRoot":"","sources":["../../src/features/online-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACzE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAA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AE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAQxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAepF,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvC,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/C,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAM7B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,WAAW,CAQxE"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ /**
3
+ * Online Feature Store - Low-latency feature retrieval for inference
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RedisOnlineStore = exports.MemoryOnlineStore = void 0;
7
+ exports.createOnlineStore = createOnlineStore;
8
+ /**
9
+ * In-memory online store - for development and testing
10
+ */
11
+ class MemoryOnlineStore {
12
+ constructor() {
13
+ this.store = new Map();
14
+ }
15
+ getKey(entityId, featureName) {
16
+ return `${entityId}:${featureName}`;
17
+ }
18
+ async get(entityId, featureName) {
19
+ return this.store.get(this.getKey(entityId, featureName)) ?? null;
20
+ }
21
+ async getMulti(entityId, featureNames) {
22
+ const result = {};
23
+ for (const name of featureNames) {
24
+ const value = await this.get(entityId, name);
25
+ if (value) {
26
+ result[name] = value.value;
27
+ }
28
+ }
29
+ return result;
30
+ }
31
+ async set(value) {
32
+ this.store.set(this.getKey(value.entityId, value.featureName), value);
33
+ }
34
+ async setMulti(values) {
35
+ for (const value of values) {
36
+ await this.set(value);
37
+ }
38
+ }
39
+ async delete(entityId, featureName) {
40
+ this.store.delete(this.getKey(entityId, featureName));
41
+ }
42
+ async close() {
43
+ this.store.clear();
44
+ }
45
+ size() {
46
+ return this.store.size;
47
+ }
48
+ }
49
+ exports.MemoryOnlineStore = MemoryOnlineStore;
50
+ /**
51
+ * Redis online store - for production use
52
+ * Requires 'redis' as peer dependency
53
+ */
54
+ class RedisOnlineStore {
55
+ constructor(config) {
56
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
+ this.client = null;
58
+ this.config = config;
59
+ }
60
+ async ensureClient() {
61
+ if (this.client)
62
+ return;
63
+ try {
64
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
65
+ const redis = require('redis');
66
+ this.client = redis.createClient({
67
+ socket: {
68
+ host: this.config.host,
69
+ port: this.config.port,
70
+ },
71
+ password: this.config.password,
72
+ database: this.config.db ?? 0,
73
+ });
74
+ await this.client.connect();
75
+ }
76
+ catch (error) {
77
+ throw new Error(`RedisOnlineStore requires 'redis' package. Install with: npm install redis\nError: ${error instanceof Error ? error.message : String(error)}`);
78
+ }
79
+ }
80
+ getKey(entityId, featureName) {
81
+ return `hazel:feature:${entityId}:${featureName}`;
82
+ }
83
+ async get(entityId, featureName) {
84
+ await this.ensureClient();
85
+ const key = this.getKey(entityId, featureName);
86
+ const data = await this.client.get(key);
87
+ if (!data)
88
+ return null;
89
+ return JSON.parse(data);
90
+ }
91
+ async getMulti(entityId, featureNames) {
92
+ await this.ensureClient();
93
+ const keys = featureNames.map((name) => this.getKey(entityId, name));
94
+ const values = await this.client.mGet(keys);
95
+ const result = {};
96
+ for (let i = 0; i < featureNames.length; i++) {
97
+ if (values[i]) {
98
+ const parsed = JSON.parse(values[i]);
99
+ result[featureNames[i]] = parsed.value;
100
+ }
101
+ }
102
+ return result;
103
+ }
104
+ async set(value) {
105
+ await this.ensureClient();
106
+ const key = this.getKey(value.entityId, value.featureName);
107
+ await this.client.set(key, JSON.stringify(value));
108
+ }
109
+ async setMulti(values) {
110
+ await this.ensureClient();
111
+ const pipeline = this.client.multi();
112
+ for (const value of values) {
113
+ const key = this.getKey(value.entityId, value.featureName);
114
+ pipeline.set(key, JSON.stringify(value));
115
+ }
116
+ await pipeline.exec();
117
+ }
118
+ async delete(entityId, featureName) {
119
+ await this.ensureClient();
120
+ const key = this.getKey(entityId, featureName);
121
+ await this.client.del(key);
122
+ }
123
+ async close() {
124
+ if (this.client) {
125
+ await this.client.quit();
126
+ this.client = null;
127
+ }
128
+ }
129
+ }
130
+ exports.RedisOnlineStore = RedisOnlineStore;
131
+ function createOnlineStore(config) {
132
+ if (config.type === 'redis') {
133
+ if (!config.redis) {
134
+ throw new Error('Redis configuration is required for redis online store');
135
+ }
136
+ return new RedisOnlineStore(config.redis);
137
+ }
138
+ return new MemoryOnlineStore();
139
+ }
package/dist/index.d.ts CHANGED
@@ -13,4 +13,7 @@ export { MetricsService, type ModelMetrics, type EvaluationResult, type Evaluate
13
13
  export { registerMLModel } from './ml-model.base';
14
14
  export { Injectable } from '@hazeljs/core';
15
15
  export type { MLFramework, ModelMetadata, TrainingData, TrainingResult, PredictionResult, ModelVersion, } from './ml.types';
16
+ export { FeatureStoreService, MemoryOnlineStore, RedisOnlineStore, FileOfflineStore, PostgresOfflineStore, createOnlineStore, createOfflineStore, Feature, FeatureView, getFeatureMetadata, hasFeatureMetadata, getFeatureViewMetadata, hasFeatureViewMetadata, type FeatureValueType, type FeatureMetadata, type FeatureValue, type FeatureViewType, type FeatureDefinition, type FeatureQuery, type FeatureResponse, type OnlineStoreConfig, type OfflineStoreConfig, type FeatureStoreConfig, type FeatureOptions, type FeatureViewOptions, } from './features';
17
+ export { ExperimentService, Experiment, getExperimentMetadata, hasExperimentMetadata, type ExperimentType, type Run, type Artifact, type ExperimentConfig, type ExperimentOptions, type ExperimentMetadata, } from './experiments';
18
+ export { DriftService, MonitorService, type DriftType, type DriftConfig, type DriftResult, type DriftReport, type DistributionStats, type MonitorConfig, type MonitorAlert, type AlertHandler, } from './monitoring';
16
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxE,OAAO,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGhF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxE,OA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nB,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,YAAY,EACZ,cAAc,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * @hazeljs/ml - Machine Learning & Model Management for HazelJS
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Injectable = exports.registerMLModel = exports.MetricsService = exports.BatchService = exports.PredictorService = exports.PipelineService = exports.TrainerService = exports.ModelRegistry = exports.hasPredictMetadata = exports.getPredictMetadata = exports.hasTrainMetadata = exports.getTrainMetadata = exports.hasModelMetadata = exports.getModelMetadata = exports.Predict = exports.Train = exports.Model = exports.ML_MODELS = exports.MLModule = void 0;
6
+ exports.MonitorService = exports.DriftService = exports.hasExperimentMetadata = exports.getExperimentMetadata = exports.Experiment = exports.ExperimentService = exports.hasFeatureViewMetadata = exports.getFeatureViewMetadata = exports.hasFeatureMetadata = exports.getFeatureMetadata = exports.FeatureView = exports.Feature = exports.createOfflineStore = exports.createOnlineStore = exports.PostgresOfflineStore = exports.FileOfflineStore = exports.RedisOnlineStore = exports.MemoryOnlineStore = exports.FeatureStoreService = exports.Injectable = exports.registerMLModel = exports.MetricsService = exports.BatchService = exports.PredictorService = exports.PipelineService = exports.TrainerService = exports.ModelRegistry = exports.hasPredictMetadata = exports.getPredictMetadata = exports.hasTrainMetadata = exports.getTrainMetadata = exports.hasModelMetadata = exports.getModelMetadata = exports.Predict = exports.Train = exports.Model = exports.ML_MODELS = exports.MLModule = void 0;
7
7
  require("reflect-metadata");
8
8
  // Module
9
9
  var ml_module_1 = require("./ml.module");
@@ -40,3 +40,28 @@ Object.defineProperty(exports, "registerMLModel", { enumerable: true, get: funct
40
40
  // Re-export Injectable from core for convenience
41
41
  var core_1 = require("@hazeljs/core");
42
42
  Object.defineProperty(exports, "Injectable", { enumerable: true, get: function () { return core_1.Injectable; } });
43
+ // Feature Store
44
+ var features_1 = require("./features");
45
+ Object.defineProperty(exports, "FeatureStoreService", { enumerable: true, get: function () { return features_1.FeatureStoreService; } });
46
+ Object.defineProperty(exports, "MemoryOnlineStore", { enumerable: true, get: function () { return features_1.MemoryOnlineStore; } });
47
+ Object.defineProperty(exports, "RedisOnlineStore", { enumerable: true, get: function () { return features_1.RedisOnlineStore; } });
48
+ Object.defineProperty(exports, "FileOfflineStore", { enumerable: true, get: function () { return features_1.FileOfflineStore; } });
49
+ Object.defineProperty(exports, "PostgresOfflineStore", { enumerable: true, get: function () { return features_1.PostgresOfflineStore; } });
50
+ Object.defineProperty(exports, "createOnlineStore", { enumerable: true, get: function () { return features_1.createOnlineStore; } });
51
+ Object.defineProperty(exports, "createOfflineStore", { enumerable: true, get: function () { return features_1.createOfflineStore; } });
52
+ Object.defineProperty(exports, "Feature", { enumerable: true, get: function () { return features_1.Feature; } });
53
+ Object.defineProperty(exports, "FeatureView", { enumerable: true, get: function () { return features_1.FeatureView; } });
54
+ Object.defineProperty(exports, "getFeatureMetadata", { enumerable: true, get: function () { return features_1.getFeatureMetadata; } });
55
+ Object.defineProperty(exports, "hasFeatureMetadata", { enumerable: true, get: function () { return features_1.hasFeatureMetadata; } });
56
+ Object.defineProperty(exports, "getFeatureViewMetadata", { enumerable: true, get: function () { return features_1.getFeatureViewMetadata; } });
57
+ Object.defineProperty(exports, "hasFeatureViewMetadata", { enumerable: true, get: function () { return features_1.hasFeatureViewMetadata; } });
58
+ // Experiment Tracking
59
+ var experiments_1 = require("./experiments");
60
+ Object.defineProperty(exports, "ExperimentService", { enumerable: true, get: function () { return experiments_1.ExperimentService; } });
61
+ Object.defineProperty(exports, "Experiment", { enumerable: true, get: function () { return experiments_1.Experiment; } });
62
+ Object.defineProperty(exports, "getExperimentMetadata", { enumerable: true, get: function () { return experiments_1.getExperimentMetadata; } });
63
+ Object.defineProperty(exports, "hasExperimentMetadata", { enumerable: true, get: function () { return experiments_1.hasExperimentMetadata; } });
64
+ // Monitoring & Drift Detection
65
+ var monitoring_1 = require("./monitoring");
66
+ Object.defineProperty(exports, "DriftService", { enumerable: true, get: function () { return monitoring_1.DriftService; } });
67
+ Object.defineProperty(exports, "MonitorService", { enumerable: true, get: function () { return monitoring_1.MonitorService; } });