mcli-framework 7.0.5__py3-none-any.whl → 7.0.6__py3-none-any.whl
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.
Potentially problematic release.
This version of mcli-framework might be problematic. Click here for more details.
- mcli/self/self_cmd.py +22 -5
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/METADATA +1 -1
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/RECORD +7 -64
- mcli/__init__.py +0 -160
- mcli/__main__.py +0 -14
- mcli/app/__init__.py +0 -32
- mcli/app/model/__init__.py +0 -0
- mcli/app/video/__init__.py +0 -5
- mcli/chat/__init__.py +0 -34
- mcli/lib/__init__.py +0 -0
- mcli/lib/api/__init__.py +0 -0
- mcli/lib/auth/__init__.py +0 -1
- mcli/lib/config/__init__.py +0 -1
- mcli/lib/erd/__init__.py +0 -25
- mcli/lib/files/__init__.py +0 -0
- mcli/lib/fs/__init__.py +0 -1
- mcli/lib/logger/__init__.py +0 -3
- mcli/lib/performance/__init__.py +0 -17
- mcli/lib/pickles/__init__.py +0 -1
- mcli/lib/shell/__init__.py +0 -0
- mcli/lib/toml/__init__.py +0 -1
- mcli/lib/watcher/__init__.py +0 -0
- mcli/ml/__init__.py +0 -16
- mcli/ml/api/__init__.py +0 -31
- mcli/ml/api/routers/__init__.py +0 -27
- mcli/ml/auth/__init__.py +0 -45
- mcli/ml/backtesting/__init__.py +0 -41
- mcli/ml/cli/__init__.py +0 -5
- mcli/ml/config/__init__.py +0 -33
- mcli/ml/configs/__init__.py +0 -16
- mcli/ml/dashboard/__init__.py +0 -10
- mcli/ml/data_ingestion/__init__.py +0 -41
- mcli/ml/database/__init__.py +0 -47
- mcli/ml/experimentation/__init__.py +0 -29
- mcli/ml/features/__init__.py +0 -39
- mcli/ml/mlops/__init__.py +0 -35
- mcli/ml/models/__init__.py +0 -97
- mcli/ml/monitoring/__init__.py +0 -25
- mcli/ml/optimization/__init__.py +0 -27
- mcli/ml/preprocessing/__init__.py +0 -28
- mcli/ml/scripts/__init__.py +0 -1
- mcli/public/__init__.py +0 -1
- mcli/public/commands/__init__.py +0 -2
- mcli/self/__init__.py +0 -3
- mcli/workflow/__init__.py +0 -0
- mcli/workflow/daemon/__init__.py +0 -13
- mcli/workflow/dashboard/__init__.py +0 -5
- mcli/workflow/docker/__init__.py +0 -0
- mcli/workflow/file/__init__.py +0 -0
- mcli/workflow/gcloud/__init__.py +0 -1
- mcli/workflow/git_commit/__init__.py +0 -0
- mcli/workflow/interview/__init__.py +0 -0
- mcli/workflow/politician_trading/__init__.py +0 -4
- mcli/workflow/registry/__init__.py +0 -0
- mcli/workflow/repo/__init__.py +0 -0
- mcli/workflow/scheduler/__init__.py +0 -25
- mcli/workflow/search/__init__.py +0 -0
- mcli/workflow/sync/__init__.py +0 -5
- mcli/workflow/videos/__init__.py +0 -1
- mcli/workflow/wakatime/__init__.py +0 -80
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/WHEEL +0 -0
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/entry_points.txt +0 -0
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/licenses/LICENSE +0 -0
- {mcli_framework-7.0.5.dist-info → mcli_framework-7.0.6.dist-info}/top_level.txt +0 -0
mcli/ml/api/__init__.py
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"""API routes and endpoints for ML system"""
|
|
2
|
-
|
|
3
|
-
from .routers import (
|
|
4
|
-
auth_router,
|
|
5
|
-
model_router,
|
|
6
|
-
prediction_router,
|
|
7
|
-
portfolio_router,
|
|
8
|
-
data_router,
|
|
9
|
-
trade_router,
|
|
10
|
-
backtest_router,
|
|
11
|
-
monitoring_router,
|
|
12
|
-
admin_router,
|
|
13
|
-
websocket_router,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
from .app import create_app, get_application
|
|
17
|
-
|
|
18
|
-
__all__ = [
|
|
19
|
-
"auth_router",
|
|
20
|
-
"model_router",
|
|
21
|
-
"prediction_router",
|
|
22
|
-
"portfolio_router",
|
|
23
|
-
"data_router",
|
|
24
|
-
"trade_router",
|
|
25
|
-
"backtest_router",
|
|
26
|
-
"monitoring_router",
|
|
27
|
-
"admin_router",
|
|
28
|
-
"websocket_router",
|
|
29
|
-
"create_app",
|
|
30
|
-
"get_application",
|
|
31
|
-
]
|
mcli/ml/api/routers/__init__.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""API routers"""
|
|
2
|
-
|
|
3
|
-
from . import (
|
|
4
|
-
auth_router,
|
|
5
|
-
model_router,
|
|
6
|
-
prediction_router,
|
|
7
|
-
portfolio_router,
|
|
8
|
-
data_router,
|
|
9
|
-
trade_router,
|
|
10
|
-
backtest_router,
|
|
11
|
-
monitoring_router,
|
|
12
|
-
admin_router,
|
|
13
|
-
websocket_router,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
__all__ = [
|
|
17
|
-
"auth_router",
|
|
18
|
-
"model_router",
|
|
19
|
-
"prediction_router",
|
|
20
|
-
"portfolio_router",
|
|
21
|
-
"data_router",
|
|
22
|
-
"trade_router",
|
|
23
|
-
"backtest_router",
|
|
24
|
-
"monitoring_router",
|
|
25
|
-
"admin_router",
|
|
26
|
-
"websocket_router",
|
|
27
|
-
]
|
mcli/ml/auth/__init__.py
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"""Authentication and authorization system"""
|
|
2
|
-
|
|
3
|
-
from .auth_manager import (
|
|
4
|
-
AuthManager,
|
|
5
|
-
create_access_token,
|
|
6
|
-
verify_access_token,
|
|
7
|
-
get_current_user,
|
|
8
|
-
get_current_active_user,
|
|
9
|
-
require_role,
|
|
10
|
-
hash_password,
|
|
11
|
-
verify_password,
|
|
12
|
-
)
|
|
13
|
-
from .models import (
|
|
14
|
-
UserCreate,
|
|
15
|
-
UserLogin,
|
|
16
|
-
UserResponse,
|
|
17
|
-
TokenResponse,
|
|
18
|
-
PasswordReset,
|
|
19
|
-
PasswordChange,
|
|
20
|
-
)
|
|
21
|
-
from .permissions import (
|
|
22
|
-
Permission,
|
|
23
|
-
check_permission,
|
|
24
|
-
has_permission,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
__all__ = [
|
|
28
|
-
"AuthManager",
|
|
29
|
-
"create_access_token",
|
|
30
|
-
"verify_access_token",
|
|
31
|
-
"get_current_user",
|
|
32
|
-
"get_current_active_user",
|
|
33
|
-
"require_role",
|
|
34
|
-
"hash_password",
|
|
35
|
-
"verify_password",
|
|
36
|
-
"UserCreate",
|
|
37
|
-
"UserLogin",
|
|
38
|
-
"UserResponse",
|
|
39
|
-
"TokenResponse",
|
|
40
|
-
"PasswordReset",
|
|
41
|
-
"PasswordChange",
|
|
42
|
-
"Permission",
|
|
43
|
-
"check_permission",
|
|
44
|
-
"has_permission",
|
|
45
|
-
]
|
mcli/ml/backtesting/__init__.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"""Backtesting framework for trading strategies"""
|
|
2
|
-
|
|
3
|
-
from .backtest_engine import (
|
|
4
|
-
BacktestEngine,
|
|
5
|
-
BacktestConfig,
|
|
6
|
-
BacktestResult,
|
|
7
|
-
TradingStrategy,
|
|
8
|
-
PositionManager,
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
from .performance_metrics import (
|
|
12
|
-
PerformanceAnalyzer,
|
|
13
|
-
PortfolioMetrics,
|
|
14
|
-
RiskMetrics,
|
|
15
|
-
plot_performance,
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
from .trading_simulator import (
|
|
19
|
-
TradingSimulator,
|
|
20
|
-
Order,
|
|
21
|
-
Position,
|
|
22
|
-
Portfolio,
|
|
23
|
-
MarketSimulator,
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
__all__ = [
|
|
27
|
-
"BacktestEngine",
|
|
28
|
-
"BacktestConfig",
|
|
29
|
-
"BacktestResult",
|
|
30
|
-
"TradingStrategy",
|
|
31
|
-
"PositionManager",
|
|
32
|
-
"PerformanceAnalyzer",
|
|
33
|
-
"PortfolioMetrics",
|
|
34
|
-
"RiskMetrics",
|
|
35
|
-
"plot_performance",
|
|
36
|
-
"TradingSimulator",
|
|
37
|
-
"Order",
|
|
38
|
-
"Position",
|
|
39
|
-
"Portfolio",
|
|
40
|
-
"MarketSimulator",
|
|
41
|
-
]
|
mcli/ml/cli/__init__.py
DELETED
mcli/ml/config/__init__.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"""Configuration management for ML system"""
|
|
2
|
-
|
|
3
|
-
from .settings import (
|
|
4
|
-
Settings,
|
|
5
|
-
DatabaseSettings,
|
|
6
|
-
RedisSettings,
|
|
7
|
-
MLflowSettings,
|
|
8
|
-
ModelSettings,
|
|
9
|
-
DataSettings,
|
|
10
|
-
APISettings,
|
|
11
|
-
MonitoringSettings,
|
|
12
|
-
SecuritySettings,
|
|
13
|
-
settings,
|
|
14
|
-
get_settings,
|
|
15
|
-
update_settings,
|
|
16
|
-
create_settings,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
__all__ = [
|
|
20
|
-
"Settings",
|
|
21
|
-
"DatabaseSettings",
|
|
22
|
-
"RedisSettings",
|
|
23
|
-
"MLflowSettings",
|
|
24
|
-
"ModelSettings",
|
|
25
|
-
"DataSettings",
|
|
26
|
-
"APISettings",
|
|
27
|
-
"MonitoringSettings",
|
|
28
|
-
"SecuritySettings",
|
|
29
|
-
"settings",
|
|
30
|
-
"get_settings",
|
|
31
|
-
"update_settings",
|
|
32
|
-
"create_settings",
|
|
33
|
-
]
|
mcli/ml/configs/__init__.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""ML Configuration Module"""
|
|
2
|
-
|
|
3
|
-
from .dvc_config import DVCConfig, get_dvc_config, setup_dvc
|
|
4
|
-
from .mlflow_config import MLflowConfig, get_mlflow_config, setup_mlflow
|
|
5
|
-
from .mlops_manager import MLOpsManager, get_mlops_manager
|
|
6
|
-
|
|
7
|
-
__all__ = [
|
|
8
|
-
"MLflowConfig",
|
|
9
|
-
"get_mlflow_config",
|
|
10
|
-
"setup_mlflow",
|
|
11
|
-
"DVCConfig",
|
|
12
|
-
"get_dvc_config",
|
|
13
|
-
"setup_dvc",
|
|
14
|
-
"MLOpsManager",
|
|
15
|
-
"get_mlops_manager",
|
|
16
|
-
]
|
mcli/ml/dashboard/__init__.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"""Real-time data ingestion pipeline"""
|
|
2
|
-
|
|
3
|
-
from .stream_processor import (
|
|
4
|
-
StreamProcessor,
|
|
5
|
-
DataStream,
|
|
6
|
-
KafkaConsumer,
|
|
7
|
-
WebSocketConsumer,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from .api_connectors import (
|
|
11
|
-
CongressionalDataAPI,
|
|
12
|
-
StockMarketAPI,
|
|
13
|
-
AlphaVantageConnector,
|
|
14
|
-
YahooFinanceConnector,
|
|
15
|
-
PolygonIOConnector,
|
|
16
|
-
QuiverQuantConnector,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
from .data_pipeline import (
|
|
20
|
-
IngestionPipeline,
|
|
21
|
-
DataValidator,
|
|
22
|
-
DataTransformer,
|
|
23
|
-
DataLoader,
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
__all__ = [
|
|
27
|
-
"StreamProcessor",
|
|
28
|
-
"DataStream",
|
|
29
|
-
"KafkaConsumer",
|
|
30
|
-
"WebSocketConsumer",
|
|
31
|
-
"CongressionalDataAPI",
|
|
32
|
-
"StockMarketAPI",
|
|
33
|
-
"AlphaVantageConnector",
|
|
34
|
-
"YahooFinanceConnector",
|
|
35
|
-
"PolygonIOConnector",
|
|
36
|
-
"QuiverQuantConnector",
|
|
37
|
-
"IngestionPipeline",
|
|
38
|
-
"DataValidator",
|
|
39
|
-
"DataTransformer",
|
|
40
|
-
"DataLoader",
|
|
41
|
-
]
|
mcli/ml/database/__init__.py
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"""Database models and utilities"""
|
|
2
|
-
|
|
3
|
-
from .models import (
|
|
4
|
-
Base,
|
|
5
|
-
User,
|
|
6
|
-
Trade,
|
|
7
|
-
Politician,
|
|
8
|
-
StockData,
|
|
9
|
-
Prediction,
|
|
10
|
-
Portfolio,
|
|
11
|
-
Alert,
|
|
12
|
-
BacktestResult,
|
|
13
|
-
Experiment,
|
|
14
|
-
Model,
|
|
15
|
-
FeatureSet,
|
|
16
|
-
DataVersion,
|
|
17
|
-
)
|
|
18
|
-
from .session import (
|
|
19
|
-
get_db,
|
|
20
|
-
get_async_db,
|
|
21
|
-
SessionLocal,
|
|
22
|
-
AsyncSessionLocal,
|
|
23
|
-
engine,
|
|
24
|
-
async_engine,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
__all__ = [
|
|
28
|
-
"Base",
|
|
29
|
-
"User",
|
|
30
|
-
"Trade",
|
|
31
|
-
"Politician",
|
|
32
|
-
"StockData",
|
|
33
|
-
"Prediction",
|
|
34
|
-
"Portfolio",
|
|
35
|
-
"Alert",
|
|
36
|
-
"BacktestResult",
|
|
37
|
-
"Experiment",
|
|
38
|
-
"Model",
|
|
39
|
-
"FeatureSet",
|
|
40
|
-
"DataVersion",
|
|
41
|
-
"get_db",
|
|
42
|
-
"get_async_db",
|
|
43
|
-
"SessionLocal",
|
|
44
|
-
"AsyncSessionLocal",
|
|
45
|
-
"engine",
|
|
46
|
-
"async_engine",
|
|
47
|
-
]
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"""ML Experimentation and A/B Testing Framework"""
|
|
2
|
-
|
|
3
|
-
from .ab_testing import (
|
|
4
|
-
ABTestingFramework,
|
|
5
|
-
ExperimentConfig,
|
|
6
|
-
Variant,
|
|
7
|
-
VariantType,
|
|
8
|
-
Metric,
|
|
9
|
-
ExperimentStatus,
|
|
10
|
-
ExperimentResult,
|
|
11
|
-
UserAssignment,
|
|
12
|
-
TrafficSplitter,
|
|
13
|
-
MetricsCollector,
|
|
14
|
-
StatisticalAnalyzer,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
__all__ = [
|
|
18
|
-
"ABTestingFramework",
|
|
19
|
-
"ExperimentConfig",
|
|
20
|
-
"Variant",
|
|
21
|
-
"VariantType",
|
|
22
|
-
"Metric",
|
|
23
|
-
"ExperimentStatus",
|
|
24
|
-
"ExperimentResult",
|
|
25
|
-
"UserAssignment",
|
|
26
|
-
"TrafficSplitter",
|
|
27
|
-
"MetricsCollector",
|
|
28
|
-
"StatisticalAnalyzer",
|
|
29
|
-
]
|
mcli/ml/features/__init__.py
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"""Feature Engineering Module for Stock Recommendation Models"""
|
|
2
|
-
|
|
3
|
-
from .stock_features import (
|
|
4
|
-
StockRecommendationFeatures,
|
|
5
|
-
TechnicalIndicatorFeatures,
|
|
6
|
-
MarketRegimeFeatures,
|
|
7
|
-
CrossAssetFeatures,
|
|
8
|
-
)
|
|
9
|
-
from .political_features import (
|
|
10
|
-
PoliticalInfluenceFeatures,
|
|
11
|
-
CongressionalTrackingFeatures,
|
|
12
|
-
PolicyImpactFeatures,
|
|
13
|
-
)
|
|
14
|
-
from .ensemble_features import (
|
|
15
|
-
EnsembleFeatureBuilder,
|
|
16
|
-
FeatureInteractionEngine,
|
|
17
|
-
DynamicFeatureSelector,
|
|
18
|
-
)
|
|
19
|
-
from .recommendation_engine import (
|
|
20
|
-
StockRecommendationEngine,
|
|
21
|
-
RecommendationConfig,
|
|
22
|
-
RecommendationResult,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
__all__ = [
|
|
26
|
-
"StockRecommendationFeatures",
|
|
27
|
-
"TechnicalIndicatorFeatures",
|
|
28
|
-
"MarketRegimeFeatures",
|
|
29
|
-
"CrossAssetFeatures",
|
|
30
|
-
"PoliticalInfluenceFeatures",
|
|
31
|
-
"CongressionalTrackingFeatures",
|
|
32
|
-
"PolicyImpactFeatures",
|
|
33
|
-
"EnsembleFeatureBuilder",
|
|
34
|
-
"FeatureInteractionEngine",
|
|
35
|
-
"DynamicFeatureSelector",
|
|
36
|
-
"StockRecommendationEngine",
|
|
37
|
-
"RecommendationConfig",
|
|
38
|
-
"RecommendationResult",
|
|
39
|
-
]
|
mcli/ml/mlops/__init__.py
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"""MLOps components for ML pipeline management"""
|
|
2
|
-
|
|
3
|
-
from .experiment_tracker import (
|
|
4
|
-
ExperimentTracker,
|
|
5
|
-
ModelRegistry,
|
|
6
|
-
MLflowConfig,
|
|
7
|
-
ExperimentRun,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from .model_serving import (
|
|
11
|
-
ModelServer,
|
|
12
|
-
PredictionService,
|
|
13
|
-
ModelEndpoint,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
from .pipeline_orchestrator import (
|
|
17
|
-
MLPipeline,
|
|
18
|
-
PipelineStep,
|
|
19
|
-
PipelineConfig,
|
|
20
|
-
PipelineExecutor,
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
__all__ = [
|
|
24
|
-
"ExperimentTracker",
|
|
25
|
-
"ModelRegistry",
|
|
26
|
-
"MLflowConfig",
|
|
27
|
-
"ExperimentRun",
|
|
28
|
-
"ModelServer",
|
|
29
|
-
"PredictionService",
|
|
30
|
-
"ModelEndpoint",
|
|
31
|
-
"MLPipeline",
|
|
32
|
-
"PipelineStep",
|
|
33
|
-
"PipelineConfig",
|
|
34
|
-
"PipelineExecutor",
|
|
35
|
-
]
|
mcli/ml/models/__init__.py
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"""ML Models for Stock Recommendation System"""
|
|
2
|
-
|
|
3
|
-
import torch
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from typing import Dict, Any, Optional
|
|
6
|
-
|
|
7
|
-
from .ensemble_models import (
|
|
8
|
-
DeepEnsembleModel,
|
|
9
|
-
AttentionStockPredictor,
|
|
10
|
-
TransformerStockModel,
|
|
11
|
-
LSTMStockPredictor,
|
|
12
|
-
CNNFeatureExtractor,
|
|
13
|
-
EnsembleTrainer,
|
|
14
|
-
ModelConfig,
|
|
15
|
-
EnsembleConfig,
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
from .base_models import (
|
|
19
|
-
BaseStockModel,
|
|
20
|
-
ModelMetrics,
|
|
21
|
-
ValidationResult,
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
from .recommendation_models import (
|
|
25
|
-
StockRecommendationModel,
|
|
26
|
-
RecommendationTrainer,
|
|
27
|
-
RecommendationConfig,
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
# Model registry
|
|
31
|
-
_loaded_models: Dict[str, Any] = {}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
async def load_production_models():
|
|
35
|
-
"""Load production models into memory"""
|
|
36
|
-
from mcli.ml.config import settings
|
|
37
|
-
from mcli.ml.logging import get_logger
|
|
38
|
-
|
|
39
|
-
logger = get_logger(__name__)
|
|
40
|
-
model_dir = settings.model.model_dir
|
|
41
|
-
|
|
42
|
-
if not model_dir.exists():
|
|
43
|
-
model_dir.mkdir(parents=True, exist_ok=True)
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
for model_path in model_dir.glob("*.pt"):
|
|
47
|
-
try:
|
|
48
|
-
model_id = model_path.stem
|
|
49
|
-
model = torch.load(model_path, map_location=settings.model.device)
|
|
50
|
-
_loaded_models[model_id] = model
|
|
51
|
-
logger.info(f"Loaded model: {model_id}")
|
|
52
|
-
except Exception as e:
|
|
53
|
-
logger.error(f"Failed to load model {model_path}: {e}")
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
async def get_model_by_id(model_id: str):
|
|
57
|
-
"""Get loaded model by ID"""
|
|
58
|
-
from mcli.ml.config import settings
|
|
59
|
-
|
|
60
|
-
if model_id not in _loaded_models:
|
|
61
|
-
# Try to load from disk
|
|
62
|
-
model_path = settings.model.model_dir / f"{model_id}.pt"
|
|
63
|
-
if model_path.exists():
|
|
64
|
-
_loaded_models[model_id] = torch.load(
|
|
65
|
-
model_path,
|
|
66
|
-
map_location=settings.model.device
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
return _loaded_models.get(model_id)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
def initialize_models():
|
|
73
|
-
"""Initialize models on startup"""
|
|
74
|
-
from mcli.ml.logging import get_logger
|
|
75
|
-
logger = get_logger(__name__)
|
|
76
|
-
logger.info("Initializing ML models...")
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
__all__ = [
|
|
80
|
-
"DeepEnsembleModel",
|
|
81
|
-
"AttentionStockPredictor",
|
|
82
|
-
"TransformerStockModel",
|
|
83
|
-
"LSTMStockPredictor",
|
|
84
|
-
"CNNFeatureExtractor",
|
|
85
|
-
"EnsembleTrainer",
|
|
86
|
-
"ModelConfig",
|
|
87
|
-
"EnsembleConfig",
|
|
88
|
-
"BaseStockModel",
|
|
89
|
-
"ModelMetrics",
|
|
90
|
-
"ValidationResult",
|
|
91
|
-
"StockRecommendationModel",
|
|
92
|
-
"RecommendationTrainer",
|
|
93
|
-
"RecommendationConfig",
|
|
94
|
-
"load_production_models",
|
|
95
|
-
"get_model_by_id",
|
|
96
|
-
"initialize_models",
|
|
97
|
-
]
|
mcli/ml/monitoring/__init__.py
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"""ML Model Monitoring and Drift Detection"""
|
|
2
|
-
|
|
3
|
-
from .drift_detection import (
|
|
4
|
-
ModelMonitor,
|
|
5
|
-
StatisticalDriftDetector,
|
|
6
|
-
ConceptDriftDetector,
|
|
7
|
-
OutlierDetector,
|
|
8
|
-
DriftAlert,
|
|
9
|
-
DriftType,
|
|
10
|
-
AlertSeverity,
|
|
11
|
-
ModelMetrics,
|
|
12
|
-
DataProfile,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
__all__ = [
|
|
16
|
-
"ModelMonitor",
|
|
17
|
-
"StatisticalDriftDetector",
|
|
18
|
-
"ConceptDriftDetector",
|
|
19
|
-
"OutlierDetector",
|
|
20
|
-
"DriftAlert",
|
|
21
|
-
"DriftType",
|
|
22
|
-
"AlertSeverity",
|
|
23
|
-
"ModelMetrics",
|
|
24
|
-
"DataProfile",
|
|
25
|
-
]
|
mcli/ml/optimization/__init__.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""Advanced Portfolio Optimization"""
|
|
2
|
-
|
|
3
|
-
from .portfolio_optimizer import (
|
|
4
|
-
AdvancedPortfolioOptimizer,
|
|
5
|
-
OptimizationObjective,
|
|
6
|
-
OptimizationConstraints,
|
|
7
|
-
PortfolioAllocation,
|
|
8
|
-
MeanVarianceOptimizer,
|
|
9
|
-
RiskParityOptimizer,
|
|
10
|
-
BlackLittermanOptimizer,
|
|
11
|
-
CVaROptimizer,
|
|
12
|
-
KellyCriterionOptimizer,
|
|
13
|
-
BaseOptimizer,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
__all__ = [
|
|
17
|
-
"AdvancedPortfolioOptimizer",
|
|
18
|
-
"OptimizationObjective",
|
|
19
|
-
"OptimizationConstraints",
|
|
20
|
-
"PortfolioAllocation",
|
|
21
|
-
"MeanVarianceOptimizer",
|
|
22
|
-
"RiskParityOptimizer",
|
|
23
|
-
"BlackLittermanOptimizer",
|
|
24
|
-
"CVaROptimizer",
|
|
25
|
-
"KellyCriterionOptimizer",
|
|
26
|
-
"BaseOptimizer",
|
|
27
|
-
]
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"""ML Data Preprocessing Module"""
|
|
2
|
-
|
|
3
|
-
from .politician_trading_preprocessor import PoliticianTradingPreprocessor
|
|
4
|
-
from .feature_extractors import (
|
|
5
|
-
PoliticianFeatureExtractor,
|
|
6
|
-
MarketFeatureExtractor,
|
|
7
|
-
TemporalFeatureExtractor,
|
|
8
|
-
SentimentFeatureExtractor,
|
|
9
|
-
)
|
|
10
|
-
from .data_cleaners import (
|
|
11
|
-
TradingDataCleaner,
|
|
12
|
-
OutlierDetector,
|
|
13
|
-
MissingValueHandler,
|
|
14
|
-
)
|
|
15
|
-
from .ml_pipeline import MLDataPipeline, MLDataPipelineConfig
|
|
16
|
-
|
|
17
|
-
__all__ = [
|
|
18
|
-
"PoliticianTradingPreprocessor",
|
|
19
|
-
"PoliticianFeatureExtractor",
|
|
20
|
-
"MarketFeatureExtractor",
|
|
21
|
-
"TemporalFeatureExtractor",
|
|
22
|
-
"SentimentFeatureExtractor",
|
|
23
|
-
"TradingDataCleaner",
|
|
24
|
-
"OutlierDetector",
|
|
25
|
-
"MissingValueHandler",
|
|
26
|
-
"MLDataPipeline",
|
|
27
|
-
"MLDataPipelineConfig",
|
|
28
|
-
]
|
mcli/ml/scripts/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""ML scripts module."""
|
mcli/public/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# logger.info("I am in mcli.public.__init__.py")
|
mcli/public/commands/__init__.py
DELETED
mcli/self/__init__.py
DELETED
mcli/workflow/__init__.py
DELETED
|
File without changes
|
mcli/workflow/daemon/__init__.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Daemon service for command management and execution.
|
|
3
|
-
|
|
4
|
-
This module provides a background daemon service that can store, manage, and execute
|
|
5
|
-
commands written in various programming languages (Python, Node.js, Lua, Shell).
|
|
6
|
-
Commands are stored in a SQLite database with embeddings for similarity search and
|
|
7
|
-
hierarchical grouping.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
from .commands import Command, CommandDatabase, CommandExecutor, DaemonService, daemon
|
|
11
|
-
|
|
12
|
-
# Export main components
|
|
13
|
-
__all__ = ["Command", "CommandDatabase", "CommandExecutor", "DaemonService", "daemon"]
|
mcli/workflow/docker/__init__.py
DELETED
|
File without changes
|
mcli/workflow/file/__init__.py
DELETED
|
File without changes
|
mcli/workflow/gcloud/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .gcloud import gcloud
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
mcli/workflow/repo/__init__.py
DELETED
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
MCLI Scheduler Module
|
|
3
|
-
|
|
4
|
-
A robust cron-like job scheduling system with the following features:
|
|
5
|
-
- Cron expression parsing and job scheduling
|
|
6
|
-
- Job monitoring and persistence across restarts
|
|
7
|
-
- JSON API for frontend integration
|
|
8
|
-
- System automation capabilities
|
|
9
|
-
- Desktop file cleanup and management
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
from .cron_parser import CronExpression
|
|
13
|
-
from .job import JobStatus, ScheduledJob
|
|
14
|
-
from .monitor import JobMonitor
|
|
15
|
-
from .persistence import JobStorage
|
|
16
|
-
from .scheduler import JobScheduler
|
|
17
|
-
|
|
18
|
-
__all__ = [
|
|
19
|
-
"JobScheduler",
|
|
20
|
-
"ScheduledJob",
|
|
21
|
-
"JobStatus",
|
|
22
|
-
"CronExpression",
|
|
23
|
-
"JobStorage",
|
|
24
|
-
"JobMonitor",
|
|
25
|
-
]
|
mcli/workflow/search/__init__.py
DELETED
|
File without changes
|