2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, alembic
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
|
|
|
, cloudpickle
|
2022-06-16 17:23:12 +00:00
|
|
|
, databricks-cli
|
|
|
|
, docker
|
|
|
|
, entrypoints
|
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
2022-12-17 10:02:37 +00:00
|
|
|
, gitpython
|
2022-06-16 17:23:12 +00:00
|
|
|
, gorilla
|
|
|
|
, gunicorn
|
|
|
|
, importlib-metadata
|
2023-04-12 12:48:02 +00:00
|
|
|
, markdown
|
|
|
|
, matplotlib
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
2022-06-16 17:23:12 +00:00
|
|
|
, prometheus-flask-exporter
|
2020-04-24 23:36:52 +00:00
|
|
|
, protobuf
|
2022-06-16 17:23:12 +00:00
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
2023-04-12 12:48:02 +00:00
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, pyarrow
|
2023-04-29 16:46:19 +00:00
|
|
|
, pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
2024-01-13 08:15:51 +00:00
|
|
|
, querystring-parser
|
2022-06-16 17:23:12 +00:00
|
|
|
, requests
|
2023-04-12 12:48:02 +00:00
|
|
|
, scikit-learn
|
2022-06-16 17:23:12 +00:00
|
|
|
, scipy
|
2023-04-12 12:48:02 +00:00
|
|
|
, shap
|
2020-04-24 23:36:52 +00:00
|
|
|
, simplejson
|
|
|
|
, sqlalchemy
|
2022-06-16 17:23:12 +00:00
|
|
|
, sqlparse
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mlflow";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.8.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-5OW90tnvsLOG7Lzi335D8ExGoyCAIIQU3FO1/XFVlng=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements/core-requirements.txt \
|
|
|
|
--replace "gunicorn<21" "gunicorn"
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# Remove currently broken dependency `shap`, a model explainability package.
|
|
|
|
# This seems quite unprincipled especially with tests not being enabled,
|
|
|
|
# but not mlflow has a 'skinny' install option which does not require `shap`.
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
pythonRemoveDeps = [ "shap" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonRelaxDeps = [ "pytz" "pyarrow" ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
alembic
|
|
|
|
click
|
|
|
|
cloudpickle
|
2022-06-16 17:23:12 +00:00
|
|
|
databricks-cli
|
|
|
|
docker
|
|
|
|
entrypoints
|
2020-04-24 23:36:52 +00:00
|
|
|
flask
|
2022-12-17 10:02:37 +00:00
|
|
|
gitpython
|
2022-06-16 17:23:12 +00:00
|
|
|
gorilla
|
|
|
|
gunicorn
|
|
|
|
importlib-metadata
|
2023-04-12 12:48:02 +00:00
|
|
|
markdown
|
|
|
|
matplotlib
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
pandas
|
2022-06-16 17:23:12 +00:00
|
|
|
prometheus-flask-exporter
|
2020-04-24 23:36:52 +00:00
|
|
|
protobuf
|
2022-06-16 17:23:12 +00:00
|
|
|
python-dateutil
|
2023-04-12 12:48:02 +00:00
|
|
|
pyarrow
|
2023-04-29 16:46:19 +00:00
|
|
|
pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
2024-01-13 08:15:51 +00:00
|
|
|
querystring-parser
|
2022-06-16 17:23:12 +00:00
|
|
|
requests
|
2023-04-12 12:48:02 +00:00
|
|
|
scikit-learn
|
2022-06-16 17:23:12 +00:00
|
|
|
scipy
|
2023-04-12 12:48:02 +00:00
|
|
|
#shap
|
2020-04-24 23:36:52 +00:00
|
|
|
simplejson
|
|
|
|
sqlalchemy
|
2022-06-16 17:23:12 +00:00
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mlflow"
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# no tests in PyPI dist
|
2022-06-16 17:23:12 +00:00
|
|
|
# run into https://stackoverflow.com/questions/51203641/attributeerror-module-alembic-context-has-no-attribute-config
|
2023-04-29 16:46:19 +00:00
|
|
|
# also, tests use conda so can't run on NixOS without buildFHSEnv
|
2022-06-16 17:23:12 +00:00
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source platform for the machine learning lifecycle";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/mlflow/mlflow";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/mlflow/mlflow/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tbenst ];
|
|
|
|
};
|
|
|
|
}
|