Quickstart#
Overview#
This guide walks through the minimum steps to get started with Neural-LAM:
Set up example data
Create a graph
Train a model
Evaluate the model
Step 1: Download Example Data#
When running tests for the first time, example data is automatically downloaded from S3. You can trigger this download by running a minimal test.
# Run a minimal test to trigger the data download
pytest tests/test_training.py -vv -s -k "test_training"
Step 2: Create a Graph#
Before training, you must construct a graph mesh for your data.
python -m neural_lam.create_graph_with_wmg --config_path <path-to-config> --name <graph-name>
This script builds the mesh graph required by the GNN models.
Step 3: Train a Model#
Now you can train a model using the graph and configuration.
python -m neural_lam.train_model --config_path <path-to-config> --model graph_lam --graph <graph-name>
Neural-LAM supports several models like graph_lam, hi_lam, and hi_lam_parallel.
Step 4: Evaluate#
After training, you can evaluate the model on the test set by loading the saved checkpoint.
python -m neural_lam.train_model --eval test --config_path <path-to-config> --model graph_lam --graph <graph-name> --load <checkpoint-path>
Configuration#
Neural-LAM uses a YAML configuration system powered by dataclass-wizard. The configuration selects the datastore and sets training options such as state feature weighting and output clamping; model hyperparameters are train_model CLI flags. For complete details, see the API reference for neural_lam.config.NeuralLAMConfig.
API Reference for complete API reference