- Fixed Vault as mandatory requirement (not optional) - Created shared model_loader library for trading/backtesting services - Removed ALL AWS SDK dependencies - using Apache Arrow object_store - Enforced central type system - all S3 config through config crate - Fixed storage crate to use Arc<ConfigManager> properly - Added comprehensive model management with PostgreSQL schemas - Achieved clean compilation for core infrastructure crates - Model loading pipeline ready for <50μs inference performance
27 lines
947 B
SQL
27 lines
947 B
SQL
-- Model configuration and versioning
|
|
CREATE TABLE IF NOT EXISTS model_config (
|
|
id SERIAL PRIMARY KEY,
|
|
model_name VARCHAR(255) NOT NULL,
|
|
model_type VARCHAR(100) NOT NULL,
|
|
s3_bucket VARCHAR(255) NOT NULL,
|
|
s3_region VARCHAR(50) NOT NULL,
|
|
cache_path VARCHAR(500) NOT NULL,
|
|
is_active BOOLEAN DEFAULT true,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS model_versions (
|
|
id SERIAL PRIMARY KEY,
|
|
model_config_id INTEGER REFERENCES model_config(id),
|
|
version VARCHAR(50) NOT NULL,
|
|
s3_path VARCHAR(500) NOT NULL,
|
|
checksum VARCHAR(64),
|
|
training_date TIMESTAMP,
|
|
performance_metrics JSONB,
|
|
is_current BOOLEAN DEFAULT false,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE INDEX idx_model_config_name ON model_config(model_name);
|
|
CREATE INDEX idx_model_versions_current ON model_versions(is_current); |