Skip to content

Commit 974e226

Browse files
committed
reduce snapshot accuracy requirement
1 parent f0bb39b commit 974e226

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

tests/__snapshots__/adaptor_test.ambr

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,38 @@
2424
DeviceArray(0.8603, dtype=float32)
2525
# ---
2626
# name: TestFermiNet.test_kinetic
27-
Array(0.2784566, dtype=float32)
27+
Array(0.278457, dtype=float32)
2828
# ---
2929
# name: TestFermiNet.test_potential
30-
Array(-0.7828356, dtype=float32)
30+
Array(-0.782836, dtype=float32)
3131
# ---
3232
# name: TestFermiNet.test_walk
33-
Array([[[0.4166998, 0.2729937, 0.9946592],
34-
[-0.1636449, 0.5025202, -0.2179334],
35-
[0.5774042, 0.5321482, -0.83614],
36-
[-0.6533463, 0.2915913, 1.5937456],
37-
[0.479838, -0.0993455, -0.2716153],
38-
[-0.4078843, -2.4394894, 0.041675],
39-
[0.0554786, 0.2439971, -0.0937411],
40-
[0.2253472, 0.4246373, -0.7441298],
41-
[0.3037185, 1.1247488, -0.7110634],
42-
[0.0041618, -0.7565254, -1.5015912]]], dtype=float32)
33+
Array([[[0.4167, 0.272994, 0.994659],
34+
[-0.163645, 0.50252, -0.217933],
35+
[0.577404, 0.532148, -0.83614],
36+
[-0.653346, 0.291591, 1.593746],
37+
[0.479838, -0.099346, -0.271615],
38+
[-0.407884, -2.439489, 0.041675],
39+
[0.055479, 0.243997, -0.093741],
40+
[0.225347, 0.424637, -0.74413],
41+
[0.303718, 1.124749, -0.711063],
42+
[0.004162, -0.756525, -1.501591]]], dtype=float32)
4343
# ---
4444
# name: TestFermiNet.test_wf
45-
Array(0.1269548, dtype=float32)
45+
Array(0.126955, dtype=float32)
4646
# ---
4747
# name: TestHydrogen.test_kinetic
48-
Array(1.0260653, dtype=float32)
48+
Array(1.026065, dtype=float32)
4949
# ---
5050
# name: TestHydrogen.test_potential
51-
Array(-1.5260653, dtype=float32)
51+
Array(-1.526065, dtype=float32)
5252
# ---
5353
# name: TestHydrogen.test_walk
54-
Array([[[-0.0269817, -0.0194543, 0.308942],
55-
[0.4157366, -1.0177534, 0.7061033],
56-
[1.1319326, -1.5159024, -1.4163642],
57-
[-0.5633768, 0.0473477, 1.8883846],
58-
[0.062221, -0.3534039, -0.3654794]]], dtype=float32)
54+
Array([[[-0.026982, -0.019454, 0.308942],
55+
[0.415737, -1.017753, 0.706103],
56+
[1.131933, -1.515902, -1.416364],
57+
[-0.563377, 0.047348, 1.888385],
58+
[0.062221, -0.353404, -0.365479]]], dtype=float32)
5959
# ---
6060
# name: TestHydrogen.test_wf
6161
Array(-0.65528, dtype=float32)
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
# serializer version: 1
22
# name: test_antithetic
3-
Array([[-0.0008045, 0.0011302, -0.0004956]], dtype=float32)
3+
Array([[-0.000805, 0.00113, -0.000496]], dtype=float32)
44
# ---
55
# name: test_antithetic_zb
6-
Array([[-0.0003859, -0.0012329, -0.0017145]], dtype=float32)
6+
Array([[-0.000386, -0.001233, -0.001715]], dtype=float32)
77
# ---
88
# name: test_bare
9-
Array([[0.0891896, -0.0699865, 0.1169906]], dtype=float32)
9+
Array([[0.08919, -0.069986, 0.116991]], dtype=float32)
1010
# ---
1111
# name: test_density
1212
Array([[[75.0, 815.0, 98.0],
1313
[84.0, 820.0, 98.0]]], dtype=float32)
1414
# ---
1515
# name: test_energy
1616
list([
17-
Array(-0.5000338, dtype=float32),
18-
Array(-1.0248146, dtype=float32),
19-
Array(0.5247842, dtype=float32),
17+
Array(-0.500034, dtype=float32),
18+
Array(-1.024815, dtype=float32),
19+
Array(0.524784, dtype=float32),
2020
])
2121
# ---
2222
# name: test_swct
2323
tuple(
2424
Array([[0.0, 0.0, 0.0]], dtype=float32),
25-
Array([[9.41e-05, -6.9e-05, 0.0001135]], dtype=float32),
25+
Array([[9.4e-05, -6.9e-05, 0.000114]], dtype=float32),
2626
)
2727
# ---
2828
# name: test_wf_change
29-
Array(0.9999958, dtype=float32)
29+
Array(0.999996, dtype=float32)
3030
# ---
3131
# name: test_zvzb
3232
tuple(
33-
Array([[3.4e-06, 8.9e-06, 1.2e-06]], dtype=float32),
33+
Array([[3e-06, 9e-06, 1e-06]], dtype=float32),
3434
Array([[0.0, 0.0, 0.0]], dtype=float32),
3535
)
3636
# ---

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def consistent_jax_print():
2121
def float_round(x):
2222
# Simply rounding will have "0.0" vs "-0.0" issue
23-
return "0.0" if abs(x) < 1e-7 else str(round(x, 7))
23+
return "0.0" if abs(x) < 1e-6 else str(round(x, 6))
2424

2525
jnp.set_printoptions(
2626
suppress=True,

0 commit comments

Comments
 (0)