From 7d96bcf9268bb908baabe7256be24d927096a720 Mon Sep 17 00:00:00 2001 From: Owen Lockwood <42878312+lockwo@users.noreply.github.com> Date: Sat, 14 Sep 2024 23:06:59 -0700 Subject: [PATCH] deploy (#31) * deploy * readme --- .github/workflows/release.yml | 20 ++++++++++++++++++++ README.md | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7da515e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Deploy package + +on: + workflow_dispatch: + + +jobs: + pypi-publish: + name: upload release to PyPI + runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + # retrieve your distributions here + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/README.md b/README.md index 332878a..46e2abb 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ Available at https://lockwo.github.io/distreqx/. ## Quick example ```python +import jax +from jax import numpy as jnp from distreqx import distributions key = jax.random.PRNGKey(1234) @@ -42,9 +44,9 @@ sigma = jnp.array([0.1, 0.2, 0.3]) dist = distributions.MultivariateNormalDiag(mu, sigma) -samples = dist_distrax.sample(key) +samples = dist.sample(key) -print(dist_distrax.log_prob(samples)) +print(dist.log_prob(samples)) ``` ## Differences with Distrax