1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 tensorboard,
7 scipy,
8 tqdm,
9 scikit-learn,
10 munkres,
11 networkx,
12 torch,
13 pandas,
14 # test dependencies
15 pytestCheckHook,
16 spacy,
17 pyspark,
18 dill,
19 dask,
20 spacy-models,
21}:
22let
23 pname = "snorkel";
24 version = "0.10.0";
25in
26buildPythonPackage {
27 inherit pname version;
28 format = "setuptools";
29
30 disabled = pythonOlder "3.8";
31
32 src = fetchFromGitHub {
33 owner = "snorkel-team";
34 repo = "snorkel";
35 tag = "v${version}";
36 hash = "sha256-1DgkMHYToiI3266yCND1bXiui80x8AaBttxM83kJImw=";
37 };
38
39 propagatedBuildInputs = [
40 tensorboard
41 scipy
42 tqdm
43 scikit-learn
44 munkres
45 networkx
46 torch
47 pandas
48 ];
49
50 # test fail because of some wrong path references
51 # things like No such file or directory: '/nix/store/8r9x7xv9nfwmd36ca28a39xaharcjdzj-python3.10-pyspark-3.4.0/lib/python3.10/site-packages/pyspark/./bin/spark-submit'
52 doCheck = false;
53
54 nativeCheckInputs = [
55 pytestCheckHook
56 spacy
57 pyspark
58 dill
59 dask
60 spacy-models.en_core_web_sm
61 ]
62 ++ dask.optional-dependencies.distributed;
63
64 meta = with lib; {
65 description = "System for quickly generating training data with weak supervision";
66 homepage = "https://github.com/snorkel-team/snorkel";
67 changelog = "https://github.com/snorkel/snorkel/releases/tag/v${version}";
68 license = licenses.asl20;
69 maintainers = with maintainers; [ happysalada ];
70 };
71}