File tree 1 file changed +9
-0
lines changed
vertexai/preview/evaluation/metrics
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
#
17
17
from typing import Optional
18
+ import warnings
19
+
18
20
from vertexai .preview .evaluation import constants
19
21
from vertexai .preview .evaluation .metrics import _base
20
22
23
+ _DEPRECATION_WARNING_MESSAGE = (
24
+ "After google-cloud-aiplatform>1.63.0, using metric class `Coherence` will"
25
+ " result in an error. Please use string metric name `coherence` or define"
26
+ " a PointwiseMetric instead."
27
+ )
28
+
21
29
22
30
class Coherence (_base ._ModelBasedMetric ):
23
31
"""The model-based pointwise metric for Coherence."""
24
32
25
33
_metric_name = constants .Metric .COHERENCE
26
34
27
35
def __init__ (self , * , version : Optional [int ] = None ):
36
+ warnings .warn (message = _DEPRECATION_WARNING_MESSAGE )
28
37
super ().__init__ (
29
38
metric = Coherence ._metric_name ,
30
39
version = version ,
You can’t perform that action at this time.
0 commit comments