Configuration
Most config comes from VeRL — here are the keys you set, plus the ones AgriManager adds.
AgriManager is configured with YAML files plus Hydra command-line overrides. Every run is defined by a config; the command line only adjusts it. There are no hidden argparse flags.
Config layers#
A training config is three layers, each overriding the one below:
- VeRL base —
ppo_trainer(from the VeRL submodule): every RL and training default. - AgriManager defaults —
agri_grpo(default) oragri_ppo: override some VeRL defaults and add the AgriManager-only keys. - CLI overrides — Hydra
key=valueon the command line: per-run tweaks.
So most keys you see are VeRL's — AgriManager only overrides a few and adds a few. Pick a config with
--config-name, then override any field:
bash entrypoints/train/train.sh \ --config-name agri_grpo \ actor_rollout_ref.model.path=Qwen/Qwen2.5-3B-Instruct \ trainer.experiment_name=my_experiment \ trainer.total_epochs=1
Where configs live#
| Kind | Location |
|---|---|
| Dataset configs & examples | entrypoints/dataset/examples/ |
| Training configs | entrypoints/train/config/ — agri_grpo.yaml (default), agri_ppo.yaml, nn.yaml |
| Evaluation configs | entrypoints/eval/config/ — default.yaml (language models), openrouter.yaml, nn.yaml, and scripted policies: no_action, random, ag_heuristic (the scripted agronomic reference) |
| Model / provider configs | agrimanager/model_interface/configs/{openai,google,openrouter,vllm_offline,vllm_server}/ |
Common VeRL keys#
The keys you set most often are inherited from VeRL. The important ones:
| Key | What it sets | Default |
|---|---|---|
| Model & rollout | ||
actor_rollout_ref.model.path | policy model to train | Qwen/Qwen3-4B-Instruct-2507 |
actor_rollout_ref.rollout.n | rollouts sampled per prompt (the GRPO group) | 4 |
actor_rollout_ref.rollout.gpu_memory_utilization | vLLM GPU-memory fraction | 0.7 |
actor_rollout_ref.actor.optim.lr | actor learning rate | 1e-6 |
| Data | ||
data.train_files · data.val_files | dataset parquet paths | — |
data.max_response_length | max generated tokens per turn | 512 |
| Algorithm | ||
algorithm.adv_estimator | advantage estimator (grpo / gae) | grpo |
| Trainer | ||
trainer.total_epochs | training epochs | 2 |
trainer.n_gpus_per_node · trainer.nnodes | compute resources | 1 · 1 |
trainer.save_freq · trainer.test_freq | checkpoint / validation cadence (steps) | 100 · 10 |
trainer.project_name · trainer.experiment_name | Weights & Biases run naming | — |
These — and the rest of the training stack (FSDP, KL, optimizer, sharding) — are documented in the VeRL config reference. AgriManager does not redefine them.
AgriManager keys#
On top of VeRL, AgriManager adds a small set of keys in the training config:
| Key | What it does | Default |
|---|---|---|
data.val_sets | named validation sets (name → parquet), logged as separate curves during training; see Benchmark | {} |
data.validation_axis | OOD axis the validation metrics are grouped by | null |
trainer.per_turn_training | expand each multi-turn trajectory into per-turn training samples | True |
trainer.rollout_filter.enable | drop low-variance rollout groups, RAGEN-style; see RL training | True |
trainer.rollout_filter.metric · .value | filter metric · fraction of groups kept | reward_variance · 0.9 |
The PPO config (agri_ppo) adds trainer.stepwise_advantage.enable for cross-turn
stepwise GAE.
Environment keys (dataset config)#
Anything that changes environment semantics is set in the dataset config (under env:) and
baked into each parquet row, so the same split always reconstructs the same environment. To change the
environment, edit the dataset config and rebuild. The one exception is the response format at evaluation: the
frozen test suite is built in the no-think format, and the evaluator applies each checkpoint's own format with
data.env_config_overrides and checks it with data.assert_env_config
(see Evaluation).
| Key | What it sets | Example |
|---|---|---|
env_id | simulator variant + action menu Σ_A | lnpkw-v0 |
objective_id | reward objective Σ_R | profit_max |
turn_num | max turns per episode | 24 |
intvn_interval | days between interventions | 10 |
require_think | think format (a short reasoning block before the answer) or no-think | false (default) |
think_tag · thinking_mode | tag of the reasoning block · the reasoning guidance in the prompt | tool_call · grounding_decision (defaults) |
llm_mode | text interface for language models; false builds the numeric datasets the NN baselines use | true |
include_crop_traits | add crop traits to the prompt | false |
The observation, action, and reward schema variants (Σ_O · Σ_A · Σ_R) are configured here too —
see Tasks for the full set.
Environment variables#
Provider API keys are read from the environment, only for the provider you use:
export OPENAI_API_KEY="sk-..." # OpenAI export GEMINI_API_KEY="..." # Google Gemini export OPENROUTER_API_KEY="sk-or-..." # OpenRouter
The default vLLM-offline path needs no key. Training and evaluation log to Weights & Biases;
run wandb login once if you want logging. To keep runs local, pass
trainer.logger='["console"]' to training, wandb.enabled=false to scripted-policy
evaluation, or set WANDB_MODE=offline.
Simulator locations, needed only when they differ from the defaults:
| Variable | Default |
|---|---|
WOFOST_GYM_PATH | ../AgriManagerExternal/WOFOSTGym |
CYCLES_GYM_PATH | ../AgriManagerExternal/CyclesGym |
DSSAT_GYM_PATH · DSSAT_PDI_BRIDGE_DIR | spack/gym-dssat-pdi in the checkout (the Spack view that contains bin/run_dssat) · found automatically (see DSSAT runtime) |
HF_TOKEN | only to upload checkpoints or result bundles; public repositories need none |