Add explicit numpy dependency
What does this merge request do and why?
We directly require numpy
in our code base hence this needs be explicitly added to Poetry.
❯ rg "import numpy"
promptlib/chunking/chunker.py
3:import numpy as np
promptlib/metrics/metrics.py
4:import numpy as np
tests/promptlib/metrics/test_metric.py
3:import numpy as np
We need to constrain numpy
to be < 1.25
to be compatible with apache-beam
.
Because no versions of apache-beam match >2.52.0,<2.53.0rc1 || >2.53.0rc1,<2.53.0rc2 || >2.53.0rc2,<3.0.0
and apache-beam (2.53.0rc1) depends on numpy (>=1.14.3,<1.25.0), apache-beam (>2.52.0,<2.53.0rc2 || >2.53.0rc2,<3.0.0) requires numpy (>=1.14.3,<1.25.0).
And because apache-beam (2.53.0rc2) depends on numpy (>=1.14.3,<1.25.0)
and apache-beam (2.52.0) depends on numpy (>=1.14.3,<1.25.0), apache-beam (>=2.52.0,<3.0.0) requires numpy (>=1.14.3,<1.25.0).
So, because promptlib depends on both apache-beam (^2.52.0) and numpy (^1.26.2), version solving failed.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
I've ran the affected pipeline(s) to validate that nothing is broken. -
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Tan Le