setup env

This commit is contained in:
Dobromir Popov 2025-03-25 13:49:23 +02:00
parent 0042581275
commit e08fbf7f5f
3 changed files with 100 additions and 0 deletions

View File

@ -2,6 +2,13 @@ great. realtime.py works. now let's examine and contunue with our 500m NN in a
create a new main file in the NN folder for our new MoE model. we'll use one main NN module that will orchestrate data flows. our CNN module should have training and inference pipelines implemented internally, but the orchestrator will get the realtime data and forward it. use a common interface. another module later will be Transformer module that will take as input raw data from the latest hidden layers of the CNN where high end features are learned as well as the output, which will be BUY/HOLD/SELL signals as well as key support/resistance trend lines create a new main file in the NN folder for our new MoE model. we'll use one main NN module that will orchestrate data flows. our CNN module should have training and inference pipelines implemented internally, but the orchestrator will get the realtime data and forward it. use a common interface. another module later will be Transformer module that will take as input raw data from the latest hidden layers of the CNN where high end features are learned as well as the output, which will be BUY/HOLD/SELL signals as well as key support/resistance trend lines
# setup:
setup_env.bat
# run:
python -m NN.start_tensorboard --logdir=NN/models/saved/logs
# and
run_nn.py / run_nn_in_conda.bat / run_pytorch_nn.bat
# Train a CNN model # Train a CNN model
python -m NN.main --mode train --symbol BTC/USDT --timeframes 1h 4h --model-type cnn --epochs 100 python -m NN.main --mode train --symbol BTC/USDT --timeframes 1h 4h --model-type cnn --epochs 100

View File

@ -5,6 +5,14 @@ echo ============================================================
call conda activate gpt-gpu call conda activate gpt-gpu
REM Install missing dependencies if needed
echo Checking for required packages...
python -c "import sklearn" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing scikit-learn...
call conda install -y scikit-learn
)
REM Parse command-line arguments REM Parse command-line arguments
set MODE=train set MODE=train
set MODEL_TYPE=cnn set MODEL_TYPE=cnn

85
setup_env.bat Normal file
View File

@ -0,0 +1,85 @@
@echo off
echo ============================================================
echo Neural Network Trading System - Environment Setup
echo ============================================================
call conda activate gpt-gpu
echo Checking and installing required packages...
REM Check for PyTorch
python -c "import torch" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing PyTorch...
call conda install -y pytorch torchvision cpuonly -c pytorch
)
REM Check for NumPy
python -c "import numpy" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing NumPy...
call conda install -y numpy
)
REM Check for Pandas
python -c "import pandas" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing Pandas...
call conda install -y pandas
)
REM Check for Matplotlib
python -c "import matplotlib" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing Matplotlib...
call conda install -y matplotlib
)
REM Check for scikit-learn
python -c "import sklearn" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing scikit-learn...
call conda install -y scikit-learn
)
REM Check for additional dependencies
python -c "import h5py" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing h5py...
call conda install -y h5py
)
python -c "import tqdm" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing tqdm...
call conda install -y tqdm
)
python -c "import yaml" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing PyYAML...
call conda install -y pyyaml
)
python -c "import plotly" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing Plotly...
call conda install -y plotly
)
python -c "import tensorboard" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing TensorBoard...
call conda install -y tensorboard
)
python -c "import ccxt" 2>NUL
if %ERRORLEVEL% NEQ 0 (
echo Installing ccxt...
call pip install ccxt
)
echo ============================================================
echo Environment setup completed.
echo You can now run the Neural Network with: run_pytorch_nn.bat
echo ============================================================