From 01a77de3d2e266abeab83a3ca6da66ca91e5de1b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 24 Dec 2024 18:12:35 +0000 Subject: [PATCH 1/3] python312Packages.clarifai-grpc: 10.9.10 -> 10.11.2 --- pkgs/development/python-modules/clarifai-grpc/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/clarifai-grpc/default.nix b/pkgs/development/python-modules/clarifai-grpc/default.nix index 39c789f822be..b17a46cc3edc 100644 --- a/pkgs/development/python-modules/clarifai-grpc/default.nix +++ b/pkgs/development/python-modules/clarifai-grpc/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "clarifai-grpc"; - version = "10.9.10"; + version = "10.11.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,8 +20,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "Clarifai"; repo = "clarifai-python-grpc"; - rev = "refs/tags/${version}"; - hash = "sha256-XJqbZicRQCiykdXn2R8tOzWPbtrso9IwZYpcTcY7vio="; + tag = version; + hash = "sha256-Px7VisC2j5pJctzB713cdalEccGbBsSuQBqDarwUTLA="; }; build-system = [ setuptools ]; From d5877666050b027e674465df42557fbdca252af4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 30 Dec 2024 11:15:59 +0900 Subject: [PATCH 2/3] python312Packages.clarifai-protocol: init at 0.0.14 --- .../clarifai-protocol/default.nix | 80 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 82 insertions(+) create mode 100644 pkgs/development/python-modules/clarifai-protocol/default.nix diff --git a/pkgs/development/python-modules/clarifai-protocol/default.nix b/pkgs/development/python-modules/clarifai-protocol/default.nix new file mode 100644 index 000000000000..16efdbca2878 --- /dev/null +++ b/pkgs/development/python-modules/clarifai-protocol/default.nix @@ -0,0 +1,80 @@ +{ + lib, + stdenv, + buildPythonPackage, + fetchPypi, + python, + pypaInstallHook, + wheelUnpackHook, + grpcio, +}: + +let + pythonVersionNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; + systemToPlatform = { + "aarch64-linux" = "manylinux_2_17_aarch64.manylinux2014_aarch64"; + "x86_64-linux" = "manylinux_2_17_x86_64.manylinux2014_x86_64"; + "aarch64-darwin" = "macosx_11_0_universal2"; + "x86_64-darwin" = "macosx_11_0_universal2"; + }; + + hashes = { + "39-x86_64-linux" = "sha256-uGbsxSHGfYVzRiy1YEkQMkJi2yPLdSj3fe3adp1WjP0="; + "310-x86_64-linux" = "sha256-1SO/1lpB3aRWisxFlt8K5lwFEOiDXjC4iQRai77L+8E="; + "311-x86_64-linux" = "sha256-99VdM1fAcuiblReWL5I8+H0psCKR00HYZr/wRGT7nd8="; + "312-x86_64-linux" = "sha256-bbggF4rGDrXOpSegreFHgK0H/z7xaR9hb7z6SYp7nlU="; + "313-x86_64-linux" = "sha256-M9/t7JgIjh7yiZeEq9K2tGQ4oLneVhXf0rUfL8p09Tg="; + "39-aarch64-linux" = "sha256-wuEncCbqWdqO72zovzHrmb34on73eaQgFBmQZdUnwkE="; + "310-aarch64-linux" = "sha256-uLHEEPcVakctNT428pNlaq0yKDpvMLynDP2lDobiebA="; + "311-aarch64-linux" = "sha256-d2A4mKP4Dlnm6J31wPyAHg8d5MjFF4wcREe5FVFeayU="; + "312-aarch64-linux" = "sha256-aW295fQogAjaVK6saHhduKsVsncIv4BsfRW6qHlyb3g="; + "313-aarch64-linux" = "sha256-mloW8TGkBJWXqO6xOqHhra3ZXuGQWf6dEGSrkdD0sb0="; + "39-darwin" = "sha256-uU9RGo5glYOPp8nEYqj4c1TB3Xa1KwrNWMqNDpJsSjY="; + "310-darwin" = "sha256-80U0geHKJLVhhmvHayXWHWaV9ifJjWtR9mbwCUDfPu0="; + "311-darwin" = "sha256-kM2YVzPa22QgIRV4zP4kcvTE8al/RW0Oo6lyxJl3JxU="; + "312-darwin" = "sha256-t4qbP5wqE8cgkvN+vG6zOeS+s5+U/GjmbeeHytIo9/o="; + "313-darwin" = "sha256-ds2kj87miODVUE8Lrjuzz8L+2HxaQ7jTxGQF0/Odrpg="; + }; +in +buildPythonPackage rec { + pname = "clarifai-protocol"; + version = "0.0.14"; + pyproject = false; + + src = fetchPypi { + pname = "clarifai_protocol"; + inherit version; + format = "wheel"; + python = "cp${pythonVersionNoDot}"; + abi = "cp${pythonVersionNoDot}"; + dist = "cp${pythonVersionNoDot}"; + platform = systemToPlatform.${stdenv.hostPlatform.system} or (throw "unsupported system"); + hash = + if stdenv.hostPlatform.isDarwin then + hashes."${pythonVersionNoDot}-darwin" + else + hashes."${pythonVersionNoDot}-${stdenv.hostPlatform.system}" + or (throw "unsupported system/python version combination"); + }; + + nativeBuildInputs = [ + pypaInstallHook + wheelUnpackHook + ]; + + dependencies = [ grpcio ]; + + # require clarifai and it causes a circular import + dontUsePythonImportsCheck = true; + + # no tests + doCheck = false; + + meta = { + description = "Clarifai Python Runner Protocol"; + homepage = "https://pypi.org/project/clarifai-protocol"; + license = lib.licenses.asl20; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + maintainers = with lib.maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1a026f7d4d41..5fbc028642f0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2334,6 +2334,8 @@ self: super: with self; { clarifai-grpc = callPackage ../development/python-modules/clarifai-grpc { }; + clarifai-protocol = callPackage ../development/python-modules/clarifai-protocol { }; + claripy = callPackage ../development/python-modules/claripy { }; classify-imports = callPackage ../development/python-modules/classify-imports { }; From f7a9b5959ea089fd5e2d5883c598e555df78902c Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 30 Dec 2024 02:09:36 +0900 Subject: [PATCH 3/3] python312Packages.clarifai: 10.8.6 -> 10.11.1 Diff: https://github.com/Clarifai/clarifai-python/compare/refs/tags/10.8.6...10.11.1 Changelog: https://github.com/Clarifai/clarifai-python/releases/tag/10.11.1 --- .../python-modules/clarifai/default.nix | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/clarifai/default.nix b/pkgs/development/python-modules/clarifai/default.nix index 124e5cd8d987..911a92ea5479 100644 --- a/pkgs/development/python-modules/clarifai/default.nix +++ b/pkgs/development/python-modules/clarifai/default.nix @@ -2,7 +2,10 @@ lib, buildPythonPackage, clarifai-grpc, + clarifai-protocol, + click, fetchFromGitHub, + fsspec, inquirerpy, numpy, pillow, @@ -20,7 +23,7 @@ buildPythonPackage rec { pname = "clarifai"; - version = "10.8.6"; + version = "10.11.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -28,12 +31,12 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "Clarifai"; repo = "clarifai-python"; - rev = "refs/tags/${version}"; - hash = "sha256-/fHNRFtxyNa9VdEi5wQ+YA+9mFv3ZpRFJQnWkuxQd5I="; + tag = version; + hash = "sha256-dXsEYHkt4Z2YldqbCorNPG7rVSLfU8shYdk6lzFBz/M="; }; pythonRelaxDeps = [ - "clarifai-grpc" + "fsspec" "schema" ]; @@ -41,6 +44,9 @@ buildPythonPackage rec { dependencies = [ clarifai-grpc + clarifai-protocol + click + fsspec inquirerpy numpy pillow @@ -71,16 +77,19 @@ buildPythonPackage rec { disabledTestPaths = [ # Tests require network access and API key + "tests/cli/test_compute_orchestration.py" + "tests/runners/test_anymodel.py" + "tests/runners/test_textmodel.py" + "tests/runners/test_url_fetcher.py" "tests/test_app.py" "tests/test_data_upload.py" "tests/test_eval.py" "tests/test_model_predict.py" "tests/test_model_train.py" + "tests/test_rag.py" "tests/test_search.py" "tests/workflow/test_create_delete.py" "tests/workflow/test_predict.py" - "tests/test_rag.py" - "clarifai/models/model_serving/repo_build/static_files/base_test.py" ]; pythonImportsCheck = [ "clarifai" ];