kd.ckpts.NoopTransform

kd.ckpts.NoopTransform#

class kauldron.checkpoints.NoopTransform[source]

Bases: kauldron.checkpoints.partial_loader.AbstractPartialLoader

init_transform that does nothing.

transform(state)[source]

Transform the state by updating it with pre-trained values.

Notes:

  • transform functions can modify the state values but should NOT modify its structure, shape or dtypes.

  • transform should correctly propagate the sharding information from the given state.

Parameters:

state – The state object to transform

Returns:

The updated state