From f310477afa1adcc907e295fb597392a2990c3b88 Mon Sep 17 00:00:00 2001 From: Christopher Suter Date: Thu, 23 Jan 2025 08:18:11 -0800 Subject: [PATCH] [TFP]: remove oryx remnants; project now hosted elsewhere PiperOrigin-RevId: 718874543 --- spinoffs/oryx/README.md | 3 -- spinoffs/oryx/examples/_book.yaml | 37 ------------- spinoffs/oryx/examples/_index.yaml | 60 --------------------- spinoffs/oryx/examples/_toc.yaml | 20 ------- spinoffs/oryx/oryx/BUILD | 38 ------------- spinoffs/oryx/oryx/__init__.py | 22 -------- spinoffs/oryx/oryx/tools/BUILD | 35 ------------ spinoffs/oryx/oryx/tools/build_oryx_docs.py | 55 ------------------- 8 files changed, 270 deletions(-) delete mode 100644 spinoffs/oryx/README.md delete mode 100644 spinoffs/oryx/examples/_book.yaml delete mode 100644 spinoffs/oryx/examples/_index.yaml delete mode 100644 spinoffs/oryx/examples/_toc.yaml delete mode 100644 spinoffs/oryx/oryx/BUILD delete mode 100644 spinoffs/oryx/oryx/__init__.py delete mode 100644 spinoffs/oryx/oryx/tools/BUILD delete mode 100644 spinoffs/oryx/oryx/tools/build_oryx_docs.py diff --git a/spinoffs/oryx/README.md b/spinoffs/oryx/README.md deleted file mode 100644 index 3f01683643..0000000000 --- a/spinoffs/oryx/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Oryx - -Oryx has moved! Check it out in its [new location](https://github.com/jax-ml/oryx). diff --git a/spinoffs/oryx/examples/_book.yaml b/spinoffs/oryx/examples/_book.yaml deleted file mode 100644 index fdc367a914..0000000000 --- a/spinoffs/oryx/examples/_book.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -upper_tabs: -# Tabs left of dropdown menu -- include: /_upper_tabs_left.yaml -- include: /api_docs/_upper_tabs_api.yaml -# Dropdown menu -- name: Resources - path: /resources - is_default: true - menu: - - include: /resources/_menu_toc.yaml - lower_tabs: - # Subsite tabs - other: - - name: Guides & Tutorials - contents: - - include: /probability/oryx/_toc.yaml - - - name: API - skip_translation: true - contents: - - include: /probability/oryx/api_docs/python/oryx/_toc.yaml - -- include: /_upper_tabs_right.yaml diff --git a/spinoffs/oryx/examples/_index.yaml b/spinoffs/oryx/examples/_index.yaml deleted file mode 100644 index aaab16f998..0000000000 --- a/spinoffs/oryx/examples/_index.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -book_path: /probability/oryx/_book.yaml -project_path: /probability/oryx/_project.yaml -description: A library for probabilistic programming and deep learning built on top of JAX. -landing_page: - custom_css_path: /site-assets/css/style.css - rows: - - heading: Oryx is a library for probabilistic programming and deep learning built on top of JAX. - items: - - classname: devsite-landing-row-50 - description: > - Oryx's approach is to expose a set of function transformations that - compose and integrate with JAX's existing transformations. To install Oryx, - you can run: - -
-        pip install --upgrade oryx
-        
- code_block: | -
-        import oryx
-        import jax.numpy as jnp
-        ppl = oryx.core.ppl
-        tfd = oryx.distributions
-
-        # Define sampling function
-        def sample(key):
-          x = ppl.random_variable(tfd.Normal(0., 1.))(key)
-          return jnp.exp(x / 2.) + 2.
-
-        # Transform sampling function into a log-density function
-        ppl.log_prob(sample)(1.)  # ==> -0.9189
-        
- - classname: devsite-landing-row-cards - items: - - heading: "A Tour of Oryx" - image_path: /resources/images/tf-logo-card-16x9.png - path: https://tensorflow.org/probability/oryx/notebooks/a_tour_of_oryx - - heading: "Probabilistic Programming" - image_path: /resources/images/tf-logo-card-16x9.png - path: https://tensorflow.org/probability/oryx/notebooks/probabilistic_programming - - heading: "Oryx on GitHub" - image_path: /resources/images/github-card-16x9.png - path: https://github.com/jax-ml/oryx - buttons: - - label: View on GitHub - path: https://github.com/tensorflow/probability diff --git a/spinoffs/oryx/examples/_toc.yaml b/spinoffs/oryx/examples/_toc.yaml deleted file mode 100644 index 4f4380f78d..0000000000 --- a/spinoffs/oryx/examples/_toc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -toc: -- heading: "Guide" -- title: A Tour of Oryx - path: /probability/oryx/notebooks/a_tour_of_oryx -- title: Probabilistic Programming - path: /probability/oryx/notebooks/probabilistic_programming diff --git a/spinoffs/oryx/oryx/BUILD b/spinoffs/oryx/oryx/BUILD deleted file mode 100644 index 25e3e4d653..0000000000 --- a/spinoffs/oryx/oryx/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -# [internal] load pytype.bzl (pytype_strict_library) - -licenses(["notice"]) - -package( - # default_applicable_licenses - default_visibility = ["//visibility:public"], -) - -# pytype_strict -py_library( - name = "oryx", - srcs = ["__init__.py"], - deps = [ - # jax dep, - # oryx:version dep, - # oryx/bijectors dep, - # oryx/core dep, - # oryx/distributions dep, - # oryx/experimental dep, - # oryx/internal dep, - # oryx/util dep, - ], -) diff --git a/spinoffs/oryx/oryx/__init__.py b/spinoffs/oryx/oryx/__init__.py deleted file mode 100644 index 5578264466..0000000000 --- a/spinoffs/oryx/oryx/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -"""Oryx is a neural network mini-library built on top of Jax.""" -from oryx import bijectors # pylint: disable=g-import-not-at-top -from oryx import core -from oryx import distributions -from oryx import experimental -from oryx import internal -from oryx import util -from oryx.version import __version__ diff --git a/spinoffs/oryx/oryx/tools/BUILD b/spinoffs/oryx/oryx/tools/BUILD deleted file mode 100644 index 05b0f9cb65..0000000000 --- a/spinoffs/oryx/oryx/tools/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -# [internal] load pytype.bzl (pytype_strict_binary) - -licenses(["notice"]) - -package( - # default_applicable_licenses - default_visibility = ["//visibility:public"], -) - -# pytype_strict -py_binary( - name = "build_oryx_docs", - srcs = ["build_oryx_docs.py"], - deps = [ - # absl:app dep, - # absl/flags dep, - # oryx dep, - # tensorflow_docs/api_generator:doc_controls dep, - # tensorflow_docs/api_generator:generate_lib dep, - ], -) diff --git a/spinoffs/oryx/oryx/tools/build_oryx_docs.py b/spinoffs/oryx/oryx/tools/build_oryx_docs.py deleted file mode 100644 index 9b2c3189f3..0000000000 --- a/spinoffs/oryx/oryx/tools/build_oryx_docs.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2020 The TensorFlow Probability Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================ -"""Tool to generate external api_docs for oryx.""" -import os - -from absl import app -from absl import flags -import oryx -from tensorflow_docs.api_generator import generate_lib - - -flags.DEFINE_string("output_dir", "/tmp/oryx_api", - "Where to output the docs") - -flags.DEFINE_string( - "code_url_prefix", - "https://github.com/jax-ml/oryx/blob/main/oryx", - "The url prefix for links to code.") - -flags.DEFINE_bool("search_hints", True, - "Include metadata search hints in the generated files") - -flags.DEFINE_string("site_path", "probability/oryx/api_docs", - "Path prefix in the _toc.yaml") - -FLAGS = flags.FLAGS - - -def main(unused_argv): - doc_generator = generate_lib.DocGenerator( - root_title="Oryx", - py_modules=[("oryx", oryx)], - base_dir=os.path.dirname(oryx.__file__), - code_url_prefix=FLAGS.code_url_prefix, - search_hints=FLAGS.search_hints, - site_path=FLAGS.site_path, - private_map={"oryx.core": ["kwargs_util"]}) - - doc_generator.build(output_dir=FLAGS.output_dir) - - -if __name__ == "__main__": - app.run(main)