fit_world#
- hybrid_aif.train.fit_world(
- system,
- params,
- learn_state,
- batch,
- *,
- key,
- lr=0.0001,
- lr_by_slot=None,
- clip=1000.0,
- roles=None,
- return_states=False,
- **loss_kwargs,
One gradient step of world-model learning:
(params, learn_state, losses).With
return_states=Truea fourth element follows: the posteriorRSSMStateof the forward pass (pre-step parameters, gradient stopped).rolesgoes toassemble(),**loss_kwargstoworld_loss(). Pure, jit-able, resumable from its own return value;learn_statestarts assystem.init_learn_state(params)andNoneraises.lrmay be traced.clipis one global-norm clip over the whole model (Nonedisables it), summed inPART_FIELDSorder; each slot then steps through its ownLearnStateentry.lr_by_slotisSystem.learn’s rate grammar: a static0.0skips that slot’s step at trace time, a traced zero multiplies it. A frozen slot is not differentiated, holds no optimizer state, and comes back bitwise.