average-breakfast-91545
03/20/2023, 1:27 PMpoetry_requirements
for everybody's favourite package: Torch.
In pyproject.toml I have the following
[tool.poetry.group.ml.dependencies]
torch = [
{markers = "platform_machine == 'arm64' and sys_platform == 'darwin'", url = "<https://download.pytorch.org/>..."},
{markers = "platform_machine == 'x86_64' and sys_platform == 'darwin'", url = "<https://download.pytorch.org/>..."},
{markers = "platform_machine == 'x86_64' and sys_platform == 'linux'", url = "<https://download.pytorch.org/>..."}
]
Either this is borked somehow, or there's a bug with parsing, because I'm receiving an error:
ValueError: Invalid requirement 'torch @ <https://download.pytorch.org/whl/cpu/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl;(platform_machine> == 'arm64' and sys_platform == 'darwin')':
Parse error at ""== 'arm6"": Expected string_end
The quoting in the message looks kinda suss. I'm unsure whether I can rewrite these into a form that pants will prefer, or whether I should remove them from pyproject and do something else altogether.enough-analyst-54434
03/20/2023, 1:39 PMaverage-breakfast-91545
03/20/2023, 1:40 PMenough-analyst-54434
03/21/2023, 12:51 AM