tf-models-nightly 2.17.0.dev20240412__py2.py3-none-any.whl → 2.17.0.dev20240414__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- official/recommendation/uplift/metrics/loss_metric.py +3 -0
- official/recommendation/uplift/metrics/poisson_metrics.py +123 -0
- official/recommendation/uplift/metrics/poisson_metrics_test.py +181 -0
- official/recommendation/uplift/metrics/sliced_metric.py +5 -0
- official/recommendation/uplift/metrics/sliced_metric_test.py +27 -0
- official/recommendation/uplift/models/two_tower_uplift_model_test.py +48 -0
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/METADATA +1 -1
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/RECORD +12 -10
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/AUTHORS +0 -0
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/LICENSE +0 -0
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/WHEEL +0 -0
- {tf_models_nightly-2.17.0.dev20240412.dist-info → tf_models_nightly-2.17.0.dev20240414.dist-info}/top_level.txt +0 -0
@@ -183,6 +183,9 @@ class LossMetric(tf_keras.metrics.Metric):
|
|
183
183
|
def result(self) -> tf.Tensor | dict[str, tf.Tensor]:
|
184
184
|
return self._loss.result()
|
185
185
|
|
186
|
+
def reset_state(self):
|
187
|
+
self._loss.reset_state()
|
188
|
+
|
186
189
|
def get_config(self) -> dict[str, Any]:
|
187
190
|
config = super().get_config()
|
188
191
|
config["loss_fn"] = tf_keras.utils.serialize_keras_object(self._loss_fn)
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# Copyright 2024 The TensorFlow Authors. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
"""Poisson regression metrics."""
|
16
|
+
|
17
|
+
from __future__ import annotations
|
18
|
+
|
19
|
+
from typing import Any
|
20
|
+
|
21
|
+
import tensorflow as tf, tf_keras
|
22
|
+
|
23
|
+
from official.recommendation.uplift import types
|
24
|
+
from official.recommendation.uplift.metrics import loss_metric
|
25
|
+
|
26
|
+
|
27
|
+
@tf_keras.utils.register_keras_serializable(package="Uplift")
|
28
|
+
class LogLoss(loss_metric.LossMetric):
|
29
|
+
"""Computes the (weighted) poisson log loss sliced by treatment group.
|
30
|
+
|
31
|
+
Given labels `y` and the model's predictions `x`, the loss is computed as:
|
32
|
+
`loss = x - y * log(x) + [y * log(y) - y + 0.5 * log(2 * pi * y)]`
|
33
|
+
|
34
|
+
Note that from a numerical perspective it is preferred to compute the loss
|
35
|
+
from the model's logits as opposed to directly using its predictions, where
|
36
|
+
`logits = log(x) = log(prediction)`. In this case the loss is computed as:
|
37
|
+
`loss = exp(logits) - y * logits + [y * log(y) - y + 0.5 * log(2 * pi * y)]`
|
38
|
+
|
39
|
+
Example standalone usage:
|
40
|
+
|
41
|
+
>>> poisson_loss = poisson_metrics.LogLoss()
|
42
|
+
>>> y_true = tf.constant([[1.0], [0.0]])
|
43
|
+
>>> y_pred = types.TwoTowerTrainingOutputs(
|
44
|
+
true_logits=tf.constant([[1.0], [0.0]]),
|
45
|
+
is_treatment=tf.constant([[1], [0]]),
|
46
|
+
)
|
47
|
+
>>> poisson_loss(y_true=y_true, y_pred=y_pred)
|
48
|
+
{
|
49
|
+
"poisson_log_loss/treatment": 1.7182817 # exp(1) - 1 * 1
|
50
|
+
"poisson_log_loss/control": 1.0 # exp(0) - 0 * 0
|
51
|
+
"poisson_log_loss": 1.3591409 # (1.7182817 + 1.0) / 2
|
52
|
+
}
|
53
|
+
|
54
|
+
Example usage with the `model.compile()` API:
|
55
|
+
|
56
|
+
>>> model.compile(
|
57
|
+
... optimizer="sgd",
|
58
|
+
... loss=TrueLogitsLoss(tf.nn.log_poisson_loss),
|
59
|
+
... metrics=[poisson_metrics.LogLoss()]
|
60
|
+
... )
|
61
|
+
"""
|
62
|
+
|
63
|
+
def __init__(
|
64
|
+
self,
|
65
|
+
from_logits: bool = True,
|
66
|
+
compute_full_loss: bool = False,
|
67
|
+
slice_by_treatment: bool = True,
|
68
|
+
name: str = "poisson_log_loss",
|
69
|
+
dtype: tf.DType = tf.float32,
|
70
|
+
):
|
71
|
+
"""Initializes the instance.
|
72
|
+
|
73
|
+
Args:
|
74
|
+
from_logits: When `y_pred` is of type `tf.Tensor`, specifies whether
|
75
|
+
`y_pred` represents the model's logits or predictions. Otherwise, when
|
76
|
+
`y_pred` is of type `TwoTowerTrainingOutputs`, set this to `True` in
|
77
|
+
order to compute the loss using the true logits.
|
78
|
+
compute_full_loss: Specifies whether the full log loss will be computed.
|
79
|
+
If `True`, the expression `[y_true * log(y_true) - y_true + 0.5 * log(2
|
80
|
+
* pi * y_true)]` will be added to the loss, otherwise the loss will be
|
81
|
+
computed solely by the expression `[y_pred - y_true * log(y_pred)]`.
|
82
|
+
slice_by_treatment: Specifies whether the loss should be sliced by the
|
83
|
+
treatment indicator tensor. If `True`, the metric's result will return
|
84
|
+
the loss values sliced by the treatment group. Note that this can only
|
85
|
+
be set to `True` when `y_pred` is of type `TwoTowerTrainingOutputs`.
|
86
|
+
name: Optional name for the instance.
|
87
|
+
dtype: Optional data type for the instance.
|
88
|
+
"""
|
89
|
+
super().__init__(
|
90
|
+
loss_fn=tf.nn.log_poisson_loss,
|
91
|
+
from_logits=from_logits,
|
92
|
+
compute_full_loss=compute_full_loss,
|
93
|
+
slice_by_treatment=slice_by_treatment,
|
94
|
+
name=name,
|
95
|
+
dtype=dtype,
|
96
|
+
)
|
97
|
+
|
98
|
+
def update_state(
|
99
|
+
self,
|
100
|
+
y_true: tf.Tensor,
|
101
|
+
y_pred: types.TwoTowerTrainingOutputs | tf.Tensor,
|
102
|
+
sample_weight: tf.Tensor | None = None,
|
103
|
+
):
|
104
|
+
if not self._from_logits:
|
105
|
+
if isinstance(y_pred, types.TwoTowerTrainingOutputs):
|
106
|
+
raise ValueError(
|
107
|
+
"`from_logits` must be set to `True` when `y_pred` is of type"
|
108
|
+
" TwoTowerTrainingOutputs. Note that the true logits and true"
|
109
|
+
" predictions are assumed to be linked to each other through the"
|
110
|
+
" log link function: `true_logits = tf.math.log(true_predictions)."
|
111
|
+
)
|
112
|
+
y_pred = tf.math.log(y_pred)
|
113
|
+
|
114
|
+
super().update_state(y_true, y_pred, sample_weight)
|
115
|
+
|
116
|
+
def get_config(self) -> dict[str, Any]:
|
117
|
+
config = super().get_config()
|
118
|
+
del config["loss_fn"]
|
119
|
+
return config
|
120
|
+
|
121
|
+
@classmethod
|
122
|
+
def from_config(cls, config: dict[str, Any]) -> LogLoss:
|
123
|
+
return cls(**config)
|
@@ -0,0 +1,181 @@
|
|
1
|
+
# Copyright 2024 The TensorFlow Authors. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
"""Tests for poisson regression metrics."""
|
16
|
+
|
17
|
+
from absl.testing import parameterized
|
18
|
+
import tensorflow as tf, tf_keras
|
19
|
+
|
20
|
+
from official.recommendation.uplift import keras_test_case
|
21
|
+
from official.recommendation.uplift import types
|
22
|
+
from official.recommendation.uplift.metrics import poisson_metrics
|
23
|
+
|
24
|
+
|
25
|
+
def _get_two_tower_outputs(
|
26
|
+
true_logits: tf.Tensor, is_treatment: tf.Tensor
|
27
|
+
) -> types.TwoTowerTrainingOutputs:
|
28
|
+
# Only the true_logits and is_treatment tensors are needed for testing.
|
29
|
+
return types.TwoTowerTrainingOutputs(
|
30
|
+
shared_embedding=tf.ones_like(is_treatment),
|
31
|
+
control_predictions=tf.ones_like(is_treatment),
|
32
|
+
treatment_predictions=tf.ones_like(is_treatment),
|
33
|
+
uplift=tf.ones_like(is_treatment),
|
34
|
+
control_logits=tf.ones_like(is_treatment),
|
35
|
+
treatment_logits=tf.ones_like(is_treatment),
|
36
|
+
true_logits=true_logits,
|
37
|
+
true_predictions=tf.ones_like(is_treatment),
|
38
|
+
is_treatment=is_treatment,
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
class LogLossTest(keras_test_case.KerasTestCase, parameterized.TestCase):
|
43
|
+
|
44
|
+
@parameterized.named_parameters(
|
45
|
+
{
|
46
|
+
"testcase_name": "two_tower_outputs_not_sliced",
|
47
|
+
"from_logits": True,
|
48
|
+
"compute_full_loss": False,
|
49
|
+
"slice_by_treatment": False,
|
50
|
+
"y_true": tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
51
|
+
"y_pred": _get_two_tower_outputs(
|
52
|
+
true_logits=tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
53
|
+
is_treatment=tf.constant([[1], [0], [1], [0]]),
|
54
|
+
),
|
55
|
+
"expected_loss": tf.reduce_mean(
|
56
|
+
tf.nn.log_poisson_loss(
|
57
|
+
tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
58
|
+
tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
59
|
+
)
|
60
|
+
),
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"testcase_name": "two_tower_outputs_sliced",
|
64
|
+
"from_logits": True,
|
65
|
+
"compute_full_loss": False,
|
66
|
+
"slice_by_treatment": True,
|
67
|
+
"y_true": tf.constant([[1], [0]], dtype=tf.float32),
|
68
|
+
"y_pred": _get_two_tower_outputs(
|
69
|
+
true_logits=tf.constant([[1], [0]], dtype=tf.float32),
|
70
|
+
is_treatment=tf.constant([[1], [0]]),
|
71
|
+
),
|
72
|
+
"expected_loss": {
|
73
|
+
"poisson_log_loss/treatment": (
|
74
|
+
tf.math.exp(1.0) - 1 # exp(1) - 1 * 1
|
75
|
+
),
|
76
|
+
"poisson_log_loss/control": 1.0, # exp(0) - 0 * 0
|
77
|
+
"poisson_log_loss": ((tf.math.exp(1.0) - 1) + 1) / 2,
|
78
|
+
},
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"testcase_name": "tensor_outputs_from_logits",
|
82
|
+
"from_logits": True,
|
83
|
+
"compute_full_loss": False,
|
84
|
+
"slice_by_treatment": False,
|
85
|
+
"y_true": tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
86
|
+
"y_pred": tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
87
|
+
"expected_loss": tf.reduce_mean(
|
88
|
+
tf.nn.log_poisson_loss(
|
89
|
+
tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
90
|
+
tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
91
|
+
)
|
92
|
+
),
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"testcase_name": "tensor_outputs_from_logits_full_loss",
|
96
|
+
"from_logits": True,
|
97
|
+
"compute_full_loss": True,
|
98
|
+
"slice_by_treatment": False,
|
99
|
+
"y_true": tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
100
|
+
"y_pred": tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
101
|
+
"expected_loss": tf.reduce_mean(
|
102
|
+
tf.nn.log_poisson_loss(
|
103
|
+
tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
104
|
+
tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
105
|
+
compute_full_loss=True,
|
106
|
+
)
|
107
|
+
),
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"testcase_name": "tensor_outputs_from_predictions",
|
111
|
+
"from_logits": False,
|
112
|
+
"compute_full_loss": False,
|
113
|
+
"slice_by_treatment": False,
|
114
|
+
"y_true": tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
115
|
+
"y_pred": tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
116
|
+
"expected_loss": tf.reduce_mean(
|
117
|
+
tf.nn.log_poisson_loss(
|
118
|
+
tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
119
|
+
tf.math.log(
|
120
|
+
tf.constant([[1], [2], [3], [4]], dtype=tf.float32)
|
121
|
+
),
|
122
|
+
)
|
123
|
+
),
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"testcase_name": "tensor_outputs_from_predictions_full_loss",
|
127
|
+
"from_logits": False,
|
128
|
+
"compute_full_loss": True,
|
129
|
+
"slice_by_treatment": False,
|
130
|
+
"y_true": tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
131
|
+
"y_pred": tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
132
|
+
"expected_loss": tf.reduce_mean(
|
133
|
+
tf.nn.log_poisson_loss(
|
134
|
+
tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
135
|
+
tf.math.log(
|
136
|
+
tf.constant([[1], [2], [3], [4]], dtype=tf.float32)
|
137
|
+
),
|
138
|
+
compute_full_loss=True,
|
139
|
+
)
|
140
|
+
),
|
141
|
+
},
|
142
|
+
)
|
143
|
+
def test_metric_computes_correct_loss(
|
144
|
+
self,
|
145
|
+
from_logits: bool,
|
146
|
+
compute_full_loss: bool,
|
147
|
+
slice_by_treatment: bool,
|
148
|
+
y_true: tf.Tensor,
|
149
|
+
y_pred: tf.Tensor,
|
150
|
+
expected_loss: tf.Tensor,
|
151
|
+
):
|
152
|
+
metric = poisson_metrics.LogLoss(
|
153
|
+
from_logits=from_logits,
|
154
|
+
compute_full_loss=compute_full_loss,
|
155
|
+
slice_by_treatment=slice_by_treatment,
|
156
|
+
)
|
157
|
+
metric.update_state(y_true, y_pred)
|
158
|
+
self.assertAllClose(expected_loss, metric.result())
|
159
|
+
|
160
|
+
@parameterized.product(
|
161
|
+
from_logits=(True, False),
|
162
|
+
compute_full_loss=(True, False),
|
163
|
+
)
|
164
|
+
def test_metric_is_configurable(
|
165
|
+
self, from_logits: bool, compute_full_loss: bool
|
166
|
+
):
|
167
|
+
metric = poisson_metrics.LogLoss(
|
168
|
+
from_logits=from_logits,
|
169
|
+
compute_full_loss=compute_full_loss,
|
170
|
+
slice_by_treatment=False,
|
171
|
+
)
|
172
|
+
self.assertLayerConfigurable(
|
173
|
+
layer=metric,
|
174
|
+
y_true=tf.constant([[0], [0], [2], [7]], dtype=tf.float32),
|
175
|
+
y_pred=tf.constant([[1], [2], [3], [4]], dtype=tf.float32),
|
176
|
+
serializable=True,
|
177
|
+
)
|
178
|
+
|
179
|
+
|
180
|
+
if __name__ == "__main__":
|
181
|
+
tf.test.main()
|
@@ -193,6 +193,11 @@ class SlicedMetric(tf_keras.metrics.Metric):
|
|
193
193
|
f"{metric_result}."
|
194
194
|
)
|
195
195
|
|
196
|
+
def reset_state(self):
|
197
|
+
self._metric.reset_state()
|
198
|
+
for metric in self._sliced_metrics:
|
199
|
+
metric.reset_state()
|
200
|
+
|
196
201
|
def get_config(self):
|
197
202
|
return {
|
198
203
|
"name": self.name,
|
@@ -315,6 +315,33 @@ class SlicedMetricTest(keras_test_case.KerasTestCase, parameterized.TestCase):
|
|
315
315
|
}
|
316
316
|
self.assertDictEqual(expected_result, metric.result())
|
317
317
|
|
318
|
+
def test_reset_state(self):
|
319
|
+
metric = sliced_metric.SlicedMetric(
|
320
|
+
metric=tf_keras.metrics.AUC(curve="PR", from_logits=False, name="auc"),
|
321
|
+
slicing_spec={"control": False, "treatment": True},
|
322
|
+
)
|
323
|
+
|
324
|
+
expected_initial_result = {
|
325
|
+
"auc": 0.0,
|
326
|
+
"auc/control": 0.0,
|
327
|
+
"auc/treatment": 0.0,
|
328
|
+
}
|
329
|
+
self.assertAllClose(expected_initial_result, metric.result())
|
330
|
+
|
331
|
+
metric.update_state(
|
332
|
+
tf.constant([[0], [0], [1], [1]]), # y_true
|
333
|
+
tf.constant([[0.2], [0.6], [0.3], [0.7]]), # y_pred
|
334
|
+
slicing_feature=tf.constant([[True], [False], [True], [False]]),
|
335
|
+
)
|
336
|
+
|
337
|
+
result = metric.result()
|
338
|
+
self.assertGreater(result["auc"], 0.0)
|
339
|
+
self.assertGreater(result["auc/control"], 0.0)
|
340
|
+
self.assertGreater(result["auc/treatment"], 0.0)
|
341
|
+
|
342
|
+
metric.reset_state()
|
343
|
+
self.assertAllClose(expected_initial_result, metric.result())
|
344
|
+
|
318
345
|
def test_metric_config(self):
|
319
346
|
metric = sliced_metric.SlicedMetric(
|
320
347
|
tf_keras.metrics.SparseTopKCategoricalAccuracy(k=2, name="accuracy@2"),
|
@@ -21,6 +21,7 @@ from official.recommendation.uplift import keras_test_case
|
|
21
21
|
from official.recommendation.uplift import keys
|
22
22
|
from official.recommendation.uplift.layers.uplift_networks import two_tower_uplift_network
|
23
23
|
from official.recommendation.uplift.losses import true_logits_loss
|
24
|
+
from official.recommendation.uplift.metrics import loss_metric
|
24
25
|
from official.recommendation.uplift.models import two_tower_uplift_model
|
25
26
|
|
26
27
|
|
@@ -127,6 +128,53 @@ class TwoTowerUpliftModelTest(
|
|
127
128
|
}
|
128
129
|
self.assertAllClose(expected_predictions, model.predict(dataset))
|
129
130
|
|
131
|
+
def test_classification_model_trains(self):
|
132
|
+
tf_keras.utils.set_random_seed(1)
|
133
|
+
|
134
|
+
# Create binary classifier uplift model.
|
135
|
+
uplift_network = self._get_uplift_network(
|
136
|
+
control_feature_encoder=None, control_input_combiner=None
|
137
|
+
)
|
138
|
+
model = two_tower_uplift_model.TwoTowerUpliftModel(
|
139
|
+
treatment_indicator_feature_name="is_treatment",
|
140
|
+
uplift_network=uplift_network,
|
141
|
+
inverse_link_fn=tf.math.sigmoid,
|
142
|
+
)
|
143
|
+
model.compile(
|
144
|
+
optimizer=tf_keras.optimizers.SGD(0.1),
|
145
|
+
loss=true_logits_loss.TrueLogitsLoss(
|
146
|
+
loss_fn=tf_keras.losses.binary_crossentropy, from_logits=True
|
147
|
+
),
|
148
|
+
metrics=[
|
149
|
+
loss_metric.LossMetric(
|
150
|
+
tf_keras.metrics.AUC(curve="PR", from_logits=True, name="aucpr")
|
151
|
+
),
|
152
|
+
],
|
153
|
+
)
|
154
|
+
|
155
|
+
# Create toy classification dataset.
|
156
|
+
treatment = tf.constant([[1], [1], [0], [1], [1], [1], [0], [1], [0], [1]])
|
157
|
+
y = treatment
|
158
|
+
dataset = tf.data.Dataset.from_tensor_slices((
|
159
|
+
{
|
160
|
+
"shared_feature": np.random.normal(size=(10, 1)),
|
161
|
+
"treatment_feature": np.random.normal(size=(10, 1)),
|
162
|
+
"is_treatment": treatment,
|
163
|
+
},
|
164
|
+
y,
|
165
|
+
)).batch(5)
|
166
|
+
|
167
|
+
# Test model training.
|
168
|
+
history = model.fit(dataset, epochs=100)
|
169
|
+
self.assertIn("loss", history.history)
|
170
|
+
self.assertLen(history.history["loss"], 100)
|
171
|
+
self.assertBetween(
|
172
|
+
history.history["loss"][-1], 0.0, history.history["loss"][0]
|
173
|
+
)
|
174
|
+
self.assertIn("aucpr", history.history)
|
175
|
+
self.assertLess(history.history["aucpr"][0], 1.0)
|
176
|
+
self.assertEqual(history.history["aucpr"][-1], 1.0)
|
177
|
+
|
130
178
|
@parameterized.named_parameters(
|
131
179
|
{
|
132
180
|
"testcase_name": "identity",
|
@@ -912,11 +912,13 @@ official/recommendation/uplift/metrics/label_mean.py,sha256=ECaes7FZmsksnwySn7jf
|
|
912
912
|
official/recommendation/uplift/metrics/label_mean_test.py,sha256=b_d3lNlpkDm2xKLUkxfiXeQg7pjL8HNx7y9NaYarpV0,7083
|
913
913
|
official/recommendation/uplift/metrics/label_variance.py,sha256=9DCl42BJkehxfWD3pSbZnRNvwfhVM6VyHwivGdaU72s,3610
|
914
914
|
official/recommendation/uplift/metrics/label_variance_test.py,sha256=k0mdEU1WU53-HIEO5HGtfp1MleifD-h4bZNKtTvM3Ws,7681
|
915
|
-
official/recommendation/uplift/metrics/loss_metric.py,sha256=
|
915
|
+
official/recommendation/uplift/metrics/loss_metric.py,sha256=gYZdnTsuL_2q1FZuPip-DaWxt_Q-02YYaePyMBVNx7w,7344
|
916
916
|
official/recommendation/uplift/metrics/loss_metric_test.py,sha256=48rQG8bKFdy0xBFjoOLXKRUlYpCEyAzSmPOFoF7FX94,16021
|
917
917
|
official/recommendation/uplift/metrics/metric_configs.py,sha256=Z-r79orE4EycQ5TJ7xdI5LhjOHT3wzChYyDxcxGqLXk,1670
|
918
|
-
official/recommendation/uplift/metrics/
|
919
|
-
official/recommendation/uplift/metrics/
|
918
|
+
official/recommendation/uplift/metrics/poisson_metrics.py,sha256=LJnovpST0H9kFGu-ziDstWOVlAYARLo9oPLDTjzrdu4,4623
|
919
|
+
official/recommendation/uplift/metrics/poisson_metrics_test.py,sha256=Kd8CuQeEBlxRklA-7mGKHcUD0CyskE1S3cJqk6mEvv4,6756
|
920
|
+
official/recommendation/uplift/metrics/sliced_metric.py,sha256=uhvzudOWtMNKZ0avwGhX-37UELR9Cq9b4C0g8erBkXw,8688
|
921
|
+
official/recommendation/uplift/metrics/sliced_metric_test.py,sha256=bhVGyI1tOkFkVOtruJo3p6XopDFyG1JW5qdZm9-RqeU,12248
|
920
922
|
official/recommendation/uplift/metrics/treatment_fraction.py,sha256=WHrKfsN42xU7S-pK99xEVpVtd3zLD7UidLT1K8vgIn4,2757
|
921
923
|
official/recommendation/uplift/metrics/treatment_fraction_test.py,sha256=LtFljDdz9yfH1GNDMo8OcdS4yhsez5WyHsthH3qJf3s,5430
|
922
924
|
official/recommendation/uplift/metrics/treatment_sliced_metric.py,sha256=S0ZSoOHcjeWDWiEZlRnFHtRkOzizvrfmsFwbYP0Z0rY,3804
|
@@ -927,7 +929,7 @@ official/recommendation/uplift/metrics/variance.py,sha256=rhwZzUX-cRbwr-7vhC0I0b
|
|
927
929
|
official/recommendation/uplift/metrics/variance_test.py,sha256=EPISeHOFIh6WfODuC0SXbnmMugh90acMmm4BJkEZXlo,7757
|
928
930
|
official/recommendation/uplift/models/__init__.py,sha256=kWy2K5LGXHVyyrTjJvbVFcBjj1bjPRI2dpIq-sfdhvo,716
|
929
931
|
official/recommendation/uplift/models/two_tower_uplift_model.py,sha256=Fb6nLFAOqch81ravK57K9kggAeqvtJcBtKGZwCex0ts,5028
|
930
|
-
official/recommendation/uplift/models/two_tower_uplift_model_test.py,sha256=
|
932
|
+
official/recommendation/uplift/models/two_tower_uplift_model_test.py,sha256=J7qC9f0fDG1aIrLz85K1qUzTFyAIH0v8eA1yfPJb9YY,10061
|
931
933
|
official/utils/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
|
932
934
|
official/utils/hyperparams_flags.py,sha256=2FCAxfblio6ay36Yf4o7Nx188wRzFM1mbKOtVXiZCzo,4607
|
933
935
|
official/utils/docs/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
|
@@ -1204,9 +1206,9 @@ tensorflow_models/tensorflow_models_test.py,sha256=nc6A9K53OGqF25xN5St8EiWvdVbda
|
|
1204
1206
|
tensorflow_models/nlp/__init__.py,sha256=4tA5Pf4qaFwT-fIFOpX7x7FHJpnyJT-5UgOeFYTyMlc,807
|
1205
1207
|
tensorflow_models/uplift/__init__.py,sha256=mqfa55gweOdpKoaQyid4A_4u7xw__FcQeSIF0k_pYmI,999
|
1206
1208
|
tensorflow_models/vision/__init__.py,sha256=zBorY_v5xva1uI-qxhZO3Qh-Dii-Suq6wEYh6hKHDfc,833
|
1207
|
-
tf_models_nightly-2.17.0.
|
1208
|
-
tf_models_nightly-2.17.0.
|
1209
|
-
tf_models_nightly-2.17.0.
|
1210
|
-
tf_models_nightly-2.17.0.
|
1211
|
-
tf_models_nightly-2.17.0.
|
1212
|
-
tf_models_nightly-2.17.0.
|
1209
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/AUTHORS,sha256=1dG3fXVu9jlo7bul8xuix5F5vOnczMk7_yWn4y70uw0,337
|
1210
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/LICENSE,sha256=WxeBS_DejPZQabxtfMOM_xn8qoZNJDQjrT7z2wG1I4U,11512
|
1211
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/METADATA,sha256=SMm31t0MLz8wyx_vZ3yIklTbV1qbniqgblIk9XWmtEY,1432
|
1212
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
1213
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/top_level.txt,sha256=gum2FfO5R4cvjl2-QtP-S1aNmsvIZaFFT6VFzU0f4-g,33
|
1214
|
+
tf_models_nightly-2.17.0.dev20240414.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|