Skip to content

Commit

Permalink
Add install blurb to readme
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 516035005
  • Loading branch information
vlad17 authored and The precondition Authors committed Mar 12, 2023
1 parent ce18b80 commit 7bb8c01
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pytest_and_autopublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Install deps
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
# Uncomment to cache of pip dependencies (if tests too slow)
# cache: pip
# cache-dependency-path: '**/pyproject.toml'
Expand All @@ -44,7 +44,7 @@ jobs:
permissions:
contents: write
timeout-minutes: 30

environment: pypi publish
steps:
# Publish the package (if local `__version__` > pip version)
- uses: etils-actions/pypi-auto-publish@v1
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# `precondition`: Preconditioning Optimizers

[![Unittests](https://github.com/google-research/precondition/actions/workflows/pytest_and_autopublish.yml/badge.svg)](https://github.com/google-research/precondition/actions/workflows/pytest_and_autopublish.yml)
[![PyPI version](https://badge.fury.io/py/precondition.svg)](https://badge.fury.io/py/precondition)
[![PyPI version](https://badge.fury.io/py/precondition.svg)](https://badge.fury.io/py/precondition-opt)

Installation
```
pip3 install -U precondition-opt
```

Currently, this contains several preconditioning optimizer implementations. Please refer to the citations below.

Expand Down
2 changes: 1 addition & 1 deletion precondition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

# A new PyPI release will be pushed everytime `__version__` is increased
# When changing this, also update the CHANGELOG.md
__version__ = '0.1.0'
__version__ = '0.1.1'
2 changes: 1 addition & 1 deletion precondition/distributed_shampoo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def test_matrix_inverse_root_padding(self, sz):
pad_rt_principal,
# The fact that this is so large keeps vladf up at night,
# but without padding_start argument it's even worse (>1).
rtol=1e-2,
rtol=1e-2 if sz == 4 else 5e-2,
err_msg=np.array2string(rt - pad_rt_principal))
self.assertLessEqual(pad_err, 4 * err)
self.assertEqual(np.abs(pad_rt[sz:]).sum(), 0)
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "precondition"
name = "precondition-opt"
description = "Preconditioning optimizers."
readme = "README.md"
requires-python = ">=3.8"
Expand Down Expand Up @@ -28,11 +28,14 @@ repository = "https://github.com/google-research/precondition"
# Development deps (unittest, linting, formating,...)
# Installed through `pip install .[dev]`
dev = [
"absl-py>=0.8.1",
"chex",
"flax",
"optax",
"pytest",
"pytest-xdist",
"pylint>=2.6.0",
"pyink",
"absl-py>=0.8.1",
]

[tool.pyink]
Expand All @@ -45,3 +48,6 @@ pyink-use-majority-quotes = true
[build-system]
requires = ["flit_core >=3.5,<4"]
build-backend = "flit_core.buildapi"

[tool.flit.module]
name = "precondition"

0 comments on commit 7bb8c01

Please sign in to comment.