Engine.export_weights
Engine.export_weights(model_name, path, **extra)Write one trained model’s weights, ready to publish or to load again later.
safetensors plus a sidecar recording what the weights are for. Anything passed as extra joins the sidecar, which is where the data they were trained on and its licence belong - a weights file whose provenance is only in somebody’s memory cannot be used by anybody else.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| model_name | str | Which model’s weights to write. | required |
| path | str | Path | Where to write. The sidecar goes beside it. | required |
| **extra | Anything else to record in the sidecar. | {} |
Returns
| Name | Type | Description |
|---|---|---|
| Path | The path written. |