diff --git a/NN/_notes.md b/NN/_notes.md index fb30448..0d1b1fa 100644 --- a/NN/_notes.md +++ b/NN/_notes.md @@ -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 +# 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 python -m NN.main --mode train --symbol BTC/USDT --timeframes 1h 4h --model-type cnn --epochs 100 diff --git a/run_pytorch_nn.bat b/run_pytorch_nn.bat index facfb2a..792a010 100644 --- a/run_pytorch_nn.bat +++ b/run_pytorch_nn.bat @@ -5,6 +5,14 @@ echo ============================================================ 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 set MODE=train set MODEL_TYPE=cnn diff --git a/setup_env.bat b/setup_env.bat new file mode 100644 index 0000000..fb35672 --- /dev/null +++ b/setup_env.bat @@ -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 ============================================================ \ No newline at end of file