mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.open-clip-torch: cleanup, add missing dependency
This commit is contained in:
parent
1cbee13c85
commit
77bb52ed7d
1 changed files with 16 additions and 12 deletions
|
|
@ -18,14 +18,15 @@
|
|||
torchvision,
|
||||
tqdm,
|
||||
|
||||
# checks
|
||||
pytestCheckHook,
|
||||
# tests
|
||||
braceexpand,
|
||||
pandas,
|
||||
pytestCheckHook,
|
||||
requests,
|
||||
transformers,
|
||||
webdataset,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "open-clip-torch";
|
||||
version = "3.3.0";
|
||||
pyproject = true;
|
||||
|
|
@ -33,7 +34,7 @@ buildPythonPackage rec {
|
|||
src = fetchFromGitHub {
|
||||
owner = "mlfoundations";
|
||||
repo = "open_clip";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-rJT0LCIS0uChBUdZ6WTQv0npZ0Ae8veIXMgr6JTgUj4=";
|
||||
};
|
||||
|
||||
|
|
@ -53,20 +54,23 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
braceexpand
|
||||
pandas
|
||||
pytestCheckHook
|
||||
requests
|
||||
transformers
|
||||
webdataset
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "open_clip" ];
|
||||
|
||||
# -> On Darwin:
|
||||
# AttributeError: Can't pickle local object 'build_params.<locals>.<lambda>'
|
||||
# -> On Linux:
|
||||
# KeyError: Caught KeyError in DataLoader worker process 0
|
||||
disabledTestPaths = [ "tests/test_wds.py" ];
|
||||
disabledTestPaths = [
|
||||
# -> On Darwin:
|
||||
# AttributeError: Can't pickle local object 'build_params.<locals>.<lambda>'
|
||||
# -> On Linux:
|
||||
# KeyError: Caught KeyError in DataLoader worker process 0
|
||||
"tests/test_wds.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# requires network
|
||||
|
|
@ -86,9 +90,9 @@ buildPythonPackage rec {
|
|||
meta = {
|
||||
description = "Open source implementation of CLIP";
|
||||
homepage = "https://github.com/mlfoundations/open_clip";
|
||||
changelog = "https://github.com/mlfoundations/open_clip/releases/tag/${src.tag}";
|
||||
changelog = "https://github.com/mlfoundations/open_clip/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ iynaix ];
|
||||
mainProgram = "open-clip";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue