1{ lib
2, alembic
3, buildPythonPackage
4, click
5, cloudpickle
6, databricks-cli
7, docker
8, entrypoints
9, fetchpatch
10, fetchPypi
11, flask
12, gitpython
13, gorilla
14, gunicorn
15, importlib-metadata
16, markdown
17, matplotlib
18, numpy
19, packaging
20, pandas
21, prometheus-flask-exporter
22, protobuf
23, python-dateutil
24, pythonOlder
25, pythonRelaxDepsHook
26, pyarrow
27, pytz
28, pyyaml
29, querystring_parser
30, requests
31, scikit-learn
32, scipy
33, shap
34, simplejson
35, sqlalchemy
36, sqlparse
37}:
38
39buildPythonPackage rec {
40 pname = "mlflow";
41 version = "2.4.1";
42 format = "setuptools";
43
44 disabled = pythonOlder "3.7";
45
46 src = fetchPypi {
47 inherit pname version;
48 hash = "sha256-ZZj3j37OWalIBXOvV7CXCKMoPs6I8Zbl0XLCBAzsMj8=";
49 };
50
51 # Remove currently broken dependency `shap`, a model explainability package.
52 # This seems quite unprincipled especially with tests not being enabled,
53 # but not mlflow has a 'skinny' install option which does not require `shap`.
54 nativeBuildInputs = [ pythonRelaxDepsHook ];
55 pythonRemoveDeps = [ "shap" ];
56 pythonRelaxDeps = [ "pytz" "pyarrow" ];
57
58 propagatedBuildInputs = [
59 alembic
60 click
61 cloudpickle
62 databricks-cli
63 docker
64 entrypoints
65 flask
66 gitpython
67 gorilla
68 gunicorn
69 importlib-metadata
70 markdown
71 matplotlib
72 numpy
73 packaging
74 pandas
75 prometheus-flask-exporter
76 protobuf
77 python-dateutil
78 pyarrow
79 pytz
80 pyyaml
81 querystring_parser
82 requests
83 scikit-learn
84 scipy
85 #shap
86 simplejson
87 sqlalchemy
88 sqlparse
89 ];
90
91 pythonImportsCheck = [
92 "mlflow"
93 ];
94
95 # no tests in PyPI dist
96 # run into https://stackoverflow.com/questions/51203641/attributeerror-module-alembic-context-has-no-attribute-config
97 # also, tests use conda so can't run on NixOS without buildFHSEnv
98 doCheck = false;
99
100 meta = with lib; {
101 description = "Open source platform for the machine learning lifecycle";
102 homepage = "https://github.com/mlflow/mlflow";
103 changelog = "https://github.com/mlflow/mlflow/blob/v${version}/CHANGELOG.md";
104 license = licenses.asl20;
105 maintainers = with maintainers; [ tbenst ];
106 };
107}