summaryrefslogtreecommitdiff
path: root/python-shparkley.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 11:33:27 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 11:33:27 +0000
commitfd8163c2671982dd4b0cb17168c9c798b0dc4745 (patch)
treeb12996b4f9cabc69cfcf136a4aabe17137057c0f /python-shparkley.spec
parent96094896f4237a043cfb8a03b65f354e2bb9cd6b (diff)
automatic import of python-shparkley
Diffstat (limited to 'python-shparkley.spec')
-rw-r--r--python-shparkley.spec88
1 files changed, 88 insertions, 0 deletions
diff --git a/python-shparkley.spec b/python-shparkley.spec
new file mode 100644
index 0000000..99a0a88
--- /dev/null
+++ b/python-shparkley.spec
@@ -0,0 +1,88 @@
+%global _empty_manifest_terminate_build 0
+Name: python-shparkley
+Version: 1.0.1
+Release: 1
+Summary: Scaling Shapley Value computation using Spark
+License: BSD License
+URL: https://github.com/Affirm/shparkley
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/45/d3/cc2bdceda131aee61f15e9e734d4ed99c1132e9cb5e9f9f70913174d98f1/shparkley-1.0.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-future
+Requires: python3-mock
+Requires: python3-numpy
+Requires: python3-pyspark
+
+%description
+Shparkley is a PySpark implementation of
+`Shapley values <https://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf>`_
+which uses a `monte-carlo approximation <https://link.springer.com/article/10.1007/s10115-013-0679-x>`_ algorithm.
+Given a dataset and machine learning model, Shparkley can compute Shapley values for all features for a feature vector.
+Shparkley also handles training weights and is model-agnostic.
+
+%package -n python3-shparkley
+Summary: Scaling Shapley Value computation using Spark
+Provides: python-shparkley
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-shparkley
+Shparkley is a PySpark implementation of
+`Shapley values <https://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf>`_
+which uses a `monte-carlo approximation <https://link.springer.com/article/10.1007/s10115-013-0679-x>`_ algorithm.
+Given a dataset and machine learning model, Shparkley can compute Shapley values for all features for a feature vector.
+Shparkley also handles training weights and is model-agnostic.
+
+%package help
+Summary: Development documents and examples for shparkley
+Provides: python3-shparkley-doc
+%description help
+Shparkley is a PySpark implementation of
+`Shapley values <https://papers.nips.cc/paper/7062-a-unified-approach-to-interpreting-model-predictions.pdf>`_
+which uses a `monte-carlo approximation <https://link.springer.com/article/10.1007/s10115-013-0679-x>`_ algorithm.
+Given a dataset and machine learning model, Shparkley can compute Shapley values for all features for a feature vector.
+Shparkley also handles training weights and is model-agnostic.
+
+%prep
+%autosetup -n shparkley-1.0.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-shparkley -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1
+- Package Spec generated