AgriManager / Docs
Website GitHub

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:

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
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#

KindLocation
Dataset configs & examplesentrypoints/dataset/examples/
Training configsentrypoints/train/config/ — agri_grpo.yaml (default), agri_ppo.yaml, nn.yaml
Evaluation configsentrypoints/eval/config/ — default.yaml (language models), openrouter.yaml, nn.yaml, and scripted policies: no_action, random, ag_heuristic (the scripted agronomic reference)
Model / provider configsagrimanager/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:

KeyWhat it setsDefault
Model & rollout
actor_rollout_ref.model.pathpolicy model to trainQwen/Qwen3-4B-Instruct-2507
actor_rollout_ref.rollout.nrollouts sampled per prompt (the GRPO group)4
actor_rollout_ref.rollout.gpu_memory_utilizationvLLM GPU-memory fraction0.7
actor_rollout_ref.actor.optim.lractor learning rate1e-6
Data
data.train_files · data.val_filesdataset parquet paths—
data.max_response_lengthmax generated tokens per turn512
Algorithm
algorithm.adv_estimatoradvantage estimator (grpo / gae)grpo
Trainer
trainer.total_epochstraining epochs2
trainer.n_gpus_per_node · trainer.nnodescompute resources1 · 1
trainer.save_freq · trainer.test_freqcheckpoint / validation cadence (steps)100 · 10
trainer.project_name · trainer.experiment_nameWeights & 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:

KeyWhat it doesDefault
data.val_setsnamed validation sets (name → parquet), logged as separate curves during training; see Benchmark{}
data.validation_axisOOD axis the validation metrics are grouped bynull
trainer.per_turn_trainingexpand each multi-turn trajectory into per-turn training samplesTrue
trainer.rollout_filter.enabledrop low-variance rollout groups, RAGEN-style; see RL trainingTrue
trainer.rollout_filter.metric · .valuefilter metric · fraction of groups keptreward_variance · 0.9

The PPO config (agri_ppo) adds trainer.stepwise_advantage.enable for cross-turn stepwise GAE.

Environment keys (dataset config)#

Important

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).

KeyWhat it setsExample
env_idsimulator variant + action menu Σ_Alnpkw-v0
objective_idreward objective Σ_Rprofit_max
turn_nummax turns per episode24
intvn_intervaldays between interventions10
require_thinkthink format (a short reasoning block before the answer) or no-thinkfalse (default)
think_tag · thinking_modetag of the reasoning block · the reasoning guidance in the prompttool_call · grounding_decision (defaults)
llm_modetext interface for language models; false builds the numeric datasets the NN baselines usetrue
include_crop_traitsadd crop traits to the promptfalse

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:

bash
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:

VariableDefault
WOFOST_GYM_PATH../AgriManagerExternal/WOFOSTGym
CYCLES_GYM_PATH../AgriManagerExternal/CyclesGym
DSSAT_GYM_PATH · DSSAT_PDI_BRIDGE_DIRspack/gym-dssat-pdi in the checkout (the Spack view that contains bin/run_dssat) · found automatically (see DSSAT runtime)
HF_TOKENonly to upload checkpoints or result bundles; public repositories need none