diff --git a/.env b/.env deleted file mode 100644 index 4f3f3dd..0000000 --- a/.env +++ /dev/null @@ -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 diff --git a/.env.example b/.env.example index 4f3f3dd..92c1eec 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/.gitignore b/.gitignore index 68edc16..23f0249 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/requirements.txt b/requirements.txt index 0634808..33c8eb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -42,3 +42,4 @@ tqdm>=4.66.0 # Database pymysql>=1.1.0 sqlalchemy>=2.0.0 +cryptography>=41.0.0