> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryreflex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Model management

> Save, load, inspect, and push policies.

Every saved model is a self-describing directory. See [artifacts](/concepts/artifacts)
for the format.

## Save

`policy` is an `rfx.nn.Policy` instance (e.g., `MLP`, `ActorCritic`) after
training. `robot_config` and `normalizer` are optional — pass them to make
the artifact self-describing:

```python theme={null}
from rfx.nn import MLP
from rfx.utils import ObservationNormalizer

policy = MLP(obs_dim=48, action_dim=12)     # or any trained Policy
config = rfx.GO2_CONFIG                      # RobotConfig (built-in or custom)
normalizer = ObservationNormalizer()         # optional, bundles obs stats

# ...train policy + fit normalizer...

policy.save(
    "runs/go2-walk-v1",
    robot_config=config,
    normalizer=normalizer,
    training_info={"total_steps": 50000},
)
```

See [Policies](/sdk/policies) for how to define and train a policy.

Creates:

```text theme={null}
runs/go2-walk-v1/
├── rfx_config.json     # architecture + robot + training metadata
├── model.safetensors   # weights
└── normalizer.json     # observation normalizer state
```

## Load

```python theme={null}
loaded = rfx.load_policy("runs/go2-walk-v1")
loaded = rfx.load_policy("hf://rfx-community/go2-walk-v1")

loaded.policy         # reconstructed policy
loaded.robot_config   # RobotConfig or None
loaded.normalizer     # normalizer or None
loaded.policy_type    # "MLP", "ActorCritic", ...
```

`LoadedPolicy` is callable and handles torch / tinygrad conversion
automatically.

## Inspect

```python theme={null}
config = rfx.inspect_policy("runs/go2-walk-v1")
print(config["policy_type"])     # "MLP"
print(config["policy_config"])   # {"obs_dim": 48, ...}
```

## HuggingFace Hub

Push:

```python theme={null}
rfx.push_policy("runs/go2-walk-v1", "rfx-community/go2-walk-v1")
```

Pull (at load time):

```python theme={null}
loaded = rfx.load_policy("hf://rfx-community/go2-walk-v1")
```

<Tip>
  `rfx deploy` calls `load_policy` internally. If the artifact's
  `rfx_config.json` records a robot, `--robot` is inferred automatically.
</Tip>
