silly-queen-7197
05/20/2024, 3:42 AMrequirements.txt with
scikit-learn~=1.4.2
and a module forecast.py that depends on scikit learn. For example,
$ pants dependencies --transitive src/python/forecast.py
3rdparty/python/default.lock:_python-default_lockfile
3rdparty/python/requirements.txt:reqs
3rdparty/python:reqs#scikit-learn
In a new python backend, could we remove the dependency on requirements.txt:reqs? Could we just depend on 3rdparty/python:reqs#scikit-learn? If Pants modeled 3rd Party Requirements, we'd see that scikit-learn itself depends on joblib, numpy, scipy, and threadpoolctl (pip show scikit-learn) but Pants doesn't model that.
Are there fundamental reasons this wouldn't work?
Edit - Formatting - Also sorry if this is the wrong channel. I can move it over to general if that's more appropriatecurved-television-6568
05/20/2024, 7:38 AM3rdparty/python:reqs#scikit-learn for instance, we would also need to know the version of that requirement, along with all its transitive dependencies (from the lockfile) in order to not have to also include the lockfile itself as a dependency.
Agree that using line numbers is a bit of a hack in this case, but it takes us a little closer reducing some superfluous work, until we have proper modelling for this, perhaps something along the lines outlined above.curved-manchester-66006
05/20/2024, 3:09 PM