File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
vertexai/preview/evaluation/metrics Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717from typing import Optional
18+ import warnings
19+
1820from vertexai .preview .evaluation import constants
1921from vertexai .preview .evaluation .metrics import _base
2022
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+
2129
2230class Coherence (_base ._ModelBasedMetric ):
2331 """The model-based pointwise metric for Coherence."""
2432
2533 _metric_name = constants .Metric .COHERENCE
2634
2735 def __init__ (self , * , version : Optional [int ] = None ):
36+ warnings .warn (message = _DEPRECATION_WARNING_MESSAGE )
2837 super ().__init__ (
2938 metric = Coherence ._metric_name ,
3039 version = version ,
You can’t perform that action at this time.
0 commit comments