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

mosesyhc / LCGP / 16935777839

13 Aug 2025 11:24AM UTC coverage: 97.763% (+6.2%) from 91.538%
16935777839

Pull #12

github

web-flow
Merge 12d3f0920 into 4a2aa04a5
Pull Request #12: Replacing pytorch with tensorflow for using native L-BFGS with autograd

302 of 309 new or added lines in 8 files covered. (97.73%)

1 existing line in 1 file now uncovered.

437 of 447 relevant lines covered (97.76%)

0.98 hits per line

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

95.0
/lcgp/tests/test_training.py
1
import pytest
1✔
2
import numpy as np
1✔
3
import copy
1✔
4

5
from lcgp import LCGP
1✔
6

7

8
class TestTraining:
1✔
9
    @pytest.mark.parametrize('submethod', ['full'])  #, 'elbo', 'proflik'])
1✔
10
    def test_fit(self, submethod):
1✔
11
        x = np.linspace(0, 1, 40)
1✔
12
        y = np.reshape(copy.copy(x), (1, 40))
1✔
13
        model = LCGP(y=y, x=x, submethod=submethod)
1✔
14
        model.fit()
1✔
15
        model.predict(x0=x)
1✔
16
        # model.predict(x0=x, return_fullcov=True)
17
        # model.forward(x0=x)
18
        model.get_param()
1✔
19
        # model.get_param_grad()
20

21
    def test_invalid_submethod(self):
1✔
22
        x = np.linspace(0, 1, 40)
1✔
23
        y = np.reshape(copy.copy(x), (1, 40))
1✔
24
        model = LCGP(y=y, x=x, submethod='null')
1✔
25
        with pytest.raises(ValueError):
1✔
26
            model.fit()
1✔
NEW
27
            model.predict(x0=x)
×
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

© 2025 Coveralls, Inc