📌 Note: Before proceeding, make sure you have collected and populated the data into MongoDB as specified in HPE-Data-Generator. This is required for the system to work correctly.
- Python 3.10 - 3.12
- MongoDB (local or cloud)
pipfor installing Python packages
Download and install Python from the official site:
🔗 https://www.python.org/downloads/
- Use Python 3.10 or 3.11, or 3.12. TensorFlow does not yet support Python 3.13.
git clone https://github.com/VarshithPawarHR/HPE-StoragePrediction
- Launch Visual Studio Code
- Open the folder you just cloned
- Press Ctrl + Shift + P
- Select:
Python: Select Interpreter - Choose a Python version between 3.10 – 3.12
- Avoid selecting Python 3.13
- Press Ctrl + Shift + P
- Select:
Python: Create Environment - Choose:
- Environment Type:
venv - Python Interpreter:
3.10,3.11, or3.12
- Environment Type:
VS Code will create and activate the environment automatically.
# On Windows
py -3.12 -m venv venv
# On Linux/macOS
python3.12 -m venv venv
# Activate the virtual environment
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activatecd backend
pip install -r requirenments.txtCreate a .env file inside the backend folder: (refer .env.example)
TF_ENABLE_ONEDNN_OPTS=0
MONGO_URL=mongodb+srv://<username>:<password>@<cluster-url>/<database>
MONGO_DB=your_db_name
MONGO_COLLECTION=your_collectionfastapi dev main.pyFastAPI will be live at: http://127.0.0.1:8000/
To access the API interface, open your browser and go to:
http://127.0.0.1:8000/docs
Use the following endpoints to trigger model training:
| Endpoint | Description |
|---|---|
POST /retrain/daily |
Train Daily Model |
POST /retrain/weekly |
Train Weekly Model |
POST /retrain/monthly |
Train Monthly Model |
POST /retrain/quarterly |
Train Quarterly Model |
After hitting any of these endpoints, training will begin using the data in your MongoDB collection.
Once training is complete:
- The trained model files will be saved in the
models/directory. - The scalers used for preprocessing will be stored in the
scalers/directory.
After your models are trained and saved, proceed to set up the frontend dashboard to visualize predictions and analytics.