chore: Secure secrets and add MySQL deps
This commit is contained in:
1 parent
8de6c54887
commit
5e0d6b18ef
4 files changed
+12
-33
No files matched your search
@@ -1,32 +0,0 @@
|
||||
# Binance API (public data - no keys needed)
|
||||
BINANCE_API_URL=https://api.binance.com
|
||||
|
||||
# 代理配置 (SOCKS5)
|
||||
SOCKS5_PROXY=socks5://127.0.0.1:7890
|
||||
USE_PROXY=true
|
||||
|
||||
# Data Configuration
|
||||
DATA_CACHE_DIR=./data/cache
|
||||
LOOKBACK_1H=168 # 1 week for 1h data
|
||||
LOOKBACK_15M=672 # 1 week for 15m data
|
||||
FORECAST_HORIZON=24 # Predict 24 periods ahead
|
||||
|
||||
# Training Configuration
|
||||
BATCH_SIZE=64
|
||||
LEARNING_RATE=0.001
|
||||
MAX_EPOCHS=100
|
||||
EARLY_STOPPING_PATIENCE=10
|
||||
TRAIN_SPLIT=0.7
|
||||
VAL_SPLIT=0.15
|
||||
TEST_SPLIT=0.15
|
||||
|
||||
# Model Paths
|
||||
MODEL_DIR=./models/checkpoints
|
||||
ONNX_DIR=./models/onnx
|
||||
|
||||
# API Configuration
|
||||
API_PORT=5000
|
||||
API_HOST=0.0.0.0
|
||||
|
||||
# Classification Threshold
|
||||
PRICE_CHANGE_THRESHOLD=0.015 # 1.5% threshold for binary labels
|
||||
@@ -30,3 +30,10 @@ API_HOST=0.0.0.0
|
||||
|
||||
# Classification Threshold
|
||||
PRICE_CHANGE_THRESHOLD=0.015 # 1.5% threshold for binary labels
|
||||
|
||||
# MySQL Configuration
|
||||
MYSQL_HOST=localhost
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_USER=user
|
||||
MYSQL_PASSWORD=password
|
||||
MYSQL_DB=crypto_predictor
|
||||
+4
-1
@@ -9,9 +9,11 @@ venv/
|
||||
env/
|
||||
ENV/
|
||||
|
||||
# Sensitive
|
||||
.env
|
||||
|
||||
# 数据和缓存
|
||||
data/cache/*.csv
|
||||
*.db
|
||||
|
||||
# 模型检查点(保留最佳模型,忽略训练过程文件)
|
||||
models/checkpoints/*/epoch_*.pt
|
||||
@@ -38,3 +40,4 @@ logs/
|
||||
# 临时文件
|
||||
*.tmp
|
||||
.cache/
|
||||
test_*.py
|
||||
@@ -42,3 +42,4 @@ tqdm>=4.66.0
|
||||
# Database
|
||||
pymysql>=1.1.0
|
||||
sqlalchemy>=2.0.0
|
||||
cryptography>=41.0.0
|
||||
Reference in new issue
Block a user