1{
2 lib,
3 fetchFromGitHub,
4
5 # build-system
6 setuptools,
7
8 # dependencies
9 alembic,
10 buildPythonPackage,
11 cachetools,
12 click,
13 cloudpickle,
14 databricks-sdk,
15 docker,
16 flask,
17 gitpython,
18 graphene,
19 gunicorn,
20 importlib-metadata,
21 jinja2,
22 markdown,
23 matplotlib,
24 numpy,
25 opentelemetry-api,
26 opentelemetry-sdk,
27 packaging,
28 pandas,
29 protobuf,
30 pyarrow,
31 pyyaml,
32 requests,
33 scikit-learn,
34 scipy,
35 sqlalchemy,
36 sqlparse,
37
38 # tests
39 aiohttp,
40 azure-core,
41 azure-storage-blob,
42 azure-storage-file,
43 boto3,
44 botocore,
45 catboost,
46 datasets,
47 fastapi,
48 google-cloud-storage,
49 httpx,
50 jwt,
51 keras,
52 langchain,
53 librosa,
54 moto,
55 opentelemetry-exporter-otlp,
56 optuna,
57 pydantic,
58 pyspark,
59 pytestCheckHook,
60 pytorch-lightning,
61 sentence-transformers,
62 shap,
63 starlette,
64 statsmodels,
65 tensorflow,
66 torch,
67 transformers,
68 uvicorn,
69 xgboost,
70}:
71
72buildPythonPackage rec {
73 pname = "mlflow";
74 version = "2.20.3";
75 pyproject = true;
76
77 src = fetchFromGitHub {
78 owner = "mlflow";
79 repo = "mlflow";
80 tag = "v${version}";
81 hash = "sha256-kgohENAx5PpLQ9pBfl/zSq65l/DqJfufBf0gWR1WJHY=";
82 };
83
84 pythonRelaxDeps = [
85 "gunicorn"
86 "importlib-metadata"
87 "packaging"
88 "protobuf"
89 "pytz"
90 "pyarrow"
91 ];
92
93 build-system = [ setuptools ];
94
95 dependencies = [
96 alembic
97 cachetools
98 click
99 cloudpickle
100 databricks-sdk
101 docker
102 flask
103 gitpython
104 graphene
105 gunicorn
106 importlib-metadata
107 jinja2
108 markdown
109 matplotlib
110 numpy
111 opentelemetry-api
112 opentelemetry-sdk
113 packaging
114 pandas
115 protobuf
116 pyarrow
117 pydantic
118 pyyaml
119 requests
120 scikit-learn
121 scipy
122 shap
123 sqlalchemy
124 sqlparse
125 ];
126
127 pythonImportsCheck = [ "mlflow" ];
128
129 nativeCheckInputs = [
130 aiohttp
131 azure-core
132 azure-storage-blob
133 azure-storage-file
134 boto3
135 botocore
136 catboost
137 datasets
138 fastapi
139 google-cloud-storage
140 httpx
141 jwt
142 keras
143 langchain
144 librosa
145 moto
146 opentelemetry-exporter-otlp
147 optuna
148 pydantic
149 pyspark
150 pytestCheckHook
151 pytorch-lightning
152 sentence-transformers
153 starlette
154 statsmodels
155 tensorflow
156 torch
157 transformers
158 uvicorn
159 xgboost
160 ];
161
162 disabledTestPaths = [
163 # Requires unpackaged `autogen`
164 "tests/autogen/test_autogen_autolog.py"
165
166 # Requires unpackaged `diviner`
167 "tests/diviner/test_diviner_model_export.py"
168
169 # Requires unpackaged `sktime`
170 "examples/sktime/test_sktime_model_export.py"
171
172 # Requires `fastai` which would cause a circular dependency
173 "tests/fastai/test_fastai_autolog.py"
174 "tests/fastai/test_fastai_model_export.py"
175
176 # Requires `spacy` which would cause a circular dependency
177 "tests/spacy/test_spacy_model_export.py"
178
179 # Requires `tensorflow.keras` which is not included in our outdated version of `tensorflow` (2.13.0)
180 "tests/gateway/providers/test_ai21labs.py"
181 "tests/tensorflow/test_keras_model_export.py"
182 "tests/tensorflow/test_keras_pyfunc_model_works_with_all_input_types.py"
183 "tests/tensorflow/test_mlflow_callback.py"
184 ];
185
186 # I (@GaetanLepage) gave up at enabling tests:
187 # - They require a lot of dependencies (some unpackaged);
188 # - Many errors occur at collection time;
189 # - Most (all ?) tests require internet access anyway.
190 doCheck = false;
191
192 meta = {
193 description = "Open source platform for the machine learning lifecycle";
194 mainProgram = "mlflow";
195 homepage = "https://github.com/mlflow/mlflow";
196 changelog = "https://github.com/mlflow/mlflow/blob/${src.tag}/CHANGELOG.md";
197 license = lib.licenses.asl20;
198 maintainers = with lib.maintainers; [ tbenst ];
199 };
200}