From nobody Sat Jan 07 03:21:16 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nplq10M9Pz2pJ28; Sat, 7 Jan 2023 03:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nplq06xdRz4PPj; Sat, 7 Jan 2023 03:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673061677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tE19uZOBeIfMoC/mF5tmt7HgK4CelH+f+SWZ9y4iwHM=; b=t9EMTMwscU3ALczdfTe66tdI53l15FoGlVj43u+E3PqPFdGSM5r2CpswYpYEs9SerSHT8d 3mWmPs8e/KHxAdioU+JQ+y0tUFSD6F5Up3n2O0tDBDShP+BhAj1wlozlAQEd3Twvj49eJz Axb4hfbj5nhwJxX6wNFZs6nRc6trvXqBVtd7NI+WpLoMIorKKdCD3Q/EvdoiV7mZ79SjeI +KgeafJ9xOInv9/Q6vyBXEnMe1hDn3K/rALZGS3nz657AwOu6msIUqVVsNsGexVTwc8PmE bo8EaLg8WT+ONfZxD4Spii8KbDr3nI6qQGBckqQ0kqBtRt9DcKVLUgWhy4aLYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673061677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tE19uZOBeIfMoC/mF5tmt7HgK4CelH+f+SWZ9y4iwHM=; b=iD6DwlOlzuIBDcxHnlf9MG9drqfN+xYr3dweqyaEjpJjyGtSI8iN0X/h3JbApGmrvyY2Jv 6B0ylvqwG3SYEnGTTV/ME43xP7xtRu94/wYZ4oB2BQgn0t9ngYKWMAzGziqbKQRJbYMPKJ /hyeEgZscDFHtL6Z3PYQp7I2LdudxIcMii/89t0l4NPqhjLN5EMuUPW4C3zX86vKUR56yO nS1P2E3yWDqgZvLwBKABCwF5LfCJ3ZWNZx6AlTP7ZsBDtwQXpHyx+YERgLDgR8xUupABmk z5TL1jLMR3oVtFMye8XAzmv6/2qNP2X/49ECBhWyb6L+eKe2cLYmaaRi9ekv9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673061677; a=rsa-sha256; cv=none; b=Kgp0IzN5wxOwL1Smt6QefU2HzNKaWCjbD94q0518nr7KG4LMfINCbstzLAJvnQ7zKuhgta U0TaXp7DRkd9wAxiRAc7zBz0W1NHtKoZ6PsgAM6upbtEPUBXlDkamCC4xv4opV5MfWYsIx Or7g0dwvcrhcYzh0OrH6FgolLUmNKX1P/wg6yk1mDxJI7tNZ+Q+1PaZH0Zmmahoe0uEA0k 8S0R9WKFUdjkuLoKQAcfIyODO/ir/rlzpmQ7YI+MS6wLi32F+qiv7iRjfBSw5rvLKcLPiM YZTWfYk+TBGtwzDwCbfw7ZWctYEXmH4mo0BjhuKNTkBiHdutfqvLR5lBHL5BIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nplq061FgzvDn; Sat, 7 Jan 2023 03:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3073LGPu009209; Sat, 7 Jan 2023 03:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3073LGUY009208; Sat, 7 Jan 2023 03:21:16 GMT (envelope-from git) Date: Sat, 7 Jan 2023 03:21:16 GMT Message-Id: <202301070321.3073LGUY009208@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: cf1652cc280a - main - misc/py-shap2: New port: Unified approach to explain the output of any machine learning model List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf1652cc280a759e00f3a05ed2513f91814ee8e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=cf1652cc280a759e00f3a05ed2513f91814ee8e6 commit cf1652cc280a759e00f3a05ed2513f91814ee8e6 Author: Yuri Victorovich AuthorDate: 2023-01-07 03:13:04 +0000 Commit: Yuri Victorovich CommitDate: 2023-01-07 03:21:14 +0000 misc/py-shap2: New port: Unified approach to explain the output of any machine learning model --- misc/Makefile | 1 + misc/py-shap2/Makefile | 30 +++++++++++++++++++++++ misc/py-shap2/distinfo | 3 +++ misc/py-shap2/files/patch-shap2_cext_tree__shap.h | 11 +++++++++ misc/py-shap2/pkg-descr | 4 +++ 5 files changed, 49 insertions(+) diff --git a/misc/Makefile b/misc/Makefile index c78e5c76e165..a04c708946be 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -437,6 +437,7 @@ SUBDIR += py-qiskit-machine-learning SUBDIR += py-scikit-fusion SUBDIR += py-serverfiles + SUBDIR += py-shap2 SUBDIR += py-soapy_power SUBDIR += py-spdx SUBDIR += py-spdx-lookup diff --git a/misc/py-shap2/Makefile b/misc/py-shap2/Makefile new file mode 100644 index 000000000000..4ff449e64f1d --- /dev/null +++ b/misc/py-shap2/Makefile @@ -0,0 +1,30 @@ +PORTNAME= shap2 +DISTVERSION= 0.42.0 +CATEGORIES= misc # machine-learning +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Unified approach to explain the output of any machine learning model +WWW= https://github.com/slundberg/shap + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}numba>0:devel/py-numba@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scikit-learn>0:science/py-scikit-learn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xgboost>0:misc/py-xgboost@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} + +USES= python:3.6+ +USE_PYTHON= distutils autoplist + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/shap2/_cext${PYTHON_EXT_SUFFIX}.so + +.include diff --git a/misc/py-shap2/distinfo b/misc/py-shap2/distinfo new file mode 100644 index 000000000000..6538f5c29e3a --- /dev/null +++ b/misc/py-shap2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1673059649 +SHA256 (shap2-0.42.0.tar.gz) = a425c963131ea3e1f6c217e524821f9c2ae4d2e97d8ad5fd33f80fd175df5960 +SIZE (shap2-0.42.0.tar.gz) = 377323 diff --git a/misc/py-shap2/files/patch-shap2_cext_tree__shap.h b/misc/py-shap2/files/patch-shap2_cext_tree__shap.h new file mode 100644 index 000000000000..d26268939600 --- /dev/null +++ b/misc/py-shap2/files/patch-shap2_cext_tree__shap.h @@ -0,0 +1,11 @@ +--- shap2/cext/tree_shap.h.orig 2023-01-07 02:47:51 UTC ++++ shap2/cext/tree_shap.h +@@ -13,7 +13,7 @@ + #include + #if defined(_WIN32) || defined(WIN32) + #include +-#elif defined(__MVS__) ++#elif defined(__MVS__) || defined(__FreeBSD__) + #include + #else + #include diff --git a/misc/py-shap2/pkg-descr b/misc/py-shap2/pkg-descr new file mode 100644 index 000000000000..0fb040562a62 --- /dev/null +++ b/misc/py-shap2/pkg-descr @@ -0,0 +1,4 @@ +SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain +the output of any machine learning model. It connects optimal credit +allocation with local explanations using the classic Shapley values from game +theory and their related extensions.