Skip to content

Commit

Permalink
Update version for release 0.4.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 375577552
  • Loading branch information
ramakumar1729 committed May 24, 2021
1 parent c2f4aaa commit 77f2800
Show file tree
Hide file tree
Showing 47 changed files with 559 additions and 488 deletions.
2 changes: 1 addition & 1 deletion tensorflow_ranking/g3doc/api_docs/python/tfr.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ library.
__version__<a id="__version__"></a>
</td>
<td>
`'0.3.3.dev'`
`'0.4.0.dev'`
</td>
</tr>
</table>
26 changes: 22 additions & 4 deletions tensorflow_ranking/g3doc/api_docs/python/tfr/_api_cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@
"tfr.keras.model.AbstractModelBuilder.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__",
"tfr.keras.model.AbstractModelBuilder.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__",
"tfr.keras.model.AbstractModelBuilder.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__",
"tfr.keras.model.AbstractModelBuilder.__init__": "tfr.keras.losses.RankingLossKey.__init__",
"tfr.keras.model.AbstractModelBuilder.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__",
"tfr.keras.model.AbstractModelBuilder.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__",
"tfr.keras.model.AbstractModelBuilder.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__",
Expand Down Expand Up @@ -1023,7 +1024,14 @@
"tfr.keras.model.ModelBuilder.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__",
"tfr.keras.model.ModelBuilder.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__",
"tfr.keras.model.ModelBuilder.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__",
"tfr.keras.model.ModelBuilder.build": "tfr.keras.model.AbstractModelBuilder.build",
"tfr.keras.model.ModelBuilder.build": "tfr.keras.model.ModelBuilderWithMask.build",
"tfr.keras.model.ModelBuilderWithMask.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__",
"tfr.keras.model.ModelBuilderWithMask.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__",
"tfr.keras.model.ModelBuilderWithMask.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__",
"tfr.keras.model.ModelBuilderWithMask.__le__": "tfr.keras.canned.DNNRankingNetwork.__le__",
"tfr.keras.model.ModelBuilderWithMask.__lt__": "tfr.keras.canned.DNNRankingNetwork.__lt__",
"tfr.keras.model.ModelBuilderWithMask.__ne__": "tfr.keras.canned.DNNRankingNetwork.__ne__",
"tfr.keras.model.ModelBuilderWithMask.__new__": "tfr.keras.losses.ApproxMRRLoss.__new__",
"tfr.keras.model.Preprocessor.__eq__": "tfr.keras.canned.DNNRankingNetwork.__eq__",
"tfr.keras.model.Preprocessor.__ge__": "tfr.keras.canned.DNNRankingNetwork.__ge__",
"tfr.keras.model.Preprocessor.__gt__": "tfr.keras.canned.DNNRankingNetwork.__gt__",
Expand Down Expand Up @@ -2577,9 +2585,6 @@
"tfr.keras.model.AbstractModelBuilder.__ne__": true,
"tfr.keras.model.AbstractModelBuilder.__new__": true,
"tfr.keras.model.AbstractModelBuilder.build": true,
"tfr.keras.model.AbstractModelBuilder.create_inputs": true,
"tfr.keras.model.AbstractModelBuilder.preprocess": true,
"tfr.keras.model.AbstractModelBuilder.score": true,
"tfr.keras.model.DNNScorer": false,
"tfr.keras.model.DNNScorer.__call__": true,
"tfr.keras.model.DNNScorer.__eq__": true,
Expand Down Expand Up @@ -2633,6 +2638,19 @@
"tfr.keras.model.ModelBuilder.create_inputs": true,
"tfr.keras.model.ModelBuilder.preprocess": true,
"tfr.keras.model.ModelBuilder.score": true,
"tfr.keras.model.ModelBuilderWithMask": false,
"tfr.keras.model.ModelBuilderWithMask.__eq__": true,
"tfr.keras.model.ModelBuilderWithMask.__ge__": true,
"tfr.keras.model.ModelBuilderWithMask.__gt__": true,
"tfr.keras.model.ModelBuilderWithMask.__init__": true,
"tfr.keras.model.ModelBuilderWithMask.__le__": true,
"tfr.keras.model.ModelBuilderWithMask.__lt__": true,
"tfr.keras.model.ModelBuilderWithMask.__ne__": true,
"tfr.keras.model.ModelBuilderWithMask.__new__": true,
"tfr.keras.model.ModelBuilderWithMask.build": true,
"tfr.keras.model.ModelBuilderWithMask.create_inputs": true,
"tfr.keras.model.ModelBuilderWithMask.preprocess": true,
"tfr.keras.model.ModelBuilderWithMask.score": true,
"tfr.keras.model.Preprocessor": false,
"tfr.keras.model.Preprocessor.__call__": true,
"tfr.keras.model.Preprocessor.__eq__": true,
Expand Down
2 changes: 2 additions & 0 deletions tensorflow_ranking/g3doc/api_docs/python/tfr/_toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ toc:
path: /ranking/api_docs/python/tfr/keras/model/InputCreator
- title: ModelBuilder
path: /ranking/api_docs/python/tfr/keras/model/ModelBuilder
- title: ModelBuilderWithMask
path: /ranking/api_docs/python/tfr/keras/model/ModelBuilderWithMask
- title: Preprocessor
path: /ranking/api_docs/python/tfr/keras/model/Preprocessor
- title: PreprocessorWithSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
* <a href="../tfr/keras/model/GAMScorer.md"><code>tfr.keras.model.GAMScorer</code></a>
* <a href="../tfr/keras/model/InputCreator.md"><code>tfr.keras.model.InputCreator</code></a>
* <a href="../tfr/keras/model/ModelBuilder.md"><code>tfr.keras.model.ModelBuilder</code></a>
* <a href="../tfr/keras/model/ModelBuilderWithMask.md"><code>tfr.keras.model.ModelBuilderWithMask</code></a>
* <a href="../tfr/keras/model/Preprocessor.md"><code>tfr.keras.model.Preprocessor</code></a>
* <a href="../tfr/keras/model/PreprocessorWithSpec.md"><code>tfr.keras.model.PreprocessorWithSpec</code></a>
* <a href="../tfr/keras/model/Scorer.md"><code>tfr.keras.model.Scorer</code></a>
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_ranking/g3doc/api_docs/python/tfr/keras.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in Keras.

[`metrics`](../tfr/keras/metrics.md) module: Keras metrics in TF-Ranking.

[`model`](../tfr/keras/model.md) module: Ranking Model utilities and classes in
[`model`](../tfr/keras/model.md) module: Ranking model utilities and classes in
tfr.keras.

[`network`](../tfr/keras/network.md) module: Ranking Networks in Keras.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ flattened_context_features = {'context_feature_1':
flattened_example_features = {'example_feature_1':
[[1], [0], [1], [0], [0], [0]]}
```

`context_feature_1` is repeated by list_size=3 times. `example_feature_1` is
flattened and padded with the invalid terms replaced by valid terms in each
query in a circular way.
Expand Down
7 changes: 7 additions & 0 deletions tensorflow_ranking/g3doc/api_docs/python/tfr/keras/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ description: Keras metrics in TF-Ranking.

Keras metrics in TF-Ranking.

NOTE: For metrics that compute a ranking, ties are broken randomly. This means
that metrics may be stochastic if items with equal scores are provided.

WARNING: Some metrics (e.g. Recall or MRR) are not well-defined when there are
no relevant items (e.g. if `y_true` has a row of only zeroes). For these cases,
the TF-Ranking metrics will evaluate to `0`.

## Classes

[`class ARPMetric`](../../tfr/keras/metrics/ARPMetric.md): Average relevance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Average relevance position (ARP).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L235-L278">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L243-L286">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -783,7 +783,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Alpha discounted cumulative gain (alphaDCG).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L780-L902">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L788-L910">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -731,7 +731,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L894-L902">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L902-L910">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -889,7 +889,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Discounted cumulative gain (DCG).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L695-L776">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L703-L784">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -644,7 +644,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L768-L776">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L776-L784">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -802,7 +802,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Mean reciprocal rank (MRR).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L171-L231">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L179-L239">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -637,7 +637,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L226-L231">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L234-L239">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -795,7 +795,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Mean average precision (MAP).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L525-L602">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L533-L610">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -645,7 +645,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L596-L602">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L604-L610">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -803,7 +803,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Normalized discounted cumulative gain (NDCG).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L606-L691">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L614-L699">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -649,7 +649,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L683-L691">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L691-L699">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -807,7 +807,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Ordered pair accuracy (OPA).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L906-L957">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L914-L965">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -791,7 +791,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Precision-IA@k (Pre-IA@k).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L431-L521">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L439-L529">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -108,7 +108,6 @@ https://www.microsoft.com/en-us/research/publication/diversifying-search-results
[clarke2009]: https://trec.nist.gov/pubs/trec18/papers/ENT09.OVERVIEW.pdf

<!-- Tabular view -->

<table class="responsive fixed orange">
<colgroup><col width="214px"><col></colgroup>
<tr><th colspan="2"><h2 class="add-link">Args</h2></th></tr>
Expand Down Expand Up @@ -695,7 +694,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L516-L521">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L524-L529">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -853,7 +852,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Precision@k (P@k).

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L282-L352">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L290-L360">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down Expand Up @@ -640,7 +640,7 @@ A layer instance.

<h3 id="get_config"><code>get_config</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L347-L352">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L355-L360">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down Expand Up @@ -798,7 +798,7 @@ layer's specifications.

<h3 id="update_state"><code>update_state</code></h3>

<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L145-L167">View
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L153-L175">View
source</a>

<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: Ranking metric key strings.

<table class="tfo-notebook-buttons tfo-api nocontent" align="left">
<td>
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L15-L42">
<a target="_blank" href="https://github.com/tensorflow/ranking/tree/master/tensorflow_ranking/python/keras/metrics.py#L23-L50">
<img src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" />
View source on GitHub
</a>
Expand Down
Loading

0 comments on commit 77f2800

Please sign in to comment.