Skip to content

Commit 06af460

Browse files
authored
Merge pull request #415 from mj-will/prepare-v0.13.2
REL: prepare v0.13.2
2 parents be2424c + 841ddd3 commit 06af460

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.13.2]
11+
12+
### Fixed
13+
14+
- Handle error when `linear_transform='None'` which occurs when using `bilby_pipe` after the `flow_config` changes (https://github.com/mj-will/nessai/pull/414)
15+
1016
## [0.13.1]
1117

1218
### Changed
@@ -661,7 +667,8 @@ First public release.
661667

662668
- Original `GWFlowProposal` method renamed to `LegacyGWFlowProposal`. Will be removed in the next release.
663669

664-
[Unreleased]: https://github.com/mj-will/nessai/compare/v0.13.1...HEAD
670+
[Unreleased]: https://github.com/mj-will/nessai/compare/v0.13.2...HEAD
671+
[0.13.2]: https://github.com/mj-will/nessai/compare/v0.13.1...v0.13.2
665672
[0.13.1]: https://github.com/mj-will/nessai/compare/v0.13.0...v0.13.1
666673
[0.13.0]: https://github.com/mj-will/nessai/compare/v0.12.0...v0.13.0
667674
[0.12.0]: https://github.com/mj-will/nessai/compare/v0.11.0...v0.12.0

nessai/flows/nsf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ def spline_constructor(i):
110110

111111
transforms_list = []
112112
for i in range(num_layers):
113-
if linear_transform is not None:
113+
if (
114+
linear_transform is not None
115+
and linear_transform.lower() != "none"
116+
):
114117
transforms_list.append(
115118
create_linear_transform(linear_transform, features)
116119
)
120+
117121
transforms_list.append(spline_constructor(i))
118122
if batch_norm_between_layers:
119123
transforms_list.append(transforms.BatchNorm(features=features))

nessai/flows/realnvp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ def create_net(in_features, out_features):
191191
transforms.normalization.ActNorm(features=features)
192192
)
193193

194-
if linear_transform is not None:
194+
if (
195+
linear_transform is not None
196+
and linear_transform.lower() != "none"
197+
):
195198
layers.append(
196199
create_linear_transform(linear_transform, features)
197200
)

tests/test_flows/test_specific_flows.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
dict(linear_transform="svd"),
2424
dict(linear_transform="lu"),
2525
dict(linear_transform=None),
26+
dict(linear_transform="None"),
2627
dict(mask=np.array([[1, -1], [-1, 1]])),
2728
dict(mask=[1, -1]),
2829
dict(pre_transform="batch_norm"),
@@ -75,6 +76,7 @@ def test_realnvp_actnorm_batchnorm():
7576
dict(linear_transform="svd"),
7677
dict(linear_transform="lu"),
7778
dict(linear_transform=None),
79+
dict(linear_transform="None"),
7880
dict(num_bins=10),
7981
],
8082
)

0 commit comments

Comments
 (0)