Skip to content

Commit

Permalink
Update type for kfac_jax Optimizer.State.
Browse files Browse the repository at this point in the history
The forward declaration was recently removed; instead use the public API.

PiperOrigin-RevId: 624106473
Change-Id: Ia2043491c70b31c89d5025401b0f2d7ad36a972e
  • Loading branch information
jsspencer committed Apr 15, 2024
1 parent d5bef67 commit 0233831
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ferminet/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def init_electrons( # pylint: disable=dangerous-default-value


# All optimizer states (KFAC and optax-based).
OptimizerState = Union[optax.OptState, kfac_jax.optimizer.OptimizerState]
OptimizerState = Union[optax.OptState, kfac_jax.Optimizer.State]
OptUpdateResults = Tuple[networks.ParamTree, Optional[OptimizerState],
jnp.ndarray,
Optional[qmc_loss_functions.AuxiliaryLossData]]
Expand Down Expand Up @@ -331,7 +331,7 @@ def make_kfac_training_step(
def step(
data: networks.FermiNetData,
params: networks.ParamTree,
state: kfac_jax.optimizer.OptimizerState,
state: kfac_jax.Optimizer.State,
key: chex.PRNGKey,
mcmc_width: jnp.ndarray,
) -> StepResults:
Expand Down

0 comments on commit 0233831

Please sign in to comment.