Skip to content

Commit 546f812

Browse files
authored
Hotfix Version 2.0.1 (#431)
* fix optimal transport config (#429) * run linter * [skip-ci] bump version to 2.0.1
1 parent 6ab88a8 commit 546f812

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

bayesflow/networks/flow_matching/flow_matching.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class FlowMatching(InferenceNetwork):
3939
}
4040

4141
OPTIMAL_TRANSPORT_DEFAULT_CONFIG = {
42-
"method": "sinkhorn",
43-
"cost": "euclidean",
42+
"method": "log_sinkhorn",
4443
"regularization": 0.1,
4544
"max_steps": 100,
46-
"tolerance": 1e-4,
45+
"atol": 1e-5,
46+
"rtol": 1e-4,
4747
}
4848

4949
INTEGRATE_DEFAULT_CONFIG = {

bayesflow/utils/optimal_transport/log_sinkhorn.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import keras
22

33
from .. import logging
4-
from ..tensor_utils import is_symbolic_tensor
54

65
from .euclidean import euclidean
76

@@ -27,9 +26,6 @@ def log_sinkhorn_plan(x1, x2, regularization: float = 1.0, rtol=1e-5, atol=1e-8,
2726

2827
log_plan = cost / -(regularization * keras.ops.mean(cost) + 1e-16)
2928

30-
if is_symbolic_tensor(log_plan):
31-
return log_plan
32-
3329
def contains_nans(plan):
3430
return keras.ops.any(keras.ops.isnan(plan))
3531

@@ -59,7 +55,7 @@ def do_nothing():
5955
def log_steps():
6056
msg = "Log-Sinkhorn-Knopp converged after {:d} steps."
6157

62-
logging.info(msg, steps)
58+
logging.debug(msg, steps)
6359

6460
def warn_convergence():
6561
marginals = keras.ops.logsumexp(log_plan, axis=0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "bayesflow"
7-
version = "2.0.0"
7+
version = "2.0.1"
88
authors = [{ name = "The BayesFlow Team" }]
99
classifiers = [
1010
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)