rhythmic-battery-45198
06/10/2022, 3:25 AMtensorflow
package from linux development machines. To support development on m1 mac, we need to use the tensorflow-macos
package, with the module mapping "tensorflow-macos": ["tensorflow"]
. This causes ambiguity for tensorflow dependency inference. Any advice on how to handle this? Thanks!rhythmic-battery-45198
06/10/2022, 3:27 AMThe target src/python/path/to/model.py:../../../model_project imports `tensorflow.keras.layers.LSTM`, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['3rdparty/python#tensorflow', '3rdparty/python#tensorflow-macos'].
curved-television-6568
06/10/2022, 6:53 AMrhythmic-battery-45198
06/10/2022, 10:43 AMcurved-television-6568
06/10/2022, 12:26 PMrhythmic-battery-45198
06/10/2022, 1:23 PMhigh-energy-55500
06/14/2022, 6:18 PM[tool.poetry.dependencies]
tensorflow = { version = "2.7.0", markers = "sys.platform != 'darwin' or platform_machine != 'arm64'" }
tensorflow-macos = { version = "2.7.0", markers = "sys.platform == 'darwin' and platform_machine == 'arm64'" }
this is what we have in our root `BUILD`:
poetry_requirements(
...
overrides={
"tensorflow": {
"dependencies": [":tensorflow-macos"],
},
},
)
rhythmic-battery-45198
06/14/2022, 6:21 PMpython_requirement(
name="tensorflow",
requirements=[
'tensorflow == 2.7.0; sys_platform != "darwin"',
'tensorflow-macos == 2.7.0; sys_platform == "darwin"'
],
)
rhythmic-battery-45198
06/14/2022, 6:21 PMrhythmic-battery-45198
06/14/2022, 6:22 PM