at 23.11-beta 2.2 kB view raw
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.7.0"; 42 format = "setuptools"; 43 44 disabled = pythonOlder "3.7"; 45 46 src = fetchPypi { 47 inherit pname version; 48 hash = "sha256-3q8PXydgjpUm1p//zKcMgirJDqKQpvPkuz36GyCbARE="; 49 }; 50 51 postPatch = '' 52 substituteInPlace requirements/core-requirements.txt \ 53 --replace "gunicorn<21" "gunicorn" 54 ''; 55 56 # Remove currently broken dependency `shap`, a model explainability package. 57 # This seems quite unprincipled especially with tests not being enabled, 58 # but not mlflow has a 'skinny' install option which does not require `shap`. 59 nativeBuildInputs = [ pythonRelaxDepsHook ]; 60 pythonRemoveDeps = [ "shap" ]; 61 pythonRelaxDeps = [ "pytz" "pyarrow" ]; 62 63 propagatedBuildInputs = [ 64 alembic 65 click 66 cloudpickle 67 databricks-cli 68 docker 69 entrypoints 70 flask 71 gitpython 72 gorilla 73 gunicorn 74 importlib-metadata 75 markdown 76 matplotlib 77 numpy 78 packaging 79 pandas 80 prometheus-flask-exporter 81 protobuf 82 python-dateutil 83 pyarrow 84 pytz 85 pyyaml 86 querystring_parser 87 requests 88 scikit-learn 89 scipy 90 #shap 91 simplejson 92 sqlalchemy 93 sqlparse 94 ]; 95 96 pythonImportsCheck = [ 97 "mlflow" 98 ]; 99 100 # no tests in PyPI dist 101 # run into https://stackoverflow.com/questions/51203641/attributeerror-module-alembic-context-has-no-attribute-config 102 # also, tests use conda so can't run on NixOS without buildFHSEnv 103 doCheck = false; 104 105 meta = with lib; { 106 description = "Open source platform for the machine learning lifecycle"; 107 homepage = "https://github.com/mlflow/mlflow"; 108 changelog = "https://github.com/mlflow/mlflow/blob/v${version}/CHANGELOG.md"; 109 license = licenses.asl20; 110 maintainers = with maintainers; [ tbenst ]; 111 }; 112}