def _compute_schema_hash(self) -> int:
    optimized_param_groups = self.state_averager.optimizer.param_groups
    optimized_parameters = [param for group in optimized_param_groups for param in group['params']]
    param_shapes = tuple((tuple(param.shape) for param in optimized_parameters))
    grad_ids = (tuple((id(param.grad) for param in optimized_parameters)) if self.offload_optimizer else None)
    return hash((grad_ids, param_shapes))
def _compute_schema_hash(self) -> int:
    optimized_param_groups = self.state_averager.optimizer.param_groups
    optimized_parameters = [param for group in optimized_param_groups for param in group['params']]
    param_shapes = tuple((tuple(param.shape) for param in optimized_parameters))
    grad_ids = (tuple((id(param.grad) for param in optimized_parameters)) if self.offload_optimizer else None)
    return hash((grad_ids, param_shapes))