(model)
| 712 | |
| 713 | |
| 714 | def unwrap_model(model): |
| 715 | model = accelerator.unwrap_model(model) |
| 716 | model = model._orig_mod if is_compiled_module(model) else model |
| 717 | return model |
| 718 | |
| 719 | # create custom saving & loading hooks so that `accelerator.save_state(...)` serializes in a nice format |
| 720 | def save_model_hook(models, weights, output_dir): |
nothing calls this directly
no outgoing calls
no test coverage detected