From a95b22a413bf486ae5c5f42f06a59549eed10806 Mon Sep 17 00:00:00 2001 From: Sam Foreman Date: Thu, 14 Apr 2022 10:12:36 -0500 Subject: [PATCH] Cleaning up CodeFactor issues --- src/l2hmc/experiment.py | 8 +++----- src/l2hmc/lattice/su3/tensorflow/lattice.py | 5 ----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/l2hmc/experiment.py b/src/l2hmc/experiment.py index c280a060..d2d98266 100644 --- a/src/l2hmc/experiment.py +++ b/src/l2hmc/experiment.py @@ -47,13 +47,11 @@ def build_lattice(self): if framework == 'pytorch': from l2hmc.lattice.u1.pytorch.lattice import LatticeU1 return LatticeU1(nchains, tuple(latvolume)) - elif framework == 'tensorflow': + if framework == 'tensorflow': from l2hmc.lattice.u1.tensorflow.lattice import LatticeU1 return LatticeU1(nchains, tuple(latvolume)) - else: - raise ValueError( - f'Unexpected value for `framework`: {framework}' - ) + + raise ValueError(f'Unexpected value for `framework`: {framework}') if self.config.dynamics.group == 'SU3': if framework == 'pytorch': diff --git a/src/l2hmc/lattice/su3/tensorflow/lattice.py b/src/l2hmc/lattice/su3/tensorflow/lattice.py index a2eefaf8..48cef15f 100644 --- a/src/l2hmc/lattice/su3/tensorflow/lattice.py +++ b/src/l2hmc/lattice/su3/tensorflow/lattice.py @@ -100,11 +100,6 @@ def _plaquette(self, x: Tensor, u: int, v: int): xvu = self.g.mul(x[:, v], tf.roll(x[:, u], shift=-1, axis=v + 1)) return self.g.trace(self.g.mul(xuv, xvu, adjoint_b=True)) - def _plaq(self, x: Tensor, d: int, u: int, v: int): - """Calculate the 1x1 square plaquette - Return: U[μ](x) * U[ν](x+μ) * U†[μ](x+ν) * U†[ν](x)""" - pass - def _wilson_loops( self, x: Tensor,