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