Skip to main content

A library for analyzing TensorFlow models

Project description

<!-- See: www.tensorflow.org/tfx/model_analysis/ -->

# TensorFlow Model Analysis

[![Python](https://img.shields.io/pypi/pyversions/tensorflow-model-analysis.svg?style=plastic)](https://github.com/tensorflow/model-analysis)
[![PyPI](https://badge.fury.io/py/tensorflow-model-analysis.svg)](https://badge.fury.io/py/tensorflow-model-analysis)
[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma)

*TensorFlow Model Analysis* (TFMA) is a library for evaluating TensorFlow models.
It allows users to evaluate their models on large amounts of data in a
distributed manner, using the same metrics defined in their trainer. These
metrics can be computed over different slices of data and visualized in Jupyter
notebooks.

![TFMA Slicing Metrics Browser](https://raw.githubusercontent.com/tensorflow/model-analysis/master/g3doc/images/tfma-slicing-metrics-browser.gif)

Caution: TFMA may introduce backwards incompatible changes before version 1.0.

## Installation

The recommended way to install TFMA is using the
[PyPI package](https://pypi.org/project/tensorflow-model-analysis/):

<pre class="devsite-terminal devsite-click-to-copy">
pip install tensorflow-model-analysis
</pre>

Currently, TFMA requires that TensorFlow is installed but does not have an
explicit dependency on the TensorFlow PyPI package. See the
[TensorFlow install guides](https://www.tensorflow.org/install/) for instructions.

To enable TFMA visualization in Jupyter Notebook:

<pre class="prettyprint">
<code class="devsite-terminal">jupyter nbextension enable --py widgetsnbextension</code>
<code class="devsite-terminal">jupyter nbextension install --py --symlink tensorflow_model_analysis</code>
<code class="devsite-terminal">jupyter nbextension enable --py tensorflow_model_analysis</code>
</pre>

Note: If Jupyter notebook is already installed in your home directory, add
`--user` to these commands. If Jupyter is installed as root, or using a virtual
environment, the parameter `--sys-prefix` might be required.

### Dependencies

[Apache Beam](https://beam.apache.org/) is required to run distributed analysis.
By default, Apache Beam runs in local mode but can also run in distributed mode
using [Google Cloud Dataflow](https://cloud.google.com/dataflow/). TFMA is
designed to be extensible for other Apache Beam runners.

## Getting Started

For instructions on using TFMA, see the [get started
guide](https://github.com/tensorflow/model-analysis/blob/master/g3doc/get_started.md) and try out
the extensive [end-to-end example](https://github.com/tensorflow/tfx/blob/master/examples/chicago_taxi/README.md).

## Compatible Versions

The following table is the TFMA package versions that are compatible with each
other. This is determined by our testing framework, but other *untested*
combinations may also work.

|tensorflow-model-analysis |tensorflow |apache-beam[gcp]|
|---------------------------|--------------------|----------------|
|GitHub master |1.12 |2.10.0 |
|0.12.0 |1.12 |2.10.0 |
|0.11.0 |1.11 |2.8.0 |
|0.9.2 |1.9 |2.6.0 |
|0.9.1 |1.10 |2.6.0 |
|0.9.0 |1.9 |2.5.0 |
|0.6.0 |1.6 |2.4.0 |

## Questions

Please direct any questions about working with TFMA to
[Stack Overflow](https://stackoverflow.com) using the
[tensorflow-model-analysis](https://stackoverflow.com/questions/tagged/tensorflow-model-analysis)
tag.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tensorflow_model_analysis-0.12.0.tar.gz (584.7 kB view details)

Uploaded Source

Built Distribution

tensorflow_model_analysis-0.12.0-py2-none-any.whl (689.8 kB view details)

Uploaded Python 2

File details

Details for the file tensorflow_model_analysis-0.12.0.tar.gz.

File metadata

  • Download URL: tensorflow_model_analysis-0.12.0.tar.gz
  • Upload date:
  • Size: 584.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13

File hashes

Hashes for tensorflow_model_analysis-0.12.0.tar.gz
Algorithm Hash digest
SHA256 cc77cf5e22db506eb831ea4aa4bda90384b1f8cb84996d57cd6f0dbff5fd8c82
MD5 462c1fc1188ace35bb1846f4fb934d3b
BLAKE2b-256 7e03a67b5b9c9474fa63b0164d76ae8475dbeb74edc2dd3435ffdce4635c7e16

See more details on using hashes here.

File details

Details for the file tensorflow_model_analysis-0.12.0-py2-none-any.whl.

File metadata

  • Download URL: tensorflow_model_analysis-0.12.0-py2-none-any.whl
  • Upload date:
  • Size: 689.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13

File hashes

Hashes for tensorflow_model_analysis-0.12.0-py2-none-any.whl
Algorithm Hash digest
SHA256 fac88bc92f669970adef16ef9f29d867f81883da20365392db23e6dca0197b8c
MD5 b90d4ae6164adfed9bafc8384ce8374c
BLAKE2b-256 378ba252d810a079b6b8b33c2af74483c1f86cb8ad2dae0cf3b5a9a3bd58aaa9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page