mcli-framework 7.11.2__py3-none-any.whl → 7.11.4__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/app/main.py +23 -17
- mcli/workflow/workflow.py +119 -5
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/METADATA +2 -2
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/RECORD +8 -74
- mcli/__init__.py +0 -160
- mcli/__main__.py +0 -14
- mcli/app/__init__.py +0 -23
- 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/secrets/__init__.py +0 -10
- 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 -30
- mcli/ml/api/routers/__init__.py +0 -27
- mcli/ml/auth/__init__.py +0 -41
- mcli/ml/backtesting/__init__.py +0 -33
- 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 -12
- mcli/ml/dashboard/components/__init__.py +0 -7
- mcli/ml/dashboard/pages/__init__.py +0 -6
- mcli/ml/data_ingestion/__init__.py +0 -29
- mcli/ml/database/__init__.py +0 -40
- mcli/ml/experimentation/__init__.py +0 -29
- mcli/ml/features/__init__.py +0 -39
- mcli/ml/mlops/__init__.py +0 -19
- mcli/ml/models/__init__.py +0 -90
- mcli/ml/monitoring/__init__.py +0 -25
- mcli/ml/optimization/__init__.py +0 -27
- mcli/ml/predictions/__init__.py +0 -5
- mcli/ml/preprocessing/__init__.py +0 -24
- mcli/ml/scripts/__init__.py +0 -1
- mcli/ml/serving/__init__.py +0 -1
- mcli/ml/trading/__init__.py +0 -63
- mcli/ml/training/__init__.py +0 -7
- mcli/mygroup/__init__.py +0 -3
- 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 -15
- 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/notebook/__init__.py +0 -16
- 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/secrets/__init__.py +0 -4
- mcli/workflow/sync/__init__.py +0 -5
- mcli/workflow/videos/__init__.py +0 -1
- mcli/workflow/wakatime/__init__.py +0 -80
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/WHEEL +0 -0
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/entry_points.txt +0 -0
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/licenses/LICENSE +0 -0
- {mcli_framework-7.11.2.dist-info → mcli_framework-7.11.4.dist-info}/top_level.txt +0 -0
mcli/__main__.py
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# logger.info("I am in mcli.__init__.py")
|
|
2
|
-
|
|
3
|
-
try:
|
|
4
|
-
from mcli.app.main import main as main_func
|
|
5
|
-
|
|
6
|
-
# from mcli.public import *
|
|
7
|
-
# from mcli.private import *
|
|
8
|
-
except ImportError:
|
|
9
|
-
from .app.main import main as main_func
|
|
10
|
-
|
|
11
|
-
__all__ = ["main_func"]
|
|
12
|
-
|
|
13
|
-
if __name__ == "__main__":
|
|
14
|
-
main_func()
|
mcli/app/__init__.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# src/mcli/app/__init__.py
|
|
2
|
-
import importlib
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
|
|
5
|
-
from mcli.lib.logger.logger import get_logger
|
|
6
|
-
|
|
7
|
-
logger = get_logger(__name__)
|
|
8
|
-
|
|
9
|
-
logger.info("Initializing mcli.app package")
|
|
10
|
-
|
|
11
|
-
# Import main function
|
|
12
|
-
try:
|
|
13
|
-
from .main import main
|
|
14
|
-
|
|
15
|
-
logger.info("Successfully imported main from .main")
|
|
16
|
-
except ImportError as e:
|
|
17
|
-
logger.error(f"Failed to import main: {e}")
|
|
18
|
-
import traceback
|
|
19
|
-
|
|
20
|
-
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
21
|
-
raise
|
|
22
|
-
|
|
23
|
-
__all__ = ["main"]
|
mcli/app/model/__init__.py
DELETED
|
File without changes
|
mcli/app/video/__init__.py
DELETED
mcli/chat/__init__.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
MCLI Chat System
|
|
3
|
-
Real-time system control and interaction capabilities for MCLI chat
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from .system_controller import (
|
|
7
|
-
SystemController,
|
|
8
|
-
control_app,
|
|
9
|
-
execute_system_command,
|
|
10
|
-
open_file_or_url,
|
|
11
|
-
open_textedit_and_write,
|
|
12
|
-
system_controller,
|
|
13
|
-
take_screenshot,
|
|
14
|
-
)
|
|
15
|
-
from .system_integration import (
|
|
16
|
-
ChatSystemIntegration,
|
|
17
|
-
chat_system_integration,
|
|
18
|
-
get_system_capabilities,
|
|
19
|
-
handle_system_request,
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
__all__ = [
|
|
23
|
-
"SystemController",
|
|
24
|
-
"system_controller",
|
|
25
|
-
"ChatSystemIntegration",
|
|
26
|
-
"chat_system_integration",
|
|
27
|
-
"handle_system_request",
|
|
28
|
-
"get_system_capabilities",
|
|
29
|
-
"open_textedit_and_write",
|
|
30
|
-
"control_app",
|
|
31
|
-
"execute_system_command",
|
|
32
|
-
"take_screenshot",
|
|
33
|
-
"open_file_or_url",
|
|
34
|
-
]
|
mcli/lib/__init__.py
DELETED
|
File without changes
|
mcli/lib/api/__init__.py
DELETED
|
File without changes
|
mcli/lib/auth/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .auth import *
|
mcli/lib/config/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .config import *
|
mcli/lib/erd/__init__.py
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Entity Relationship Diagram (ERD) package.
|
|
3
|
-
|
|
4
|
-
This package provides utilities for generating Entity Relationship Diagrams from MCLI type metadata.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
# Import and export all public functions from erd.py
|
|
8
|
-
from .erd import (
|
|
9
|
-
analyze_graph_for_hierarchical_exports,
|
|
10
|
-
create_merged_erd,
|
|
11
|
-
do_erd,
|
|
12
|
-
find_top_nodes_in_graph,
|
|
13
|
-
generate_erd_for_top_nodes,
|
|
14
|
-
generate_merged_erd_for_types,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
# Define __all__ to control exports
|
|
18
|
-
__all__ = [
|
|
19
|
-
"do_erd",
|
|
20
|
-
"create_merged_erd",
|
|
21
|
-
"generate_merged_erd_for_types",
|
|
22
|
-
"find_top_nodes_in_graph",
|
|
23
|
-
"generate_erd_for_top_nodes",
|
|
24
|
-
"analyze_graph_for_hierarchical_exports",
|
|
25
|
-
]
|
mcli/lib/files/__init__.py
DELETED
|
File without changes
|
mcli/lib/fs/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .fs import *
|
mcli/lib/logger/__init__.py
DELETED
mcli/lib/performance/__init__.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Performance optimization utilities for mcli
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from .uvloop_config import (
|
|
6
|
-
configure_event_loop_for_performance,
|
|
7
|
-
get_event_loop_info,
|
|
8
|
-
install_uvloop,
|
|
9
|
-
should_use_uvloop,
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
__all__ = [
|
|
13
|
-
"install_uvloop",
|
|
14
|
-
"should_use_uvloop",
|
|
15
|
-
"get_event_loop_info",
|
|
16
|
-
"configure_event_loop_for_performance",
|
|
17
|
-
]
|
mcli/lib/pickles/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .pickles import ObjectCache
|
mcli/lib/secrets/__init__.py
DELETED
mcli/lib/shell/__init__.py
DELETED
|
File without changes
|
mcli/lib/toml/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .toml import read_from_toml
|
mcli/lib/watcher/__init__.py
DELETED
|
File without changes
|
mcli/ml/__init__.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""MCLI Machine Learning Module for Stock Recommendation System"""
|
|
2
|
-
|
|
3
|
-
from .configs.dvc_config import get_dvc_config, setup_dvc
|
|
4
|
-
from .configs.mlflow_config import get_mlflow_config, setup_mlflow
|
|
5
|
-
from .configs.mlops_manager import MLOpsManager, get_mlops_manager
|
|
6
|
-
|
|
7
|
-
__version__ = "0.1.0"
|
|
8
|
-
|
|
9
|
-
__all__ = [
|
|
10
|
-
"get_mlops_manager",
|
|
11
|
-
"MLOpsManager",
|
|
12
|
-
"get_mlflow_config",
|
|
13
|
-
"setup_mlflow",
|
|
14
|
-
"get_dvc_config",
|
|
15
|
-
"setup_dvc",
|
|
16
|
-
]
|
mcli/ml/api/__init__.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"""API routes and endpoints for ML system"""
|
|
2
|
-
|
|
3
|
-
from .app import create_app, get_application
|
|
4
|
-
from .routers import (
|
|
5
|
-
admin_router,
|
|
6
|
-
auth_router,
|
|
7
|
-
backtest_router,
|
|
8
|
-
data_router,
|
|
9
|
-
model_router,
|
|
10
|
-
monitoring_router,
|
|
11
|
-
portfolio_router,
|
|
12
|
-
prediction_router,
|
|
13
|
-
trade_router,
|
|
14
|
-
websocket_router,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
__all__ = [
|
|
18
|
-
"auth_router",
|
|
19
|
-
"model_router",
|
|
20
|
-
"prediction_router",
|
|
21
|
-
"portfolio_router",
|
|
22
|
-
"data_router",
|
|
23
|
-
"trade_router",
|
|
24
|
-
"backtest_router",
|
|
25
|
-
"monitoring_router",
|
|
26
|
-
"admin_router",
|
|
27
|
-
"websocket_router",
|
|
28
|
-
"create_app",
|
|
29
|
-
"get_application",
|
|
30
|
-
]
|
mcli/ml/api/routers/__init__.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""API routers"""
|
|
2
|
-
|
|
3
|
-
from . import (
|
|
4
|
-
admin_router,
|
|
5
|
-
auth_router,
|
|
6
|
-
backtest_router,
|
|
7
|
-
data_router,
|
|
8
|
-
model_router,
|
|
9
|
-
monitoring_router,
|
|
10
|
-
portfolio_router,
|
|
11
|
-
prediction_router,
|
|
12
|
-
trade_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,41 +0,0 @@
|
|
|
1
|
-
"""Authentication and authorization system"""
|
|
2
|
-
|
|
3
|
-
from .auth_manager import (
|
|
4
|
-
AuthManager,
|
|
5
|
-
create_access_token,
|
|
6
|
-
get_current_active_user,
|
|
7
|
-
get_current_user,
|
|
8
|
-
hash_password,
|
|
9
|
-
require_role,
|
|
10
|
-
verify_access_token,
|
|
11
|
-
verify_password,
|
|
12
|
-
)
|
|
13
|
-
from .models import (
|
|
14
|
-
PasswordChange,
|
|
15
|
-
PasswordReset,
|
|
16
|
-
TokenResponse,
|
|
17
|
-
UserCreate,
|
|
18
|
-
UserLogin,
|
|
19
|
-
UserResponse,
|
|
20
|
-
)
|
|
21
|
-
from .permissions import Permission, check_permission, has_permission
|
|
22
|
-
|
|
23
|
-
__all__ = [
|
|
24
|
-
"AuthManager",
|
|
25
|
-
"create_access_token",
|
|
26
|
-
"verify_access_token",
|
|
27
|
-
"get_current_user",
|
|
28
|
-
"get_current_active_user",
|
|
29
|
-
"require_role",
|
|
30
|
-
"hash_password",
|
|
31
|
-
"verify_password",
|
|
32
|
-
"UserCreate",
|
|
33
|
-
"UserLogin",
|
|
34
|
-
"UserResponse",
|
|
35
|
-
"TokenResponse",
|
|
36
|
-
"PasswordReset",
|
|
37
|
-
"PasswordChange",
|
|
38
|
-
"Permission",
|
|
39
|
-
"check_permission",
|
|
40
|
-
"has_permission",
|
|
41
|
-
]
|
mcli/ml/backtesting/__init__.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"""Backtesting framework for trading strategies"""
|
|
2
|
-
|
|
3
|
-
from .backtest_engine import (
|
|
4
|
-
BacktestConfig,
|
|
5
|
-
BacktestEngine,
|
|
6
|
-
BacktestResult,
|
|
7
|
-
PositionManager,
|
|
8
|
-
TradingStrategy,
|
|
9
|
-
)
|
|
10
|
-
from .performance_metrics import (
|
|
11
|
-
PerformanceAnalyzer,
|
|
12
|
-
PortfolioMetrics,
|
|
13
|
-
RiskMetrics,
|
|
14
|
-
plot_performance,
|
|
15
|
-
)
|
|
16
|
-
from .trading_simulator import MarketSimulator, Order, Portfolio, Position, TradingSimulator
|
|
17
|
-
|
|
18
|
-
__all__ = [
|
|
19
|
-
"BacktestEngine",
|
|
20
|
-
"BacktestConfig",
|
|
21
|
-
"BacktestResult",
|
|
22
|
-
"TradingStrategy",
|
|
23
|
-
"PositionManager",
|
|
24
|
-
"PerformanceAnalyzer",
|
|
25
|
-
"PortfolioMetrics",
|
|
26
|
-
"RiskMetrics",
|
|
27
|
-
"plot_performance",
|
|
28
|
-
"TradingSimulator",
|
|
29
|
-
"Order",
|
|
30
|
-
"Position",
|
|
31
|
-
"Portfolio",
|
|
32
|
-
"MarketSimulator",
|
|
33
|
-
]
|
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
|
-
APISettings,
|
|
5
|
-
DatabaseSettings,
|
|
6
|
-
DataSettings,
|
|
7
|
-
MLflowSettings,
|
|
8
|
-
ModelSettings,
|
|
9
|
-
MonitoringSettings,
|
|
10
|
-
RedisSettings,
|
|
11
|
-
SecuritySettings,
|
|
12
|
-
Settings,
|
|
13
|
-
create_settings,
|
|
14
|
-
get_settings,
|
|
15
|
-
settings,
|
|
16
|
-
update_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,29 +0,0 @@
|
|
|
1
|
-
"""Real-time data ingestion pipeline"""
|
|
2
|
-
|
|
3
|
-
from .api_connectors import (
|
|
4
|
-
AlphaVantageConnector,
|
|
5
|
-
CongressionalDataAPI,
|
|
6
|
-
PolygonIOConnector,
|
|
7
|
-
QuiverQuantConnector,
|
|
8
|
-
StockMarketAPI,
|
|
9
|
-
YahooFinanceConnector,
|
|
10
|
-
)
|
|
11
|
-
from .data_pipeline import DataLoader, DataTransformer, DataValidator, IngestionPipeline
|
|
12
|
-
from .stream_processor import DataStream, KafkaConsumer, StreamProcessor, WebSocketConsumer
|
|
13
|
-
|
|
14
|
-
__all__ = [
|
|
15
|
-
"StreamProcessor",
|
|
16
|
-
"DataStream",
|
|
17
|
-
"KafkaConsumer",
|
|
18
|
-
"WebSocketConsumer",
|
|
19
|
-
"CongressionalDataAPI",
|
|
20
|
-
"StockMarketAPI",
|
|
21
|
-
"AlphaVantageConnector",
|
|
22
|
-
"YahooFinanceConnector",
|
|
23
|
-
"PolygonIOConnector",
|
|
24
|
-
"QuiverQuantConnector",
|
|
25
|
-
"IngestionPipeline",
|
|
26
|
-
"DataValidator",
|
|
27
|
-
"DataTransformer",
|
|
28
|
-
"DataLoader",
|
|
29
|
-
]
|
mcli/ml/database/__init__.py
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"""Database models and utilities"""
|
|
2
|
-
|
|
3
|
-
from .models import (
|
|
4
|
-
Alert,
|
|
5
|
-
BacktestResult,
|
|
6
|
-
Base,
|
|
7
|
-
DataVersion,
|
|
8
|
-
Experiment,
|
|
9
|
-
FeatureSet,
|
|
10
|
-
Model,
|
|
11
|
-
Politician,
|
|
12
|
-
Portfolio,
|
|
13
|
-
Prediction,
|
|
14
|
-
StockData,
|
|
15
|
-
Trade,
|
|
16
|
-
User,
|
|
17
|
-
)
|
|
18
|
-
from .session import AsyncSessionLocal, SessionLocal, async_engine, engine, get_async_db, get_db
|
|
19
|
-
|
|
20
|
-
__all__ = [
|
|
21
|
-
"Base",
|
|
22
|
-
"User",
|
|
23
|
-
"Trade",
|
|
24
|
-
"Politician",
|
|
25
|
-
"StockData",
|
|
26
|
-
"Prediction",
|
|
27
|
-
"Portfolio",
|
|
28
|
-
"Alert",
|
|
29
|
-
"BacktestResult",
|
|
30
|
-
"Experiment",
|
|
31
|
-
"Model",
|
|
32
|
-
"FeatureSet",
|
|
33
|
-
"DataVersion",
|
|
34
|
-
"get_db",
|
|
35
|
-
"get_async_db",
|
|
36
|
-
"SessionLocal",
|
|
37
|
-
"AsyncSessionLocal",
|
|
38
|
-
"engine",
|
|
39
|
-
"async_engine",
|
|
40
|
-
]
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"""ML Experimentation and A/B Testing Framework"""
|
|
2
|
-
|
|
3
|
-
from .ab_testing import (
|
|
4
|
-
ABTestingFramework,
|
|
5
|
-
ExperimentConfig,
|
|
6
|
-
ExperimentResult,
|
|
7
|
-
ExperimentStatus,
|
|
8
|
-
Metric,
|
|
9
|
-
MetricsCollector,
|
|
10
|
-
StatisticalAnalyzer,
|
|
11
|
-
TrafficSplitter,
|
|
12
|
-
UserAssignment,
|
|
13
|
-
Variant,
|
|
14
|
-
VariantType,
|
|
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 .ensemble_features import (
|
|
4
|
-
DynamicFeatureSelector,
|
|
5
|
-
EnsembleFeatureBuilder,
|
|
6
|
-
FeatureInteractionEngine,
|
|
7
|
-
)
|
|
8
|
-
from .political_features import (
|
|
9
|
-
CongressionalTrackingFeatures,
|
|
10
|
-
PolicyImpactFeatures,
|
|
11
|
-
PoliticalInfluenceFeatures,
|
|
12
|
-
)
|
|
13
|
-
from .recommendation_engine import (
|
|
14
|
-
RecommendationConfig,
|
|
15
|
-
RecommendationResult,
|
|
16
|
-
StockRecommendationEngine,
|
|
17
|
-
)
|
|
18
|
-
from .stock_features import (
|
|
19
|
-
CrossAssetFeatures,
|
|
20
|
-
MarketRegimeFeatures,
|
|
21
|
-
StockRecommendationFeatures,
|
|
22
|
-
TechnicalIndicatorFeatures,
|
|
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,19 +0,0 @@
|
|
|
1
|
-
"""MLOps components for ML pipeline management"""
|
|
2
|
-
|
|
3
|
-
from .experiment_tracker import ExperimentRun, ExperimentTracker, MLflowConfig, ModelRegistry
|
|
4
|
-
from .model_serving import ModelEndpoint, ModelServer, PredictionService
|
|
5
|
-
from .pipeline_orchestrator import MLPipeline, PipelineConfig, PipelineExecutor, PipelineStep
|
|
6
|
-
|
|
7
|
-
__all__ = [
|
|
8
|
-
"ExperimentTracker",
|
|
9
|
-
"ModelRegistry",
|
|
10
|
-
"MLflowConfig",
|
|
11
|
-
"ExperimentRun",
|
|
12
|
-
"ModelServer",
|
|
13
|
-
"PredictionService",
|
|
14
|
-
"ModelEndpoint",
|
|
15
|
-
"MLPipeline",
|
|
16
|
-
"PipelineStep",
|
|
17
|
-
"PipelineConfig",
|
|
18
|
-
"PipelineExecutor",
|
|
19
|
-
]
|
mcli/ml/models/__init__.py
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"""ML Models for Stock Recommendation System"""
|
|
2
|
-
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from typing import Any, Dict, Optional
|
|
5
|
-
|
|
6
|
-
import torch
|
|
7
|
-
|
|
8
|
-
from .base_models import BaseStockModel, ModelMetrics, ValidationResult
|
|
9
|
-
from .ensemble_models import (
|
|
10
|
-
AttentionStockPredictor,
|
|
11
|
-
CNNFeatureExtractor,
|
|
12
|
-
DeepEnsembleModel,
|
|
13
|
-
EnsembleConfig,
|
|
14
|
-
EnsembleTrainer,
|
|
15
|
-
LSTMStockPredictor,
|
|
16
|
-
ModelConfig,
|
|
17
|
-
TransformerStockModel,
|
|
18
|
-
)
|
|
19
|
-
from .recommendation_models import (
|
|
20
|
-
RecommendationConfig,
|
|
21
|
-
RecommendationTrainer,
|
|
22
|
-
StockRecommendationModel,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
# Model registry
|
|
26
|
-
_loaded_models: Dict[str, Any] = {}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
async def load_production_models():
|
|
30
|
-
"""Load production models into memory"""
|
|
31
|
-
from mcli.ml.config import settings
|
|
32
|
-
from mcli.ml.logging import get_logger
|
|
33
|
-
|
|
34
|
-
logger = get_logger(__name__)
|
|
35
|
-
model_dir = settings.model.model_dir
|
|
36
|
-
|
|
37
|
-
if not model_dir.exists():
|
|
38
|
-
model_dir.mkdir(parents=True, exist_ok=True)
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
for model_path in model_dir.glob("*.pt"):
|
|
42
|
-
try:
|
|
43
|
-
model_id = model_path.stem
|
|
44
|
-
model = torch.load(model_path, map_location=settings.model.device)
|
|
45
|
-
_loaded_models[model_id] = model
|
|
46
|
-
logger.info(f"Loaded model: {model_id}")
|
|
47
|
-
except Exception as e:
|
|
48
|
-
logger.error(f"Failed to load model {model_path}: {e}")
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
async def get_model_by_id(model_id: str):
|
|
52
|
-
"""Get loaded model by ID"""
|
|
53
|
-
from mcli.ml.config import settings
|
|
54
|
-
|
|
55
|
-
if model_id not in _loaded_models:
|
|
56
|
-
# Try to load from disk
|
|
57
|
-
model_path = settings.model.model_dir / f"{model_id}.pt"
|
|
58
|
-
if model_path.exists():
|
|
59
|
-
_loaded_models[model_id] = torch.load(model_path, map_location=settings.model.device)
|
|
60
|
-
|
|
61
|
-
return _loaded_models.get(model_id)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def initialize_models():
|
|
65
|
-
"""Initialize models on startup"""
|
|
66
|
-
from mcli.ml.logging import get_logger
|
|
67
|
-
|
|
68
|
-
logger = get_logger(__name__)
|
|
69
|
-
logger.info("Initializing ML models...")
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
__all__ = [
|
|
73
|
-
"DeepEnsembleModel",
|
|
74
|
-
"AttentionStockPredictor",
|
|
75
|
-
"TransformerStockModel",
|
|
76
|
-
"LSTMStockPredictor",
|
|
77
|
-
"CNNFeatureExtractor",
|
|
78
|
-
"EnsembleTrainer",
|
|
79
|
-
"ModelConfig",
|
|
80
|
-
"EnsembleConfig",
|
|
81
|
-
"BaseStockModel",
|
|
82
|
-
"ModelMetrics",
|
|
83
|
-
"ValidationResult",
|
|
84
|
-
"StockRecommendationModel",
|
|
85
|
-
"RecommendationTrainer",
|
|
86
|
-
"RecommendationConfig",
|
|
87
|
-
"load_production_models",
|
|
88
|
-
"get_model_by_id",
|
|
89
|
-
"initialize_models",
|
|
90
|
-
]
|