File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff 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 )} " )
You can’t perform that action at this time.
0 commit comments