Spaces:
Runtime error
Runtime error
Update qlib/mcp_output/start_mcp.py
Browse files- qlib/mcp_output/start_mcp.py +0 -13
qlib/mcp_output/start_mcp.py
CHANGED
|
@@ -18,19 +18,6 @@ os.system("ls -lh /app/qlib_data/calendars || echo 'No data found'")
|
|
| 18 |
os.system("echo '=== List /app/qlib_data/features (first 10 files) ==='")
|
| 19 |
os.system("ls -lh /app/qlib_data/features | head -n 10 || echo 'No data found'")
|
| 20 |
|
| 21 |
-
|
| 22 |
-
from qlib.data import D
|
| 23 |
-
|
| 24 |
-
# 初始化 Qlib,必须在任何 D 操作前
|
| 25 |
-
data_dir = os.getenv("QLIB_DATA_DIR", "/app/qlib_data")
|
| 26 |
-
qlib.init(provider_uri=data_dir, region="cn")
|
| 27 |
-
|
| 28 |
-
# 打印 day 频率标的
|
| 29 |
-
instruments = D.list_instruments(freq="day", market="cn")
|
| 30 |
-
print("=== Day-frequency instruments ===")
|
| 31 |
-
print(f"Total instruments: {len(instruments)}")
|
| 32 |
-
print("Sample instruments:", instruments[:10])
|
| 33 |
-
|
| 34 |
project_root = os.path.dirname(os.path.abspath(__file__))
|
| 35 |
mcp_plugin_dir = os.path.join(project_root, "mcp_plugin")
|
| 36 |
if mcp_plugin_dir not in sys.path:
|
|
|
|
| 18 |
os.system("echo '=== List /app/qlib_data/features (first 10 files) ==='")
|
| 19 |
os.system("ls -lh /app/qlib_data/features | head -n 10 || echo 'No data found'")
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
project_root = os.path.dirname(os.path.abspath(__file__))
|
| 22 |
mcp_plugin_dir = os.path.join(project_root, "mcp_plugin")
|
| 23 |
if mcp_plugin_dir not in sys.path:
|