Model Control — Running Predictions
The Model Control page is where you train models, run predictions, and schedule automatic runs. This page covers the training data, run, and configuration sections. For replaying historical experiments through the models, see Simulations.
Training Data Selection
Section titled “Training Data Selection”Before running any model you can specify which experiments to train on. If you skip this step, all data available from the WebSocket source is used.

Browsing and Filtering
Section titled “Browsing and Filtering”On opening, available experiments and their metadata are fetched concurrently. Each experiment appears as a card showing the experiment ID, reactor entities, latest timestamp, and organism and media used.
Use the filter bar to narrow the list by organism or media — options populate automatically and filters apply instantly without any button click.
Selecting Experiments
Section titled “Selecting Experiments”Tick the checkbox on any experiment card to include it in training. The Selected: N counter updates as you go.
- Select All — selects all currently visible (filtered) experiments
- Deselect All — clears all selections
Click Apply Selection to confirm. The status label updates to show which experiments are now active:
Currently selected for training: exp_001 (A1), exp_001 (A2), exp_002 (A1)If nothing is selected, all available data is used and the label shows:
No experiments selected - all available data will be used for trainingRunning Models
Section titled “Running Models”To run the predictive models, multiple functions can be used in the Run Models tab:
Individual Models
Section titled “Individual Models”Three buttons run one model at a time:
| Button | Model | Config file |
|---|---|---|
| Run Linear Regression | Linear Regression | LinearRegression_config_NiceGUI.yaml |
| Run XGBoost | XGBoost | XGBoost_config_NiceGUI.yaml |
| Run LSTM | LSTM | LSTM_config_NiceGUI.yaml |
Each model runs asynchronously — the UI stays responsive during training and prediction.
Run All
Section titled “Run All”Click Run All to execute all three models in a single operation. Results are written to the local database and appear immediately in the Performance Metrics and Experimental Insight pages.
Use Uploaded Models
Section titled “Use Uploaded Models”Each run button has a Use Uploaded Models toggle. When enabled, the model loads a previously saved artefact from the Model Files section instead of retraining from scratch. When disabled, the model always retrains on the selected training data.

Model Files
Section titled “Model Files”Model artefacts are stored in ~/.graft/trained_models/ and
organised in a three-level hierarchy:
trained_models/└── {model_type}/ └── {date_folder}/ └── {entity}/ └── model_file.pkl (.keras / .h5 / .joblib also supported)Use the three dropdowns — Model Type, Date Folder (newest first), and Entity — to navigate to the files you want. A table shows all matching files with filename, save date, and file size.

Selecting a file for use — click on Use for Training next to a file. That model is then loaded and used when you run a model with Use Uploaded Models enabled.
Importing — click Upload Model and upload one or more .pkl, .keras,
.h5, or .joblib files. They are saved immediately and appear in the
file browser.
Exporting — click Export to download latest_model.pkl. An error
notification is shown if no model has been saved yet.
Auto-Run
Section titled “Auto-Run”To run all models automatically on a repeating schedule:
- Set the interval using the number input and unit selector
- Click Start button to run the models
The status label confirms the active schedule:
Status: Running every 3 minutesClick Stop button at any time. Only one auto-run can be active — starting a second while one is running shows a warning notification.
Configuration
Section titled “Configuration”Adjust model parameters directly in the dashboard without editing YAML files manually.
| Control | Config key | Description |
|---|---|---|
| Forecast horizon | forecast.horizon_minutes | Minutes ahead to predict |
| Lag features | lags.number | Number of lag steps in the feature matrix |
| Resample frequency | preprocessing.resample_freq | Time resampling interval |
| Fill method | preprocessing.fill_method | Missing value strategy |
| Test size | training.test_size | Fraction held out for evaluation |
| Model-specific fields | model.* | Units, depth, dropout, etc. |

Click Save Config to write all values back to the relevant YAML file. Only the sections that have controls are modified — everything else is preserved. The new values take effect the next time a model is run.

See Also
Section titled “See Also”- Simulations — replay a historical experiment through the models in time chunks
- Performance Metrics — view prediction results and evaluation metrics after running