protomotions.agents.common.pretrained module#

Utilities for loading frozen pretrained modules.

protomotions.agents.common.pretrained.freeze_module(module)[source]#

Freeze a module in eval mode.

protomotions.agents.common.pretrained.get_path(root, path)[source]#

Resolve a dotted attribute/key path.

Module paths may use public names such as actor even when the model stores the module as _actor. An empty path returns root unchanged, which lets callers request the whole loaded model.

protomotions.agents.common.pretrained.load_pretrained_model_module(
config,
device,
checkpoint_path_overrides=None,
prefer_inference_config=False,
)[source]#

Instantiate a checkpoint-backed or embedded frozen module.