Skip to content

Commit 96f1041

Browse files
committed
pin protobuf for default tf1 env
1 parent 38aeac5 commit 96f1041

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/static_validation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ def get_default_env(
8888
assert pytorch_version is None
8989
conda_env["dependencies"] = ["pip", "python >=3.7,<3.8"] # tf 1.15 not available for py>=3.8
9090
# get bioimageio.core (and its dependencies) via pip as well to avoid conda/pip mix
91+
# protobuf pin: tf 1 does not pin an upper limit for protobuf,
92+
# but fails to load models saved with protobuf 3 when installing protobuf 4.
9193
conda_env["dependencies"].append(
92-
{"pip": [f"bioimageio.core", f"tensorflow {get_version_range(tensorflow_version)}"]}
94+
{"pip": [f"bioimageio.core", f"tensorflow {get_version_range(tensorflow_version)}", "protobuf <4.0"]}
9395
)
9496
else: # use conda otherwise
9597
conda_env["dependencies"].append(f"tensorflow {get_version_range(tensorflow_version)}")

0 commit comments

Comments
 (0)