1{
2 absl-py,
3 buildPythonPackage,
4 contextlib2,
5 fetchFromGitHub,
6 lib,
7 pyyaml,
8 six,
9 flit-core,
10 pytestCheckHook,
11 pytest-xdist,
12}:
13
14buildPythonPackage rec {
15 pname = "ml-collections";
16 version = "1.1.0";
17 pyproject = true;
18 build-system = [ flit-core ];
19
20 src = fetchFromGitHub {
21 owner = "google";
22 repo = "ml_collections";
23 tag = "v${version}";
24 hash = "sha256-G9+UBqHalzI3quR8T5NEgJs+ep60ffFw9vyTTZDeZ9M=";
25 };
26
27 dependencies = [
28 six
29 absl-py
30 contextlib2
31 pyyaml
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pytest-xdist
37 ];
38
39 enabledTestPaths = [
40 "ml_collections/"
41 ];
42
43 disabledTestPaths = [
44 "ml_collections/config_dict/examples/examples_test.py" # From github workflows
45 ];
46
47 pythonImportsCheck = [ "ml_collections" ];
48
49 meta = {
50 description = "ML Collections is a library of Python collections designed for ML usecases";
51 homepage = "https://github.com/google/ml_collections";
52 license = lib.licenses.asl20;
53 maintainers = with lib.maintainers; [ samuela ];
54 };
55}