1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools-scm,
8
9 # dependencies
10 dvc,
11 dvc-render,
12 dvc-studio-client,
13 funcy,
14 gto,
15 psutil,
16 pynvml,
17 ruamel-yaml,
18 scmrepo,
19
20 # optional-dependencies
21 # all
22 jsonargparse,
23 lightgbm,
24 lightning,
25 matplotlib,
26 mmcv,
27 numpy,
28 optuna,
29 pandas,
30 pillow,
31 scikit-learn,
32 tensorflow,
33 torch,
34 transformers,
35 xgboost,
36 # huggingface
37 datasets,
38 # fastai
39 fastai,
40}:
41
42buildPythonPackage rec {
43 pname = "dvclive";
44 version = "3.48.5";
45 pyproject = true;
46
47 src = fetchFromGitHub {
48 owner = "iterative";
49 repo = "dvclive";
50 tag = version;
51 hash = "sha256-ucMtYHDwdpyYnnC7QCn5T6gCS8SarohKh6lxFXtPXgc=";
52 };
53
54 build-system = [ setuptools-scm ];
55
56 dependencies = [
57 dvc
58 dvc-render
59 dvc-studio-client
60 funcy
61 gto
62 psutil
63 pynvml
64 ruamel-yaml
65 scmrepo
66 ];
67
68 optional-dependencies = {
69 all = [
70 jsonargparse
71 lightgbm
72 lightning
73 matplotlib
74 mmcv
75 numpy
76 optuna
77 pandas
78 pillow
79 scikit-learn
80 tensorflow
81 torch
82 transformers
83 xgboost
84 ]
85 ++ jsonargparse.optional-dependencies.signatures;
86 image = [
87 numpy
88 pillow
89 ];
90 sklearn = [ scikit-learn ];
91 plots = [
92 pandas
93 scikit-learn
94 numpy
95 ];
96 markdown = [ matplotlib ];
97 mmcv = [ mmcv ];
98 tf = [ tensorflow ];
99 xgb = [ xgboost ];
100 lgbm = [ lightgbm ];
101 huggingface = [
102 datasets
103 transformers
104 ];
105 # catalyst = [
106 # catalyst
107 # ];
108 fastai = [ fastai ];
109 lightning = [
110 lightning
111 torch
112 jsonargparse
113 ]
114 ++ jsonargparse.optional-dependencies.signatures;
115 optuna = [ optuna ];
116 };
117
118 # Circular dependency with dvc
119 doCheck = false;
120
121 pythonImportsCheck = [ "dvclive" ];
122
123 meta = {
124 description = "Library for logging machine learning metrics and other metadata in simple file formats";
125 homepage = "https://github.com/iterative/dvclive";
126 changelog = "https://github.com/iterative/dvclive/releases/tag/${src.tag}";
127 license = lib.licenses.asl20;
128 maintainers = with lib.maintainers; [ fab ];
129 };
130}