about summary refs log tree commit diff
path: root/pkgs/development/python-modules/open-clip-torch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/open-clip-torch/default.nix')
-rw-r--r--pkgs/development/python-modules/open-clip-torch/default.nix77
1 files changed, 40 insertions, 37 deletions
diff --git a/pkgs/development/python-modules/open-clip-torch/default.nix b/pkgs/development/python-modules/open-clip-torch/default.nix
index 6de2c610fbf63..7efac863326c2 100644
--- a/pkgs/development/python-modules/open-clip-torch/default.nix
+++ b/pkgs/development/python-modules/open-clip-torch/default.nix
@@ -1,23 +1,24 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, braceexpand
-, ftfy
-, huggingface-hub
-, pandas
-, protobuf
-, pytestCheckHook
-, regex
-, sentencepiece
-, timm
-, torch
-, torchvision
-, tqdm
-, transformers
-, setuptools
-, webdataset
-, wheel
-, fetchFromGitHub
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  braceexpand,
+  ftfy,
+  huggingface-hub,
+  pandas,
+  protobuf,
+  pytestCheckHook,
+  regex,
+  sentencepiece,
+  timm,
+  torch,
+  torchvision,
+  tqdm,
+  transformers,
+  setuptools,
+  webdataset,
+  wheel,
+  fetchFromGitHub,
 }:
 buildPythonPackage rec {
   pname = "open-clip-torch";
@@ -58,26 +59,28 @@ buildPythonPackage rec {
 
   pythonImportsCheck = [ "open_clip" ];
 
-  disabledTestPaths = lib.optionals (stdenv.isAarch64 || stdenv.isDarwin) [
-    "tests/test_wds.py"
-  ];
+  disabledTestPaths = lib.optionals (stdenv.isAarch64 || stdenv.isDarwin) [ "tests/test_wds.py" ];
 
-  disabledTests = [
-    # requires network
-    "test_download_pretrained_from_hfh"
-    "test_inference_simple"
-    "test_inference_with_data"
-    "test_pretrained_text_encoder"
-    "test_training_mt5"
-  ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [
-    "test_training"
-    "test_training_coca"
-    "test_training_unfreezing_vit"
-    "test_training_clip_with_jit"
-  ];
+  disabledTests =
+    [
+      # requires network
+      "test_download_pretrained_from_hfh"
+      "test_inference_simple"
+      "test_inference_with_data"
+      "test_pretrained_text_encoder"
+      "test_training_mt5"
+      # fails due to type errors
+      "test_num_shards"
+    ]
+    ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [
+      "test_training"
+      "test_training_coca"
+      "test_training_unfreezing_vit"
+      "test_training_clip_with_jit"
+    ];
 
   meta = with lib; {
-    description = "An open source implementation of CLIP";
+    description = "Open source implementation of CLIP";
     homepage = "https://github.com/mlfoundations/open_clip";
     license = licenses.asl20;
     maintainers = with maintainers; [ iynaix ];