Skip to content

Commit ef148d7

Browse files
authored
Merge pull request #504 from bioimage-io/no_tf112
mininum tf1.13
2 parents dfdef8e + 96f1041 commit ef148d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/static_validation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ def get_default_env(
8383
if tensorflow_version is not None:
8484
# tensorflow 1 is not available on conda, so we need to inject this as a pip dependency
8585
if tensorflow_version.major == 1:
86+
tensorflow_version = max(tensorflow_version, Version("1.13")) # tf <1.13 not available anymore
8687
assert opset_version is None
8788
assert pytorch_version is None
8889
conda_env["dependencies"] = ["pip", "python >=3.7,<3.8"] # tf 1.15 not available for py>=3.8
8990
# 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.
9093
conda_env["dependencies"].append(
91-
{"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"]}
9295
)
9396
else: # use conda otherwise
9497
conda_env["dependencies"].append(f"tensorflow {get_version_range(tensorflow_version)}")

0 commit comments

Comments
 (0)