File tree Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ dependencies = [
44
44
" PyYAML>=6.0.2" , # For APIHubToolset.
45
45
" sqlalchemy>=2.0" , # SQL database ORM
46
46
" tzlocal>=5.3" , # Time zone utilities
47
+ " typing-extensions>=4.5, <5" ,
47
48
" uvicorn>=0.34.0" , # ASGI server for FastAPI
48
49
# go/keep-sorted end
49
50
]
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ from __future__ import annotations
16
+
15
17
from typing import Any
16
18
from typing import Tuple
17
19
18
- from deprecated import deprecated
19
20
from google .genai import types as genai_types
21
+ from typing_extensions import deprecated
20
22
21
23
from ...evaluation .eval_case import IntermediateData
22
24
from ...evaluation .eval_case import Invocation
23
25
from ...sessions .session import Session
24
26
25
27
26
- @deprecated (reason = 'Use convert_session_to_eval_invocations instead.' )
28
+ @deprecated ('Use convert_session_to_eval_invocations instead.' )
27
29
def convert_session_to_eval_format (session : Session ) -> list [dict [str , Any ]]:
28
30
"""Converts a session data into eval format.
29
31
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ from __future__ import annotations
16
+
15
17
from typing import Any
16
18
from typing import Optional
17
19
18
- from deprecated import deprecated
19
20
from google .genai import types as genai_types
20
21
import pandas as pd
21
22
from tabulate import tabulate
23
+ from typing_extensions import deprecated
22
24
from typing_extensions import override
23
25
from vertexai .preview .evaluation import EvalTask
24
26
from vertexai .preview .evaluation import MetricPromptTemplateExamples
@@ -124,10 +126,8 @@ def _get_eval_status(self, score: float):
124
126
125
127
@staticmethod
126
128
@deprecated (
127
- reason = (
128
- "This method has been deprecated and will be removed soon. Please use"
129
- " evaluate_invocations instead."
130
- )
129
+ "This method has been deprecated and will be removed soon. Please use"
130
+ " evaluate_invocations instead."
131
131
)
132
132
def evaluate (
133
133
raw_eval_dataset : list [list [dict [str , Any ]]],
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ from __future__ import annotations
16
+
15
17
from typing import Any
16
18
from typing import cast
17
19
18
- from deprecated import deprecated
19
20
from google .genai import types as genai_types
20
21
import pandas as pd
21
22
from tabulate import tabulate
23
+ from typing_extensions import deprecated
22
24
from typing_extensions import override
23
25
24
26
from .eval_case import Invocation
@@ -100,10 +102,8 @@ def _get_eval_status(self, score: float):
100
102
101
103
@staticmethod
102
104
@deprecated (
103
- reason = (
104
- "This method has been deprecated and will be removed soon. Please use"
105
- " evaluate_invocations instead."
106
- )
105
+ "This method has been deprecated and will be removed soon. Please use"
106
+ " evaluate_invocations instead."
107
107
)
108
108
def evaluate (
109
109
eval_dataset : list [list [dict [str , Any ]]],
@@ -218,7 +218,10 @@ def _evaluate_row(row):
218
218
return new_row , failure
219
219
220
220
@staticmethod
221
- @deprecated ()
221
+ @deprecated (
222
+ "are_tools_equal is deprecated and will be removed soon. Please use"
223
+ " TrajectoryEvaluator._are_tool_calls_equal instead."
224
+ )
222
225
def are_tools_equal (list_a_original , list_b_original ):
223
226
# Remove other entries that we don't want to evaluate
224
227
list_a = [
You can’t perform that action at this time.
0 commit comments