summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 13:02:31 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 13:02:31 +0000
commitabae2ecaf917fcda8c9049671d67b9d138ca2aa3 (patch)
tree47df49007a59dfb804e2c8c9c0c409ff4fb8ce0b
parent880f0d4b4845e1c4412d99a1b58b2879861cd9db (diff)
automatic import of python-bert-for-tf2
-rw-r--r--.gitignore1
-rw-r--r--python-bert-for-tf2.spec108
-rw-r--r--sources1
3 files changed, 110 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..eb90280 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bert-for-tf2-0.14.9.tar.gz
diff --git a/python-bert-for-tf2.spec b/python-bert-for-tf2.spec
new file mode 100644
index 0000000..0c826ef
--- /dev/null
+++ b/python-bert-for-tf2.spec
@@ -0,0 +1,108 @@
+%global _empty_manifest_terminate_build 0
+Name: python-bert-for-tf2
+Version: 0.14.9
+Release: 1
+Summary: A TensorFlow 2.0 Keras implementation of BERT.
+License: MIT
+URL: https://github.com/kpe/bert-for-tf2/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a5/a1/acb891630749c56901e770a34d6bac8a509a367dd74a05daf7306952e910/bert-for-tf2-0.14.9.tar.gz
+BuildArch: noarch
+
+
+%description
+|Build Status| |Coverage Status| |Version Status| |Python Versions| |Downloads|
+This repo contains a `TensorFlow 2.0`_ `Keras`_ implementation of `google-research/bert`_
+with support for loading of the original `pre-trained weights`_,
+and producing activations **numerically identical** to the one calculated by the original model.
+`ALBERT`_ and `adapter-BERT`_ are also supported by setting the corresponding
+configuration parameters (``shared_layer=True``, ``embedding_size`` for `ALBERT`_
+and ``adapter_size`` for `adapter-BERT`_). Setting both will result in an adapter-ALBERT
+by sharing the BERT parameters across all layers while adapting every layer with layer specific adapter.
+The implementation is build from scratch using only basic tensorflow operations,
+following the code in `google-research/bert/modeling.py`_
+(but skipping dead code and applying some simplifications). It also utilizes `kpe/params-flow`_ to reduce
+common Keras boilerplate code (related to passing model and layer configuration arguments).
+`bert-for-tf2`_ should work with both `TensorFlow 2.0`_ and `TensorFlow 1.14`_ or newer.
+
+%package -n python3-bert-for-tf2
+Summary: A TensorFlow 2.0 Keras implementation of BERT.
+Provides: python-bert-for-tf2
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-bert-for-tf2
+|Build Status| |Coverage Status| |Version Status| |Python Versions| |Downloads|
+This repo contains a `TensorFlow 2.0`_ `Keras`_ implementation of `google-research/bert`_
+with support for loading of the original `pre-trained weights`_,
+and producing activations **numerically identical** to the one calculated by the original model.
+`ALBERT`_ and `adapter-BERT`_ are also supported by setting the corresponding
+configuration parameters (``shared_layer=True``, ``embedding_size`` for `ALBERT`_
+and ``adapter_size`` for `adapter-BERT`_). Setting both will result in an adapter-ALBERT
+by sharing the BERT parameters across all layers while adapting every layer with layer specific adapter.
+The implementation is build from scratch using only basic tensorflow operations,
+following the code in `google-research/bert/modeling.py`_
+(but skipping dead code and applying some simplifications). It also utilizes `kpe/params-flow`_ to reduce
+common Keras boilerplate code (related to passing model and layer configuration arguments).
+`bert-for-tf2`_ should work with both `TensorFlow 2.0`_ and `TensorFlow 1.14`_ or newer.
+
+%package help
+Summary: Development documents and examples for bert-for-tf2
+Provides: python3-bert-for-tf2-doc
+%description help
+|Build Status| |Coverage Status| |Version Status| |Python Versions| |Downloads|
+This repo contains a `TensorFlow 2.0`_ `Keras`_ implementation of `google-research/bert`_
+with support for loading of the original `pre-trained weights`_,
+and producing activations **numerically identical** to the one calculated by the original model.
+`ALBERT`_ and `adapter-BERT`_ are also supported by setting the corresponding
+configuration parameters (``shared_layer=True``, ``embedding_size`` for `ALBERT`_
+and ``adapter_size`` for `adapter-BERT`_). Setting both will result in an adapter-ALBERT
+by sharing the BERT parameters across all layers while adapting every layer with layer specific adapter.
+The implementation is build from scratch using only basic tensorflow operations,
+following the code in `google-research/bert/modeling.py`_
+(but skipping dead code and applying some simplifications). It also utilizes `kpe/params-flow`_ to reduce
+common Keras boilerplate code (related to passing model and layer configuration arguments).
+`bert-for-tf2`_ should work with both `TensorFlow 2.0`_ and `TensorFlow 1.14`_ or newer.
+
+%prep
+%autosetup -n bert-for-tf2-0.14.9
+
+%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-bert-for-tf2 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.14.9-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..0c2711f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+9a1c8d78b128caf434a2ba90105a9e8c bert-for-tf2-0.14.9.tar.gz