justinpakzad commented on code in PR #69399:
URL: https://github.com/apache/airflow/pull/69399#discussion_r3525437836
##########
providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py:
##########
@@ -115,6 +126,11 @@ def run_evaluation(
:param system_instruction: Optional. An instruction given to the model
to guide its behavior.
:param tools: Optional. A list of tools available to the model during
evaluation, such as a data store.
"""
+ if not _VERTEXAI_EVALUATION_AVAILABLE:
+ raise ImportError(
Review Comment:
Same here.
##########
providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py:
##########
@@ -64,6 +70,11 @@ def get_eval_task(
experiment: str,
) -> EvalTask:
"""Return an EvalTask object."""
+ if not _VERTEXAI_EVALUATION_AVAILABLE:
+ raise ImportError(
Review Comment:
I think `AirflowOptionalProviderFeatureException` would be the correct
Exception to raise here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]