Skip to content

Commit

Permalink
Bump tensorflow to 2.18 and add [and-cuda] optional dependencies …
Browse files Browse the repository at this point in the history
…to `pyproject.toml`.

PiperOrigin-RevId: 724352439
  • Loading branch information
lukmaz authored and The Meridian Authors committed Feb 7, 2025
1 parent 149c411 commit d248590
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`):

## [Unreleased]

## [1.0.2] - 2025-02-06

* Bump minimum `tensorflow` version to 2.18.
* Add `[and-cuda]` optional dependencies to install `tensorflow` dependency with
GPU support.
* Add `non_media_baseline_values` argument to `summary_metrics`,
`baseline_summary_metrics` and `expected_vs_actual` methods.
* Update `compute_incremental_outcome_aggregate` docstring to match
Expand Down Expand Up @@ -182,6 +187,7 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`):
[0.17.0]: https://github.com/google/meridian/releases/tag/v0.17.0
[1.0.0]: https://github.com/google/meridian/releases/tag/v1.0.0
[1.0.1]: https://github.com/google/meridian/releases/tag/v1.0.1
[Unreleased]: https://github.com/google/meridian/compare/v1.0.1...HEAD
[1.0.2]: https://github.com/google/meridian/releases/tag/v1.0.2
[Unreleased]: https://github.com/google/meridian/compare/v1.0.2...HEAD


18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,34 @@ you understand the differences between these MMM projects.
Python 3.11 or 3.12 is required to use Meridian. We also recommend using a
minimum of 1 GPU.

Note: This project has been tested on V100 and T4 GPU using 16 GB of RAM.
Note: This project has been tested on T4 GPU using 16 GB of RAM.

To install Meridian, run the following command to automatically install the
latest release from PyPI.

For GPU users (requires CUDA toolchain to already be installed in the system):

```sh
$ pip install --upgrade google-meridian[and-cuda]
```

For CPU users:

```sh
$ pip install --upgrade google-meridian
```

Alternatively, run the following command to install the most recent, unreleased
version from GitHub.

For GPU users (requires CUDA toolchain to already be installed in the system):

```sh
$ pip install --upgrade "google-meridian[and-cuda] @ git+https://github.com/google/meridian.git"
```

For CPU users:

```sh
$ pip install --upgrade git+https://github.com/google/meridian.git
```
Expand Down
6 changes: 3 additions & 3 deletions demo/Meridian_Getting_Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@
"outputs": [],
"source": [
"# Install meridian: from PyPI @ latest release\n",
"!pip install --upgrade google-meridian[colab]\n",
"!pip install --upgrade google-meridian[colab,and-cuda]\n",
"\n",
"# Install meridian: from PyPI @ specific version\n",
"#!pip install google-meridian==1.0.0\n",
"# !pip install google-meridian[colab,and-cuda]==1.0.2\n",
"\n",
"# Install meridian: from GitHub @HEAD\n",
"#!pip install --upgrade \"google-meridian[colab] @ git+https://github.com/google/meridian.git\""
"# !pip install --upgrade \"google-meridian[colab,and-cuda] @ git+https://github.com/google/meridian.git\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion meridian/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"""Meridian API."""

__version__ = "1.0.1"
__version__ = "1.0.2"


from meridian import analysis
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ dependencies = [
"numpy >= 1.26, < 2",
"pandas >= 2.2, < 3",
"scipy >= 1.12.0, < 1.13",
"tensorflow >= 2.16, < 2.17",
"tensorflow-probability >= 0.24, < 0.25",
"tf-keras >= 2.16, < 2.17",
"tensorflow >= 2.18, < 3",
"tensorflow-probability >= 0.25, < 1",
"tf-keras >= 2.18, < 3",
"xarray",
]

Expand All @@ -62,6 +62,11 @@ dev = [
colab = [
"psutil",
]
# GPU deps
# Installed through `pip install -e .[and-cuda]`
and-cuda = [
"tensorflow[and-cuda] >= 2.18, < 3",
]

[tool.pyink]
# Formatting configuration to follow Google style-guide
Expand Down

0 comments on commit d248590

Please sign in to comment.