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