Skip to content

Commit 6c99c87

Browse files
arjungtensorflow-copybara
authored andcommitted
Update the description for the NSL pip package.
The current description is a copy of the README.md file. This contains relative links to markdown files which don't work on the py-pip website. Further, there is a lot of information which really doesn't belong here. PiperOrigin-RevId: 267624409
1 parent 853a768 commit 6c99c87

File tree

1 file changed

+42
-7
lines changed

1 file changed

+42
-7
lines changed

setup.py

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""Setup for TensorFlow Neural Structured Learning package."""
14+
"""Setup file for the TensorFlow Neural Structured Learning pip package."""
1515

16-
import setuptools
16+
import textwrap
1717

18-
with open("README.md", "r") as fh:
19-
long_description = fh.read()
18+
import setuptools
2019

2120
INSTALL_REQUIRES = [
2221
"absl-py",
@@ -25,13 +24,49 @@
2524
"six",
2625
]
2726

27+
NSL_OVERVIEW = textwrap.dedent("""\
28+
Neural Structured Learning (NSL) is a new learning paradigm to train neural
29+
networks by leveraging structured signals in addition to feature inputs.
30+
Structure can be explicit as represented by a graph or implicit as induced
31+
by adversarial perturbation.
32+
33+
Structured signals are commonly used to represent relations or similarity
34+
among samples that may be labeled or unlabeled. Leveraging these signals
35+
during neural network training harnesses both labeled and unlabeled data,
36+
which can improve model accuracy, particularly when the amount of labeled
37+
data is relatively small. Additionally, models trained with samples that are
38+
generated by adversarial perturbation have been shown to be robust against
39+
malicious attacks, which are designed to mislead a model's prediction or
40+
classification.
41+
42+
NSL generalizes to Neural Graph Learning as well as to Adversarial Learning.
43+
The NSL framework in TensorFlow provides the following easy-to-use APIs and
44+
tools for developers to train models with structured signals:
45+
46+
* Keras APIs to enable training with graphs (explicit structure) and
47+
adversarial pertubations (implicit structure).
48+
49+
* TF ops and functions to enable training with structure when using
50+
lower-level TensorFlow APIs.
51+
52+
* Tools to build graphs and construct graph inputs for training.
53+
54+
The NSL framework is designed to be flexible and can be used to train any
55+
kind of neural network. For example, feed-forward, convolution, and
56+
recurrent neural networks can all be trained using the NSL framework. In
57+
addition to supervised and semi-supervised learning (a low amount of
58+
supervision), NSL can in theory be generalized to unsupervised learning.
59+
Incorporating structured signals is done only during training, so the
60+
performance of the serving/inference workflow remains unchanged.""")
61+
2862
setuptools.setup(
2963
name="neural-structured-learning",
3064
version="1.0.0",
3165
author="Google LLC",
32-
description="TensorFlow Neural Structured Learning",
33-
long_description=long_description,
34-
long_description_content_type="text/markdown",
66+
description="Neural Structured Learning is an open-source TensorFlow "
67+
"framework to train neural networks with structured signals",
68+
long_description=NSL_OVERVIEW,
69+
long_description_content_type="text/plain",
3570
url="https://github.com/tensorflow/neural-structured-learning",
3671
packages=setuptools.find_packages(),
3772
install_requires=INSTALL_REQUIRES,

0 commit comments

Comments
 (0)