• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kazewong / flowMC / 13818329754

12 Mar 2025 06:01PM UTC coverage: 81.682% (+13.8%) from 67.835%
13818329754

push

github

web-flow
Merge pull request #196 from kazewong/190-updating-documentation-to-align-with-the-latest-version-of-flowmc

190 updating documentation to align with the latest version of flowmc

38 of 65 new or added lines in 12 files covered. (58.46%)

3 existing lines in 3 files now uncovered.

1039 of 1272 relevant lines covered (81.68%)

1.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.68
/src/flowMC/resource/optimizer.py
1
from flowMC.resource.base import Resource
2✔
2
import optax
2✔
3
import equinox as eqx
2✔
4

5

6
class Optimizer(Resource):
2✔
7
    optim: optax.GradientTransformation
2✔
8
    optim_state: optax.OptState
2✔
9

10
    def __repr__(self):
2✔
NEW
11
        return "Optimizer"
×
12

13
    def __init__(
2✔
14
        self,
15
        model: eqx.Module,
16
        learning_rate: float = 1e-3,
17
        momentum: float = 0.9,
18
    ):
19
        self.optim = optax.chain(
2✔
20
            optax.clip_by_global_norm(1.0),
21
            optax.adamw(learning_rate=learning_rate, b1=momentum),
22
        )
23
        self.optim_state = self.optim.init(eqx.filter(model, eqx.is_array))
2✔
24

25
    def __call__(self, params, grads):
2✔
26
        pass
×
27

28
    def print_parameters(self):
2✔
29
        raise NotImplementedError
×
30

31
    def save_resource(self, path: str):
2✔
32
        raise NotImplementedError
×
33

34
    def load_resource(self, path: str):
2✔
35
        raise NotImplementedError
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc